Fix for mysterious reports of PayPal not working

  • jeff@marymoor.com
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 4 months ago #12861 by jeff@marymoor.com
Fix for mysterious reports of PayPal not working was created by jeff@marymoor.com
I was hearing from users that PayPal was "crashing" when they clicked the Event Booking button that redirects to PayPal. I spent substantial time trying to understand the problem but was never able to reproduce it.

I finally discovered that a partner web site had a link to our event registration page that many people were using. The trouble was that the parnter site uses frames, so the Event Booking page on our site was being displayed inside the frame on the partner site. Everything worked fine until the user clicks the payment button, and the PayPal chokes and shows an error, apparently because the IPN URL was a different than referring URL.

I found a super simple fix, which is to add a target="_top" parameter to the <form> tag within the os_paypal.php file:

<form target="_top" method="post" action="<?php echo $this->_url; ?>" name="jd_form" id="jd_form">

This redirects the whole browser to PayPal rather than just the frame in which our site is being displayed.

I asked the partner site to also add a "target" parameter to their link, but I decided this is a more robust fix, since I don't want to depend on partners to get their links right.

Please Log in or Create an account to join the conversation.

More
13 years 4 months ago #12862 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Fix for mysterious reports of PayPal not working
Great . Thanks for sharing the solution !

Regards,

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc