Greg Fennell
Greg Fennell

Reputation: 176

Getting 500 error in PayPal REST API

I'm using "paypal/rest-api-sdk-php" in my PHP application, been testing perfectly in the sandbox for past month. Moved to LIVE tonight to finish pre-prod testing and now getting this response.

[03-12-2014 01:46:32] PayPal\Core\PPHttpConnection: FINE: Response : {"name":"INTERNAL_SERVICE_ERROR","message":"An internal service error has occurred","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#INTERNAL_SERVICE_ERROR","debug_id":"9a4e0771d4d79"}

Any suggestions as I have searched and not found a suitable answer.

Here is the payload I'm sending (removed URL returns for safety)

PayPal\Core\PPHttpConnection: FINE: Payload : 
{"intent":"sale","payer":{"payment_method":"paypal"},"redirect_urls":
{"return_url":"XXX","cancel_url":"XXX"},"transactions":
[{"amount":{"currency":"USD","total":"37.50","details":
{"shipping":"0.00","handling_fee":"2.50","tax":"0.00","subtotal":"35.00"}},"item_list":
{"items":[{"name":"Full Event","description":"This is a full event membership","sku":"547e5ff327a7c","currency":"USD","quantity":1,"price":"35.00"}]},"description":
"Purchase from Site","invoice_number":"547e69aad333b"}]}

Upvotes: 0

Views: 1134

Answers (2)

Vimalnath
Vimalnath

Reputation: 6463

Looks like the item description from your request exceeds the maximum number of characters, can you post your complete API request. This is the error from the logs for this transaction

value too large for column ITEM_DESCRIPTION (actual: 142, maximum: 100),

Upvotes: 1

Jay Patel - PayPal
Jay Patel - PayPal

Reputation: 1489

Strangely, I was able to run the samples with a very long text, and it worked just fine on sandbox.

enter image description here

Upvotes: 0

Related Questions