问题
I'm having problems capturing Paypal payment through DoExpressCheckoutPayment method. Paypal failed and returned with only one 10004 error which said
Transaction refused because of an invalid argument. See additional error messages for details.
However, Paypal did not specify which argument was invalid.
Is there a way to request Paypal to provide more details in this case?
Below are arguments which I post to Paypal using the NVP API.
DoExpressCheckoutPayment
L_PAYMENTREQUEST_0_NAME0=Hieu+Nguyen
L_PAYMENTREQUEST_0_AMT0=20
L_PAYMENTREQUEST_0_QTY0=1
PAYMENTREQUEST_0_AMT=20
PAYMENTREQUEST_0_ITEMAMT=20
PAYMENTREQUEST_0_SHIPTOPHONENUM=452435243
EMAIL=hieu%40thirststudios.com
METHOD=DoExpressCheckoutPayment
VERSION=124.0
PWD=[masked]
USER=[masked]
SIGNATURE=[masked]
PAYMENTREQUEST_0_PAYMENTACTION=Sale
RETURNURL=http%3A%2F%2Fhakuba.centralsnowsports.com.au.local%2F%3FACT%3D53%26G%3DVXdJWStNWGFNSTIvQ09mNmE1cXJWSXlDN0lqYXlQdnNZRjBHL2NoaWpMNVAwNGlaN1A2K1crNVRBbUpmNG1yY05NTC9Mb1hHUVBQL0VsTG9rUEFzbFE9PQ%3D%3D%26M%3DVldsZFNoZVVsRTBJNjFLbmxZSWRtbitQVkZvNEI1M2hrQXNUb2hBZHozQnhCcUVFZkJmM3B0VVBvek1vV3ZPdGpubXJuQlNHd1FaU01wcDNYZVlGMVE9PQ%3D%3D
CANCELURL=http%3A%2F%2Fhakuba.centralsnowsports.com.au.local%2F%3FACT%3D53%26G%3DejNhR1BDSlhRZ1o0MzZoWFAvVmttY2pzMzF5amhqbDZzV2NMemoxbjcvY2dPQTZ4ZlVtL0ltRUx0dmkwUlV0Y3dpRDBuUWxJNk12cnREVDQ4Z1NYMWc9PQ%3D%3D%26M%3DR013TVBmL1FHZkRtOWVRSzVUL0JqMmZYa1B4RTJVNFptdjBPSGJFTlJqK2VSdkU5V25FczM4WEs2WkcwK3FPaWxwYkFSaW1JbGpHOVJSbWpTRjR4N3c9PQ%3D%3D
PAYMENTREQUEST_0_CURRENCYCODE=JPY
ALLOWNOTE=0
CHANNELTYPE=Merchant
PAYMENTREQUEST_0_ALLOWEDPAYMENTMETHOD=InstantPaymentOnly
LOCALECODE=US
ADDROVERRIDE=0
NOSHIPPING=1
SOLUTIONTYPE=Sole
LANDINGPAGE=Billing
TOKEN=EC-59S20038JL208993V
PAYERID=XAC7EG8Y2M5D6
IPADDRESS=hakuba.centralsnowsports.com.au.local
[Updated] more API call argument
SetExpressCheckout
L_PAYMENTREQUEST_0_ITEMCATEGORY0=Physical
L_PAYMENTREQUEST_0_NAME0=Hieu+Nguyen
L_PAYMENTREQUEST_0_AMT0=20
L_PAYMENTREQUEST_0_QTY0=1
PAYMENTREQUEST_0_AMT=20
PAYMENTREQUEST_0_ITEMAMT=20
PAYMENTREQUEST_0_SHIPTOPHONENUM=3143214
EMAIL=hieu%40thirststudios.com
METHOD=SetExpressCheckout
VERSION=124.0
PWD=[masked]
USER=[masked]
SIGNATURE=[masked]
PAYMENTREQUEST_0_PAYMENTACTION=Sale
RETURNURL=http%3A%2F%2Fhakuba.centralsnowsports.com.au.local%2F%3FACT%3D53%26G%3DRlN5WWJUS21HeGd6cTlSTm95MFpZMkxTTTdMZEZ1OUV6S2FIY0pYSjVnM1M0d2FjQjVIQnlqQ3F2d3NFSHRhZHB3bTVnRUE3T1NzN0EwOTcvOVlIQ3c9PQ%3D%3D%26M%3DYWNEUGhhemNVRzNpM0liMEVSUi94TmxkRDZRdmM2R3UrTUh0c2x1dFgwZ2tTNHJjV2lRUHBMWjR6d29vTkxXa3VRUnRPM0xNcnoyYlNHV2NKU2kzb2c9PQ%3D%3D
CANCELURL=http%3A%2F%2Fhakuba.centralsnowsports.com.au.local%2F%3FACT%3D53%26G%3DWnJzWDBWU1JaZndldStIY1FUNjFUWlNyTWYwR0N4NlRQK0VnajAvRjF2bFViZlVhZWphU0o3M1Z5dlNrdWlHOG4rRGd6OUdHNHJQaVhMa0tzamZvcnc9PQ%3D%3D%26M%3DemsxeGV1cnZ4a2JVWnhZRHNaU0ExTHBOaEp6dUQ1b2hiTVF5MXVxMjZyaFh1aFRhUGQvZ0M3dlZGT2dFU0FUelU3bjR6Qm5VVFBLT2xPSlJTN3ROUmc9PQ%3D%3D
PAYMENTREQUEST_0_CURRENCYCODE=JPY
ALLOWNOTE=0
CHANNELTYPE=Merchant
PAYMENTREQUEST_0_ALLOWEDPAYMENTMETHOD=InstantPaymentOnly
LOCALECODE=US
ADDROVERRIDE=0
NOSHIPPING=1
SOLUTIONTYPE=Sole
LANDINGPAGE=Billing
GetExpressCheckoutDetails
METHOD=GetExpressCheckoutDetails
VERSION=124.0
PWD=[masked]
USER=[masked]
SIGNATURE=[masked]
TOKEN=EC-75541725B7341060R
回答1:
Update: For the record, the problem resolved itself after a few days. This must be an issue with Paypal internal engine. Still, we ended up moving away from Paypal after this incident.
来源:https://stackoverflow.com/questions/35616103/paypal-error-10004-invalid-arguments-on-doexpresscheckoutpayment