phpPayPal icon indicating copy to clipboard operation
phpPayPal copied to clipboard

Update Express Checkout vars

Open drewjoh opened this issue 14 years ago • 7 comments

API version 53 uses different item vars, etc.

drewjoh avatar Apr 25 '11 18:04 drewjoh

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 ...

FpunktOpunkt avatar Jul 06 '11 08:07 FpunktOpunkt

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. :)

drewjoh avatar Jul 06 '11 08:07 drewjoh

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?

FpunktOpunkt avatar Jul 07 '11 19:07 FpunktOpunkt

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.

drewjoh avatar Jul 07 '11 19:07 drewjoh

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=

AlexAndrascu avatar Aug 28 '11 15:08 AlexAndrascu

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

aronduby avatar Sep 05 '12 22:09 aronduby

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='; }

movAX13h avatar Dec 08 '12 23:12 movAX13h