PayPal rest API hangs (LIVE not sandbox)

deansatch
Contributor
Contributor

My site uses the rest API with v1/payments/payment - I've been told by a customer that after redirecting to paypal it hangs then finishes on a white screen. Any error on my site wouldn't result in a white screen...its a laravel site and has a custom page for all error codes including 500.

 

When I check the paypal log file I see the following on an example which failed:

 

[25-08-2017 12:48:07] PayPal\Core\PayPalHttpConnection: INFO : POST https://api.paypal.com/v1/oauth2/token
[25-08-2017 12:48:08] PayPal\Core\PayPalHttpConnection: INFO : Response Status : 200
[25-08-2017 12:48:08] PayPal\Core\PayPalHttpConnection: INFO : POST https://api.paypal.com/v1/payments/payment
[25-08-2017 12:48:10] PayPal\Core\PayPalHttpConnection: INFO : Response Status : 201
[25-08-2017 12:50:21] PayPal\Core\PayPalHttpConnection: INFO : POST https://api.paypal.com/v1/oauth2/token
[25-08-2017 12:50:22] PayPal\Core\PayPalHttpConnection: INFO : Response Status : 200
[25-08-2017 12:50:22] PayPal\Core\PayPalHttpConnection: INFO : POST https://api.paypal.com/v1/payments/payment
[25-08-2017 12:50:24] PayPal\Core\PayPalHttpConnection: INFO : Response Status : 201

 

On a successful one the second "v1/payments/payment" contains "payment/PAY-{ID}"

 

Any ideas what could be happening here? I should also mention that this is quite rare as many other orders go through fine.

 

I don't know why this is showing in sandbox category...I didn't choose that

Login to Me Too
2 REPLIES 2

MTS_Andre
Moderator
Moderator

Hi, can you send a specific log for a payment that "hangs"? In REST you first create the payment with /v1/payments/payment and then you execute it with /v1/payments/payment/PAY-123ABC456DEF789GHI/execute.

 

If you can send a log with either the payment creation or execution, the date it was attempted and the full response you received I can have a look in our logs.

Login to Me Too

mikevipe
New Community Member

I am also having this problem since February 2019.

 

I was not sure if it was allowing communication so I did a test I knew would fail when the amounts do not add up, so it is communicating:

[16-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : INFO: GET https://api.paypal.com/v1/vault/credit-cards?sort_by=create_time&sort_order=desc&external_customer_i...
[16-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : INFO: Response Status : 200
[16-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : INFO: GET https://api.paypal.com/v1/vault/credit-cards?sort_by=create_time&sort_order=desc&external_customer_i...
[16-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : INFO: Response Status : 200
[16-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : INFO: POST https://api.paypal.com/v1/vault/credit-cards
[16-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : INFO: Response Status : 201
[16-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : INFO: GET https://api.paypal.com/v1/vault/credit-cards?sort_by=create_time&sort_order=desc&external_customer_i...
[16-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : INFO: Response Status : 200
[16-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : INFO: GET https://api.paypal.com/v1/vault/credit-cards?sort_by=create_time&sort_order=desc&external_customer_i...
[16-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : INFO: Response Status : 200
[16-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : INFO: POST https://api.paypal.com/v1/payments/payment
[16-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : INFO: Response Status : 400
[16-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : ERROR: Got Http response code 400 when accessing https://api.paypal.com/v1/payments/payment. {"name":"VALIDATION_ERROR","details":[{"field":"transactions[0]","issue":"Item amount must add up to specified amount subtotal (or total if amount details not specified)"}],"message":"Invalid request - see details","information_link":"https://developer.paypal.com/docs/api/payments/#errors","debug_id":"5505[Removed. Phone #s not permi...https://api.paypal.com/v1/vault/credit-cards?sort_by=create_time&sort_order=desc&external_customer_i...
[16-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : INFO: Response Status [Removed. Phone #s not permitted]/p>

 

However when everything DOES add up, I process the order and my credit card is indeed charged and the funds added to paypal, so paypal is receiving the information and charging but not passing back?


[16-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : INFO: POST https://api.paypal.com/v1/payments/payment
[16-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : INFO: Response Status : 201

 

Any help is greatly appreciated.

Login to Me Too

Haven't Found your Answer?

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