PHP Paypal button error message on quantity -


I have applied a PayPal checkout Unfortunately, when I receive the following paypal error at checkout ...

"You entered an invalid quantity value. The value of one volume should be an integer greater than or equal to one."

I do not know why this error occurs because the quantity values ​​are always equal to or equal to 1. I also tried to apply all the quantities till 1, although I still get the error. Below is my code. Your help will be greatly appreciated.

  if (! $ _ Session ['cart_array'])} count ($ _ session ['cart_array']) & lt; 1) {$ cart_output = '& lt; Div class = "pager" & gt; There are no items in the cart! & Lt; / Div & gt; '; } Other {// PayPal checkout button setup // appropriate URL for PayPal form action: //https://www.paypal.com/cgi-bin/webscr "method =" post "> $ paypal_btn. = ' & Lt; form action = "https://www.sandbox.paypal.com/cgi-bin/webscr" method = "post" & gt; & lt; input type = "hidden" name = "CMD" value = Input type = "hidden" name = "hosted_button_id" value = "button" & gt; & quot; Input type = "hidden" name = "upload" value = "1" Gt; & lt; input type = "hidden" name = "business" value = "paypal @ email" & gt; '$ i = 0; foreign currency ($ _ session [' cart_are '] $ $ Each_item) {$ itemID = $ each_item [' itemid ']; ///// ////////// DISPLAY item code ////////////// // // Paypal checkout button setup cont. $ X = $ i + 1; $ paypal_btn. = '& Lt; input type = "hidden" name = "item_name_' $ X '' value =" '$ name' Input type = "hidden" name = "on0_ '$ X' 'value ="' $ ['size'] each_item. '' & Gt; & lt; input type = "hidden" Name = "zodiac_ '$ X' 'value ="' $ value '' & gt; & Lt; Input type = "hidden" name = "volume_ '$ X' 'value ="' $ each_item ['quantity'] '' & gt; '$ $ Item_id_array = $ itemID.' - '. $ Every_item ['Quantity'] ','; // Output all item information table cells $ cart_output = '& Lt; Tr & gt; '; $ Cart_output & Lt; Td> & Lt; A href = "item_details.php? Id = jpg" alt = "'$ name" & gt; & lt; / a & gt;' $ // cart_output = 'item id:' $ every_item ['itemid' ] '
' $ cart_output = '& lt; div class .... = "name" & gt;'. $ Name '. & Lt; / div & gt; & lt; / td & Gt; '$ $ cart_output. =' Item: '. $ I.' & Lt; br & gt; '$ cart_output =.' & Lt; td & gt; '. $ Desc.' & Lt; / td & gt; '$ cart_output =.' & Lt; td & gt; '[size']. '& Lt $ every_item.'; / Td & gt; ';. $ Cart_output =' & lt; TD & gt; & amp; # 163 '$ value .. ' & Quot; $ cart_output = '& lt; TD & gt;' [Quantity]] $ each_item. '.' & Lt; / td & gt; '$ cart_output =' & lt; TD & gt; & amp; # 163 '. $ ITEM_TOTAL' & lt; / TD & gt; '; $ cart_output ='. & Lt; TD & gt; & lt; a class = "to remove" Href = "Shopping_cart.php? Remove = true & amp; Index = '. $ I. "& Gt; & lt; img src =" img / x.png "& gt; & lt; / a & gt; & lt; / td & gt; '$ Cart_output.' '' & Lt; / tr & gt; ; '; $ I ++; / * while (list ($ key, $ value) = each ($ every_item)) {$ cart_output. $ $ $.': '. $ Value.' & Lt; br & gt; ';} * /} $ Cart_output =.' & Lt; a href = "shopping_cart.php empty = true?" & Gt; empty car & lt; / a & gt; 'mysql_close (); // paypal checkout button setup last. $ Paypal_btn. =' & Lt; Input type = "hidden" name = "custom" value = "'$ item_id_array" & gt; Input input type =" image "value =" buy now "src =" IMG / Paypal page "name =" submit "alt =" pay


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -