Blank page after payment succeeded and status code 500 in sandbox env

partidea
Contributor
Contributor

I'm trying to implement a recurrent payment with PayPal. I'm testing everything with the sandbox accounts.

The payment process goes well and I can see inside the "Sandbox emails and SMS notifications" the payment notification but after the payment, the paypal site tries to call www.sandbox.paypal.com /webapps/billing/api/billagmt/subscriptions/v1/BC-.../landingPage with

meta {"calc":"20[Removed. Phone #s not permitted]ce3901","locale":{"country":"IT","language":"it","locale":"it_IT"},"state":"ui_subscriptions_v1_complete","app_name":"billingnodeweb"}

and it receives Status code 500 Internal Server Error with this json response:

 

 

 

 

{"ack":"error","message":"Unhandled api error","meta":{"calc":"789c0f8a52f70","rlog":"rZJvnqaaQhLn%2FnmWT8cSUo8QXTeqJkzg7PvyMHtc7jCbO2%2Bj5MlJN8Ud4vOAhfzaFGpLU%2FGPkfHKN5kgGzYz5A_174bb5796d1"},"server":"ZOf3A3Y9KKIZUofpdqrMVdnpWgmhumyF_9wVbr7jIDY1e3RMcEoctE4EVOSXBXFoqJf3h7uJDvUpMMVMfY-OTuq0fsJwNfllDaZjybsbd3xW0QVRuSB9tIPIwn4B1jseJMUqiZ79F7oiH3pSnsaNQ4h7TjUOuQmEx6oaHVHXluTC-laDM-7E5m4Qt-d2eZ1JjJL-ZXDx7[Removed. Phone #s not permitted]eVDrkW"} 

 

 

 

After this error, the page remains blank and it doesn't call the "return_url" on my website.

Do someone knows what it can be? To test my web site I'm using ngrok with https.

The paypal button is created as:

 

 

 

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">

<input type="hidden" name="cmd" value="_xclick-subscriptions" id="id_cmd">

<input type="hidden" name="charset" value="utf-8" id="id_charset">

<input type="hidden" name="currency_code" value="EUR" id="id_currency_code">

<input type="hidden" name="no_shipping" value="1" id="id_no_shipping">

<input type="hidden" name="business" value="<email>" id="id_business">

<input type="hidden" name="a3" value="320" id="id_a3">

<input type="hidden" name="p3" value="1" id="id_p3">

<input type="hidden" name="t3" value="Y" id="id_t3">

<input type="hidden" name="src" value="1" id="id_src">

<input type="hidden" name="sra" value="0" id="id_sra">

<input type="hidden" name="no_note" value="1" id="id_no_note">

<input type="hidden" name="item_name" value="subscription" id="id_item_name">

<input type="hidden" name="invoice" value="f0175278-57b8-4f20-961c-b0e0e1e51f3a" id="id_invoice">

<input type="hidden" name="custom" value="1" id="id_custom">

<input type="hidden" name="amount" value="320" id="id_amount">

<input type="hidden" name="notify_url" value="/path/to/notify/url/" id="id_notify_url">

<input type="hidden" name="cancel_return" value="/path/to/payment-cancelled/" id="id_cancel_return">

<input type="hidden" name="return" value="/path/to/payment-done/" id="id_return">

<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" name="submit" alt="Buy it Now" border="0">

</form> 

 

 

Any suggestions would be greatly appreciated.

Thank you.

Login to Me Too
2 REPLIES 2

chillaz
Contributor
Contributor

I'm having a similar problem too. I'm using the paypal html standard IPN subscription form in sandbox. The subscription transaction is completed with the IPN sending back the data that gets inserted into the database, but the 'return' page is not returned, but what is returned is a blank white webpage. I checked the code of the blank white webpage and what I continually saw on the [window.PRELOADED_DATA] line was the following code:

 

"urls":{"return_url":"https://...urladdress.../return_page.php?token=4X024855RJ139170E","cancel_url":"https://...urladdress.../cancel_page.php?token=4X024855RJ139170E&ba_token=BA-8E011934EH6530506","original_urls":{"return_url":"...urladdress.../return_page.php"

 

Keep in mind, my form's return is written 'return', which is required for this form, but in the code above, it is written as 'return_url'. I also have the 'cbt' line for the caption override for "Return to Merchant" button.

 

In my sandbox admin console, the auto return is set to no. The problem is only happening to the 'cmd', '_xclick-subscriptions' forms and not the other forms. I put in a ticket for this problem the other day, but if anyone else knows how to fix this problem, I am all ears.

Login to Me Too

chillaz
Contributor
Contributor
Partidea, shouldn't your src for the cmd = _xclick-subscriptions be 2 instead of 1?
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.