Read variable num_cars_item in the PayPal sandbox

0

Someone who has tried PayPal's sandbox, I need to know how to test the shipment of multiple cart products to variable num_cars_items , and receive them in the same variable. Since when I simulate it in the sandbox by putting several items as products, it does not send them; and when I put only one, it comes to me and stores it in the database.

$num_cars_item = $_post['num_cars_item'];
for($i=1;$i<=num_cars_item;$i++){
  $item.$i
}

In theory this works but I do not receive anything in the varible car_item . Does anyone know how to test the catwalk with several items?

    
asked by jorge enrique chan castillo 22.09.2018 в 06:18
source

1 answer

0

I do not know what you're referring to, are you trying to paypal in your example, or are you trying to send the information to paypal? if it is to send it is in the input number_item. $ i from 1 to the one that you have and if it is to receive it you would have to do a foreach to receive the data of the variable, which would be $ _POST ['item_number1'] $ _POST ['item_number2' ] $ _POST ['item_number3'] etc, in 1 2 3 there goes $ i because it remembers that you are inside the foreach receiving the data. but we do not know how many items were bought.

    
answered by 22.09.2018 в 13:25