Can't process payment (Http 400 error)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've tried to make payment in sandbox, no matter how i was using PHP SDK or direct curl, even use the sample code copy and paste. It responsed the same error. Any idea?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
================================================================================================================================
[05-05-2017 09:06:17] PayPal\Core\PayPalHttpConnection : INFO: POST https://api.sandbox.paypal.com/v1/oauth2/token
[05-05-2017 09:06:18] PayPal\Core\PayPalHttpConnection : DEBUG: Request Headers : POST /v1/oauth2/token HTTP/1.1, Host: api.sandbox.paypal.com, User-Agent: PayPalSDK/PayPal-PHP-SDK 1.11.0 (platform-ver=5.6.30; bit=64; os=Darwin_16.5.0; machine=x86_64; crypto-lib-ver=2.2.7; curl=7.51.0), Authorization: Basic QWRwRDBIN05yMUtiSU1MYlM2eEgwZjFOdmN2QkxBaW5nMkNfdVJDd293UDBSWW9fVEl3eTFmZERoS0Q0VHBtRjdUdmZhT1lkcHUyMmtRSmo6RUlVcjZkZGVGaW5TYUVyUzFCSDlZLXFyVjNib0hzdDljSXRYUE1OTmd4RG1PQVh5Sld1dXdCSUxuSHNBbjJ5b1R1WWVZZ00zMWZmMndOeEg=, Accept: */*, Content-Length: 29, Content-Type: application/x-www-form-urlencoded, ,
[05-05-2017 09:06:18] PayPal\Core\PayPalHttpConnection : DEBUG: Request Data : grant_type=client_credentials
--------------------------------------------------------------------------------------------------------------------------------
[05-05-2017 09:06:18] PayPal\Core\PayPalHttpConnection : INFO: Response Status : 200
[05-05-2017 09:06:18] PayPal\Core\PayPalHttpConnection : DEBUG: Response Headers : HTTP/1.1 200 OK, Date: Fri, 05 May 2017 09:06:19 GMT, Server: Apache, paypal-debug-id: 316bf9cc55785, X-PAYPAL-TOKEN-SERVICE: IAAS, Paypal-Debug-Id: 316bf9cc55785, Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dplatformapiserv%26TIME%3D2336230489%26HTTP_X_PP_AZ_LOCATOR%3D; Expires=Fri, 05 May 2017 09:36:19 GMT; domain=.paypal.com; path=/; Secure; HttpOnly, Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT, Vary: Authorization, Content-Length: 550, Connection: close, Content-Type: application/json, ,
[05-05-2017 09:06:18] PayPal\Core\PayPalHttpConnection : DEBUG: Response Data : {"scope":"https://uri.paypal.com/services/subscriptions https://api.paypal.com/v1/payments/.* https://api.paypal.com/v1/vault/credit-card https://uri.paypal.com/services/applications/webhooks openid https://uri.paypal.com/payments/payouts https://api.paypal.com/v1/vault/credit-card/.*","nonce":"2017-05-05T09:05:49Z29Fvc7Bt_Eu2X0Z4p5uZHfx...}
================================================================================================================================
[05-05-2017 09:06:18] PayPal\Core\PayPalHttpConnection : INFO: POST https://api.sandbox.paypal.com/v1/payments/payment
[05-05-2017 09:06:27] PayPal\Core\PayPalHttpConnection : DEBUG: Request Headers : POST /v1/payments/payment HTTP/1.1, Host: api.sandbox.paypal.com, Accept: */*, Content-Type: application/json, User-Agent: PayPalSDK/PayPal-PHP-SDK 1.11.0 (platform-ver=5.6.30; bit=64; os=Darwin_16.5.0; machine=x86_64; crypto-lib-ver=2.2.7; curl=7.51.0), Authorization: Bearer A21AAHti8PSsvfAkB64Vcs0fHt3hKxlDcwt_f1LW-q250Gv8FfBE3qTA_SNtkZRMgw8b_VlI1Y7ni3Tuem3v21e42qmBTD25w, Content-Length: 500, ,
[05-05-2017 09:06:27] PayPal\Core\PayPalHttpConnection : DEBUG: Request Data : {"intent":"sale","payer":{"payment_method":"credit_card","funding_instruments":[{"credit_card_token":{"credit_card_id":"CARD-0W977727W1186980MLEGBYHQ","external_customer_id":"YS9haA8sYNh7fgjxgRy1NxkAW553"}}]},"transactions":[{"amount":{"currency":"HKD","total":"1.00","details":{"shipping":"0","tax":"0","subtotal":"1.00"}},"item_list":{"items":[{"name":"Online Purchases","currency":"HKD","quantity":1,"price":"1.00"}]},"description":"appetit.hk online purcahses","invoice_number":"590c4089771d4"}]}
--------------------------------------------------------------------------------------------------------------------------------
[05-05-2017 09:06:27] PayPal\Core\PayPalHttpConnection : INFO: Response Status : 400
[05-05-2017 09:06:27] PayPal\Core\PayPalHttpConnection : DEBUG: Response Headers : HTTP/1.1 400 Bad Request, Date: Fri, 05 May 2017 09:06:20 GMT, Server: Apache, paypal-debug-id: be931066c7a2, Content-Language: *, Connection: close, Paypal-Debug-Id: be931066c7a2, Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dplatformapiserv%26TIME%3D2386562137%26HTTP_X_PP_AZ_LOCATOR%3D; Expires=Fri, 05 May 2017 09:36:28 GMT; domain=.paypal.com; path=/; Secure; HttpOnly, Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT, Vary: Authorization, Content-Length: 181, Content-Type: application/json, ,
[05-05-2017 09:06:27] PayPal\Core\PayPalHttpConnection : ERROR: Got Http response code 400 when accessing https://api.sandbox.paypal.com/v1/payments/payment. {"name":"UNKNOWN_ERROR","message":"An unknown error occurred.","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#UNKNOWN_ERROR","debug_id":"be931066c7a2"}
[05-05-2017 09:06:27] PayPal\Core\PayPalHttpConnection : DEBUG:
================================================================================================================================
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, I'll need to open an investigation on our side for this, I'll keep you posted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for missing this one... the issue should have been resolved.... are you still seeing it and was it working at all over the past few weeks. I'm just thinking that it was fixed and now the symptoms are back again.
Can you send over a new example?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Paypal 4X credit : translated message & currency error in PayPal Payments Standard
- Unable to Retrieve Plan ID Related to a Subscription in REST APIs
- [UNPROCESSABLE_ENTITY], but payment went through in PayPal Payments Standard
- Security header is not valid error message in woo commerce in NVP/SOAP APIs
- API TRANSACTION_REFUSED in Sandbox when Capturing Payment in REST APIs