Skip to content

Fix issue with quantity selection returning invalid amount paid #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion paystack-forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -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+
Expand Down
3 changes: 2 additions & 1 deletion public/class-paystack-forms-public.php
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
4 changes: 3 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down