File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -51,14 +51,15 @@ public function enqueue_scripts() {
5151define ('KKD_PFF_PAYSTACK_FLATLINE_AMOUNT_PLUS_CHARGE ' , intval ((PAYSTACK_LOCAL_CAP -PAYSTACK_ADDITIONAL_CHARGE )/PAYSTACK_PERCENTAGE ));
5252define ('KKD_PFF_PAYSTACK_FLATLINE_AMOUNT ' , PAYSTACK_FLATLINE_AMOUNT_PLUS_CHARGE - PAYSTACK_LOCAL_CAP );
5353
54- function kkd_pff_paystack_add_paystack_charge ($ amountinkobo )
54+ function kkd_pff_paystack_add_paystack_charge ($ amount )
5555{
56+ $ amountinkobo = $ amount * 100 ;
5657 if ($ amountinkobo > PAYSTACK_FLATLINE_AMOUNT )
57- return $ amountinkobo + PAYSTACK_LOCAL_CAP ;
58+ return ( $ amountinkobo + PAYSTACK_LOCAL_CAP )/ 100 ;
5859 elseif ($ amountinkobo > PAYSTACK_CROSSOVER_AMOUNT )
59- return intval (($ amountinkobo + PAYSTACK_ADDITIONAL_CHARGE ) / PAYSTACK_CHARGE_DIVIDER );
60+ return ( intval (($ amountinkobo + PAYSTACK_ADDITIONAL_CHARGE ) / PAYSTACK_CHARGE_DIVIDER ))/ 100 ;
6061 else
61- return intval ($ amountinkobo / PAYSTACK_CHARGE_DIVIDER );
62+ return ( intval ($ amountinkobo / PAYSTACK_CHARGE_DIVIDER ))/ 100 ;
6263}
6364
6465add_filter ("wp_mail_content_type " , "kkd_pff_paystack_mail_content_type " );
You can’t perform that action at this time.
0 commit comments