Update Express Checkout vars
API version 53 uses different item vars, etc.
hi, Is there a date for new version with the new item vars? I'm getting errors on test express checkout with phpPayPal:
Undefined index: AVSCODE Undefined index: AVV2MATCH ...
Looks like your PHP error reporting is a little sensitive. Those are just notices because some of the functions might be creating variables on the fly that haven't been previously defined.
Try putting error_reporting(E_ALL & ~E_NOTICE); at the beginning of your script and you should see those magically disappear. :)
ok, thanks. the errors disappear. but I get a new error:
the requested url .../EC-77E05873AC1186822 was not found on this server.
I have check the phpPayPal script and found that $PAYPAL_URL is null.
Works the script with paypal or is it in alpha/beta status?
Yeah, it probably shouldn't default to null; but you fix it by either changing it in the class to be the correct URL or set it before making the call with $paypal->PAYPAL_URL =
The correct URL to be put there is: https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=
I will say Express checkout has not been thoroughly tested the version 53 of the PayPal API as of yet. I'll likely have an opportunity in the next 2 months to test everything.
Correct URL depends on either you're live or sandbox so should look for the $sandbox = TRUE value.
For sandbox the url is https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=
that notification of undefined index AVV2MATCH when coming from the format_response function. Just submitted an issue (#9), but you can fix it by switching AVV2MATCH to the proper name CVV2MATCH in the $ResponseFieldsArray['DoReferenceTransaction']['cvv2_match']. Easy way to get there is just do a search for avv2, that's the only place it will show up
I'd suggest to update the constructor since there already is a check on the sandbox variable to: if ($sandbox) { $this->API_ENDPOINT = 'https://api-3t.sandbox.paypal.com/nvp'; $this->PAYPAL_URL = 'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token='; } else { $this->API_ENDPOINT = 'https://api-3t.paypal.com/nvp'; $this->PAYPAL_URL = 'https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token='; }