NVP capture problem on live mode

atadevos
Contributor
Contributor

I have a problem when capture a payment on live mode, but when I'm doing the same with sanbox everything goes well.

On live mode this error occures.

 

PayPal\Core\PayPalHttpConnection : ERROR: Got Http response code 400 when accessing

. {"name":"UNKNOWN_ERROR","message":"An unknown error occurred.","information_link":"

}

 

So basically authorization goes well and amount is beeing frizzed, but error occurs when trying to capture.

 

I'm using paypal nvp php client.

 

 

 

---UPDATE---

 

Here is the simple capture request via curl 

Authorization id is valid.

Access token is valid (there is no unauthorised response here) but I'm not writing it here.

 

curl -v -X POST https://api.paypal.com/v1/payments/authorization/14M57761LJ309511V/capture -H "Content-Type: application/json" -H "Authorization: Bearer <ACCESS_IS_HIDDEN_BUT_OK> -d '{
"amount": {
"currency": "USD",
"total": "10"
},
"is_final_capture": true
}'
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 173.0.88.98...
* TCP_NODELAY set
* Connected to api.paypal.com (173.0.88.98) port 443 (#0)
* TLS 1.2 connection using TLS_RSA_WITH_AES_256_CBC_SHA256
* Server certificate: api.paypal.com
* Server certificate: Symantec Class 3 Secure Server CA - G4
* Server certificate: VeriSign Class 3 Public Primary Certification Authority - G5
> POST /v1/payments/authorization/14M57761LJ309511V/capture HTTP/1.1
> Host: api.paypal.com
> User-Agent: curl/7.51.0
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer <ACCESS_IS_HIDDEN_BUT_OK>
> Content-Length: 90
>
* upload completely sent off: 90 out of 90 bytes
< HTTP/1.1 400 Bad Request
< Date: Wed, 23 May 2018 09:17:32 GMT
< Server: Apache
< paypal-debug-id: 5bf0382cbd819
< Content-Language: *
< Connection: close
< Paypal-Debug-Id: 5bf0382cbd819
< Set-Cookie: X-PP-SILOVER=name%3DLIVE6.API.1%26silo_version%3D880%26app%3Dapiplatformproxyserv%26TIME%3D2888893787%26HTTP_X_PP_AZ_LOCATOR%3D; Expires=Wed, 23 May 2018 09:47:33 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: 166
< Cache-Control: max-age=0, no-cache, no-store, must-revalidate
< Pragma: no-cache
< Content-Type: application/json
<
* Curl_http_done: called premature == 0
* Closing connection 0
{"name":"UNKNOWN_ERROR","message":"An unknown error occurred.","information_link":"https://developer.paypal.com/docs/api/payments/#errors","debug_id":"5bf0382cbd819"}

 

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.