Skip to content

Commit 999c0ca

Browse files
Merge branch 'master' of github.com:PaystackOSS/plugin-payment-forms-for-wordpress into chore/sanitize-form-fieds
2 parents f4ed41d + 356afa4 commit 999c0ca

File tree

2 files changed

+3
-33
lines changed

2 files changed

+3
-33
lines changed

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,23 +1588,11 @@ function kkd_pff_paystack_confirm_payment()
15881588
$result = "success";
15891589
// kkd_pff_paystack_send_receipt($currency,$amount,$name,$payment_array->email,$code,$metadata)
15901590
} else {
1591-
$usequantity = get_post_meta($payment_array->post_id, '_usequantity', true);
1592-
if ($usequantity == 'no') {
1593-
$oamount = (int)str_replace(' ', '', $amount);
1594-
} else {
1595-
$quantity = $_POST["quantity"];
1596-
$unitamount = (int)str_replace(' ', '', $amount);
1597-
$oamount = $quantity*$unitamount;
1598-
}
15991591
if ($txncharge == 'customer') {
16001592
if ($minimum == 0 && $amount != 0) {
16011593
$oamount = kkd_pff_paystack_add_paystack_charge($oamount);
16021594
}
16031595
}
1604-
1605-
// if ($txncharge == 'customer') {
1606-
// $amount = kkd_pff_paystack_add_paystack_charge($amount);
1607-
// }
16081596
if ($oamount != $amount_paid) {
16091597
// echo $oamount. ' - '.$amount_paid;
16101598
$message = "Invalid amount Paid. Amount required is ".$currency."<b>".number_format($oamount)."</b>";

public/class-paystack-forms-public.php

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,15 @@ public function add_for_kobo($amountinkobo)
137137
if ($amountinkobo > $this->flatline) {
138138
return $amountinkobo + $this->cap;
139139
} elseif ($amountinkobo > $this->crossover) {
140-
return ceil(($amountinkobo + $this->additional_charge) / $this->charge_divider);
140+
return ceil(($amountinkobo + $this->additional_charge) / $this->charge_divider);
141141
} else {
142-
return ceil($amountinkobo / $this->charge_divider);
142+
return ceil($amountinkobo / $this->charge_divider);
143143
}
144144
}
145145

146146
public function add_for_ngn($amountinngn)
147147
{
148-
return $this->add_for_kobo(ceil($amountinngn * 100)) / 100;
148+
return $this->add_for_kobo(ceil($amountinngn * 100)) / 100;
149149
}
150150
}
151151

@@ -2850,24 +2850,6 @@ function kkd_pff_paystack_confirm_payment()
28502850
$result = "success";
28512851
// kkd_pff_paystack_send_receipt($currency,$amount,$name,$payment_array->email,$code,$metadata)
28522852
} else {
2853-
$usequantity = get_post_meta($payment_array->post_id, '_usequantity', true);
2854-
if ($usequantity == 'no') {
2855-
$oamount = (int) str_replace(' ', '', $amount);
2856-
} else {
2857-
$quantity = $_POST["quantity"];
2858-
$unitamount = (int) str_replace(' ', '', $amount);
2859-
$oamount = $quantity * $unitamount;
2860-
}
2861-
if ($txncharge == 'customer') {
2862-
if ($minimum == 0 && $amount != 0) {
2863-
$oamount = kkd_pff_paystack_add_paystack_charge($oamount);
2864-
}
2865-
}
2866-
2867-
2868-
// if ($txncharge == 'customer') {
2869-
// $amount = kkd_pff_paystack_add_paystack_charge($amount);
2870-
// }
28712853
if ($oamount != $amount_paid) {
28722854
// echo $oamount. ' - '.$amount_paid;
28732855
$message = "Invalid amount Paid. Amount required is " . $currency . "<b>" . number_format($oamount) . "</b>";

0 commit comments

Comments
 (0)