From 257b74ff51a3caa4990e3a65b7efee76a19d53cb Mon Sep 17 00:00:00 2001 From: Wan Zulkarnain Date: Fri, 24 Feb 2023 14:57:17 +0800 Subject: [PATCH] Fixed issue with amount total when coupon is used --- chip-for-fluent-forms.php | 4 ++-- includes/class-purchase.php | 2 +- readme.txt | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/chip-for-fluent-forms.php b/chip-for-fluent-forms.php index 7567d2c..e42b09a 100644 --- a/chip-for-fluent-forms.php +++ b/chip-for-fluent-forms.php @@ -4,7 +4,7 @@ * Plugin Name: CHIP for Fluent Forms * Plugin URI: https://wordpress.org/plugins/chip-for-fluent-forms/ * Description: CHIP - Better Payment & Business Solutions - * Version: 1.0.3 + * Version: 1.0.4 * Author: Chip In Sdn Bhd * Author URI: http://www.chip-in.asia * @@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly. -define('FF_CHIP_MODULE_VERSION', 'v1.0.3'); +define('FF_CHIP_MODULE_VERSION', 'v1.0.4'); class Chip_Fluent_Forms { diff --git a/includes/class-purchase.php b/includes/class-purchase.php index fdb5d8d..748b720 100644 --- a/includes/class-purchase.php +++ b/includes/class-purchase.php @@ -46,7 +46,7 @@ public function handlePaymentAction( $submissionId, $submissionData, $form, $met $this->is_form_currency_supported( strtoupper( $submission->currency ) ); $transactionId = $this->insertTransaction([ - 'payment_total' => $totalPayable, + 'payment_total' => $this->getAmountTotal(), 'status' => 'pending', 'currency' => strtoupper( $submission->currency ), 'payment_method' => 'chip', diff --git a/readme.txt b/readme.txt index 01979d2..59d961b 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: chipasia, wanzulnet Tags: chip Requires at least: 4.7 Tested up to: 6.1 -Stable tag: 1.0.3 +Stable tag: 1.0.4 Requires PHP: 7.1 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -27,6 +27,9 @@ This plugin will enable your Fluent Forms site to be integrated with CHIP as per == Changelog == += 1.0.4 - 2023-02-24 = +* Fixed - Issue with payment when using with coupon code. + = 1.0.3 - 2023-02-17 = * Changed - Reference will be autogenerated.