Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Paypal IPN POST variables randomly returning item_number or item_number1

Tags:

html

php

paypal

Paypal for the last few days has randomly started returning the POST variable of item_number1 instead of item_number and the same for item_name. I've read on Paypals website that they do this when it's a cart transaction(multiple items). These are instant payments for wifi access of a single item so I'm not sure why after years of running without seeing this it has suddenly started randomly happening. In the returned data to the IPN listener I also get a "num_cart_items=1" if it has sent the "item_number1". So it is definitely thinking some transactions are shopping cart ones. Is there any way I can stop this happening?

like image 545
webtron Avatar asked Jul 13 '17 04:07

webtron


2 Answers

Similar here. I temporary deal with the issue with the following:

if (!$_POST['item_number']) {
     $_POST['item_number']=$_POST['item_number1']; }

I still wonder why it randomly changes item_number to item_number1 and there was no notice or announcement for that. I had half orders passing and half not, and though that was PayPal IPN issue, not my file !

like image 120
Seldimi Avatar answered Oct 04 '22 22:10

Seldimi


Same here. Started yesterday with random behaviour. I'm not interested in such "shopping cart" functions so I have modified my ipn receiver to scan for the first "item_number" available.

like image 21
jdoe121 Avatar answered Oct 04 '22 20:10

jdoe121