0
votes

I am trying to access the Paypal Direct Payements Api using cURL and I get this response: TIMESTAMP=2020%2d11%2d25T10%3a53%3a01Z&CORRELATIONID=7877664ffef0b&ACK=Failure&L_ERRORCODE0=10004&L_SHORTMESSAGE0=Invalid%20Request%20Error%2e&L_LONGMESSAGE0=Transaction%20refused%20because%20of%20an%20invalid%20argument%2e

An this is the cURL statement minus the credentials:

curl https://api-3t.sandbox.paypal.com/nvp --insecure -d VERSION=56.0 -d SIGNATURE=hidden -d USER=hidden -d PWD=hidden -d METHOD=DoDirectPayment -d PAYMENTACTION=Sale -d IPADDRESS= -d AMT=8.88 -d CREDITCARDTYPE=Visa -d ACCT=4032032245382681 -d EXPDATE=10/2021 -d CVV2=283 -d FIRSTNAME=John -d LASTNAME=Doe -d STREET=MohlalaRd -d CITY=Nelspruit -d STATE=Mpumalanga -d ZIP=1201 -d COUNTRYCODE=ZA

1

1 Answers

0
votes

EXPDATE=10/2021

This is the invalid argument, format is MMYYYY

DoDirectPayment requires a live PayPal Payments Pro account for use in live and is an old API, you should not be using it in new integrations. Also version 56 is an extremely old version of the classic NVP API. If you were to be integrating something like this with a classic API (which you should not be doing), you would at the very least want to use a reasonably recent version such as 202.


See Advanced Credit and Debit Card Payments instead, or use Braintree if you need a gateway.