From 755ad2f58bb75cab4996d33fd56fdf54f85ec4ff Mon Sep 17 00:00:00 2001 From: whales-paystack Date: Tue, 8 Feb 2022 16:46:10 +0100 Subject: [PATCH] Fix issue with quantity selection returning invalid amount paid --- paystack-forms.php | 2 +- public/class-paystack-forms-public.php | 3 ++- readme.txt | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/paystack-forms.php b/paystack-forms.php index 1e1c199..c498078 100644 --- a/paystack-forms.php +++ b/paystack-forms.php @@ -3,7 +3,7 @@ Plugin Name: Payment Forms for Paystack Plugin URI: https://github.com/PaystackHQ/Wordpress-Payment-forms-for-Paystack Description: Payment Forms for Paystack allows you create forms that will be used to bill clients for goods and services via Paystack. - Version: 3.4.0 + Version: 3.4.1 Author: Paystack Author URI: http://paystack.com License: GPL-2.0+ diff --git a/public/class-paystack-forms-public.php b/public/class-paystack-forms-public.php index d564d7f..7348523 100644 --- a/public/class-paystack-forms-public.php +++ b/public/class-paystack-forms-public.php @@ -2955,7 +2955,8 @@ function kkd_pff_paystack_confirm_payment() $oamount = (int) str_replace(' ', '', $amount); } else { $quantity = $_POST["quantity"]; - $unitamount = (int) str_replace(' ', '', $amount); + $unitamount = (int) str_replace(' ', '', get_post_meta($payment_array->post_id, '_amount', true)); + // $unitamount = (int) str_replace(' ', '', $amount); $oamount = $quantity * $unitamount; } if ($txncharge == 'customer') { diff --git a/readme.txt b/readme.txt index a35f9a7..60c1638 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://paystack.com/demo Tags: paystack, recurrent payments, nigeria, mastercard, visa, target, Naira, payments, verve, donation, church, NGO, form, contact form 7, form Requires at least: 3.1 Tested up to: 5.9 -Stable tag: 3.4.0 +Stable tag: 3.4.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -92,6 +92,8 @@ Yes you can! Join in on our [GitHub repository](https://github.com/PaystackHQ/wo == Changelog == += 3.4.1 = +* Fix issue with quantity selection returning invalid amount paid = 3.4.0 = * Support for WordPress 5.9 * Support for PHP 8