简体   繁体   中英

PayPal doesn't redirect to return URL anymore

What could be the problem that PayPal doesn't send me back to return URL after payment is completed? This stopped to work only on payments by credit card, everything is working with direct PP payment.

I use an iFrame and I get the completed payment message "Thank you for your payment", but the message is in iFrame and I want to refresh the whole page after the payment. So after the verification function:

$verified = $ipn->verifyIPN();

I am redirecting to another page using: header(); But it's not working on credit card payments.

Error:

Invalid 'X-Frame-Options' header encountered when loading 'https://www.paypal.com/hostedpaymentnodeweb/payWithCC': 'ALLOW' is not a recognized directive. The header will be ignored.

Also I tried this at the end of the PHP script:

echo '<script type="text/javascript">window.top.location.href = "https://www.test.com";</script>';

PayPal will redirect your buyer automatically to the URL that you have specify in your button code only when the payment made using PayPal account.

As mention from their site https://www.paypal-knowledge.com/infocenter/index?page=content&id=FAQ2056&pmv=print&impressions=false&viewlocale=en_US , this feature available only for PayPal payment upon successful completion.

If you're using Website payment standard also known as PayPal payment standard, I suggest you to pass variable name 'cbt' to customize the text that appear on redirection link so that those buyers (who're using credit/debit card payment) aware of this link.

You may refer to this link for list of custom variable that you can attach in your button code : https://developer.paypal.com/webapps/developer/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM