Skip to content

Commit 88a2490

Browse files
committed
fixed invalid amount issue for transactions
1 parent ed825de commit 88a2490

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

public/class-paystack-forms-public-for-old-themes.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,14 +1642,14 @@ function kkd_pff_paystack_confirm_payment()
16421642
$result = "success";
16431643
// kkd_pff_paystack_send_receipt($currency,$amount,$name,$payment_array->email,$code,$metadata)
16441644
} else {
1645-
$usequantity = get_post_meta($payment_array->post_id, '_usequantity', true);
1646-
if ($usequantity == 'no') {
1647-
$oamount = (int)str_replace(' ', '', $amount);
1648-
} else {
1649-
$quantity = $_POST["quantity"];
1650-
$unitamount = (int)str_replace(' ', '', $amount);
1651-
$oamount = $quantity*$unitamount;
1652-
}
1645+
// $usequantity = get_post_meta($payment_array->post_id, '_usequantity', true);
1646+
// if ($usequantity == 'no') {
1647+
// $oamount = (int)str_replace(' ', '', $amount);
1648+
// } else {
1649+
// $quantity = $_POST["quantity"];
1650+
// $unitamount = (int)str_replace(' ', '', $amount);
1651+
// $oamount = $quantity*$unitamount;
1652+
// }
16531653
if ($txncharge == 'customer') {
16541654
if ($minimum == 0 && $amount != 0) {
16551655
$oamount = kkd_pff_paystack_add_paystack_charge($oamount);

public/class-paystack-forms-public.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2950,19 +2950,19 @@ function kkd_pff_paystack_confirm_payment()
29502950
$result = "success";
29512951
// kkd_pff_paystack_send_receipt($currency,$amount,$name,$payment_array->email,$code,$metadata)
29522952
} else {
2953-
$usequantity = get_post_meta($payment_array->post_id, '_usequantity', true);
2954-
if ($usequantity == 'no') {
2955-
$oamount = (int) str_replace(' ', '', $amount);
2956-
} else {
2957-
$quantity = $_POST["quantity"];
2958-
$unitamount = (int) str_replace(' ', '', $amount);
2959-
$oamount = $quantity * $unitamount;
2960-
}
2961-
if ($txncharge == 'customer') {
2962-
if ($minimum == 0 && $amount != 0) {
2963-
$oamount = kkd_pff_paystack_add_paystack_charge($oamount);
2964-
}
2965-
}
2953+
// $usequantity = get_post_meta($payment_array->post_id, '_usequantity', true);
2954+
// if ($usequantity == 'no') {
2955+
// $oamount = (int) str_replace(' ', '', $amount);
2956+
// } else {
2957+
// $quantity = $_POST["quantity"];
2958+
// $unitamount = (int) str_replace(' ', '', $amount);
2959+
// $oamount = $quantity * $unitamount;
2960+
// }
2961+
// if ($txncharge == 'customer') {
2962+
// if ($minimum == 0 && $amount != 0) {
2963+
// $oamount = kkd_pff_paystack_add_paystack_charge($oamount);
2964+
// }
2965+
// }
29662966

29672967

29682968
// if ($txncharge == 'customer') {

0 commit comments

Comments
 (0)