问题
Why is everything PayPal so crazy hard?
This is what I'm sending to https://api-3t.sandbox.paypal.com/nvp :
METHOD=DoExpressCheckoutPayment&
VERSION=108.0&
USER=my-sandbox-facilitator_api1.domain.com&
PWD=&
SIGNATURE=&
SUBJECT=&
TOKEN=EC-1GE68226PG526154U&
PAYERID=my-sandbox-buyer%40domain.com
PAYMENTREQUEST_0_PAYMENTACTION=SALE&
PAYMENTREQUEST_0_AMT=19.95&
PAYMENTREQUEST_0_CURRENCYCODE=USD&
PAYMENTREQUEST_0_NOTIFYURL=
This is what I'm getting back:
TIMESTAMP=2015-12-12T21%3a35%3a34Z&
CORRELATIONID=d9a463bfa6bb4&
ACK=Failure&
VERSION=108.0&
BUILD=18308778&
L_ERRORCODE0=10406&
L_SHORTMESSAGE0=Transaction+refused+because+of+an+invalid+argument.+See+additional+error+messages+for+details.&
L_LONGMESSAGE0=The+PayerID+value+is+invalid.&
L_SEVERITYCODE0=Error
Just before this I did a METHOD=GetExpressCheckoutDetails without any problems.
PayerID wasn't invalid for that?!?!!
I have a token so I did a METHOD=SetExpressCheckout without any problems.
Ideas?
No amount of Google had a working answer for me.
Either did PP's 5(!) tech support sites.
It is the same issue even if I reconfigure and and shoot a similar transaction at my live PP.
回答1:
PAYERID
is a unique PayPal buyer account identification number as returned after SetExpressCheckout API call(after buyer login to paypal and gets redirected to your RETURN URL , you will need to copy that PAyer Id and use in Doexpresscheckout request. Payer is a 13 single-byte alphanumeric character and not an email address.
https://developer.paypal.com/docs/classic/api/merchant/DoExpressCheckoutPayment_API_Operation_NVP/
来源:https://stackoverflow.com/questions/34245411/paypal-doexpresscheckoutpayment-invalid-payerid-every-single-time