@@ -666,20 +666,20 @@ function kkd_pff_paystack_form_shortcode($atts) {
666666
667667 echo '</div>
668668 </div> ' ;
669- if ($ usequantity == 'yes ' ) {
669+ if ($ recur == ' no ' && $ usequantity == 'yes ' ) {
670670 echo '<div class="span12 unit">
671- <label class="label">Quantity</label>
672- <div class="select">
673- <input type="hidden" value=" ' .$ amount .'" id="pf-qamount"/>
674- <select class="form-control" id="pf-quantity" name="pf-quantity" > ' ;
675- $ max = $ quantity +1 ;
676- for ($ i =1 ; $ i < $ max ; $ i ++) {
677- echo ' <option value=" ' .$ i .'"> ' .$ i .'</ption> ' ;
678- }
679- echo '</select>
680- <i></i>
681- </div>
682- </div> ' ;
671+ <label class="label">Quantity</label>
672+ <div class="select">
673+ <input type="hidden" value=" ' .$ amount .'" id="pf-qamount"/>
674+ <select class="form-control" id="pf-quantity" name="pf-quantity" > ' ;
675+ $ max = $ quantity +1 ;
676+ for ($ i =1 ; $ i < $ max ; $ i ++) {
677+ echo ' <option value=" ' .$ i .'"> ' .$ i .'</ption> ' ;
678+ }
679+ echo '</select>
680+ <i></i>
681+ </div>
682+ </div> ' ;
683683 }
684684
685685 if ($ recur == 'optional ' ) {
@@ -924,6 +924,12 @@ function kkd_pff_paystack_submit_action() {
924924 if ($ usequantity == 'no ' ) {
925925 $ amount = (int )str_replace (' ' , '' , $ formamount );
926926 }else {
927+ $ fixedmetadata [] = [
928+ 'display_name ' => 'Unit Price ' ,
929+ 'variable_name ' => 'Unit_Price ' ,
930+ 'type ' => 'text ' ,
931+ 'value ' => $ currency .number_format ($ formamount )
932+ ];
927933 $ quantity = $ _POST ["pf-quantity " ];
928934 $ unitamount = (int )str_replace (' ' , '' , $ formamount );
929935 $ amount = $ quantity *$ unitamount ;
@@ -1210,7 +1216,7 @@ function kkd_pff_paystack_confirm_payment() {
12101216 $ unitamount = (int )str_replace (' ' , '' , $ amount );
12111217 $ amount = $ quantity *$ unitamount ;
12121218 }
1213-
1219+
12141220
12151221 if ($ txncharge == 'customer ' ) {
12161222 $ percent = (1.55 /100 )*$ amount ;
0 commit comments