1
votes

Using "LIVE" credentials, I'm getting an INTERNAL_SERVICE_ERROR accepting a credit card payment, using this resource: https://api.paypal.com/v1/payments/payment. Same error happens on the web and via cURL. NOTE: This does not happen in SANDBOX only LIVE. See steps to recreate below. For this post, I had to add a space in "http s" as I cannot submit more than 2 links.

  1. Get an OAuth token (substitute username/password in LIVE_USER_ID:LIVE_PASSWORD

    curl http s://api.paypal.com/v1/oauth2/token -H "Accept: application/json" -H "Accept-Language: en_US" -u "LIVE_USER_ID:LIVE_PASSWORD" -d "grant_type=client_credentials"

  2. No problem getting a token using LIVE credentials. Add the token to the following request to the resource:

    curl -v http s://api.paypal.com/v1/payments/payment \
    

    -H "Content-Type:application/json" \ -H "Authorization:Bearer YK.GUHkGhBAQgGgGkilvHoL7DdE9SVq.IDl-mRwAZeM" \ -d '{ "intent": "sale", "payer": { "payment_method": "credit_card", "funding_instruments": [ { "credit_card": { "number": "5500005555555559", "type": "mastercard", "expire_month": 12, "expire_year": 2018, "cvv2": 111, "first_name": "Joe", "last_name": "Shopper" } } ] }, "transactions": [ { "amount": { "total": "0.01", "currency": "USD" }, "description": "This is the payment transaction description." } ] }'

"name":"INTERNAL_SERVICE_ERROR","message":"An internal service error has occurred","information_link":"http_s://developer.paypal.com/webapps/developer/docs/api/#INTERNAL_SERVICE_ERROR","debug_id":"525bfb7a6382a"}johnruffin:~ johnruffin$ Thoughts???

2

2 Answers

3
votes

Thanks for bringing this issue to our attention. I've opened an internal bug with the payments rest api development team. From the debug id provided I see that the credit card is being refused. In the future the error message from this scenario will fall under this error condition: https://developer.paypal.com/webapps/developer/docs/api/#CREDIT_CARD_REFUSED

Please try a another/valid credit card to verify.

-3
votes

Looks like the URL is not well formed. It's https and not http s as provided above.

Tried the calls now, it works fine. Please check and confirm.