CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Interesting PayPal problem

Print topic Send  topic

Author Message
saseow

Posts: 744
Posted: 02/08/2012, 11:14 PM

I have a PayPal 'Buy now Button' on a page with the successful return going to a page called thanks. The thanks page has code in the _events section that would never run when returned from PayPal. If you refreshed the page or simply typed in the URL without going to PayPal the code ran perfectly.

I have worked around this but wonder if anyone has an idea why this would happen?
View profile  Send private message
datadoit
Posted: 02/09/2012, 5:02 AM

What event are you using (Page Before Show, Page After Initialize)?

Do you have caching enabled on the page?

When returning from PayPal, are you returning to the .php page or the
..html page?

Do you have a DirectoryIndex value set for the web server?

Are you using any sort of web server rewriting (.htaccess)?

Look at your web server's access log to see what page is being accessed
and how and and from where (http referrer).

All things to look at.
saseow

Posts: 744
Posted: 02/09/2012, 5:27 AM

Hi datadoit,

The web server is my clients and I know it is a windows server running PHP.

Caching not enabled on the page
Returning to .php
Have no idea if directoryindex value set or not
No rewriting enabled in .htaccess
Cannot look at the access log.

Interesting that these could effect the situation I was in. I will have to research this some more as what was supposed to be a two hour stint lasted two days.
The way I got around it was to get the new users registered first and then stored their ID in a table. On returning to thanks.php I made them login and only then checked the table to see if they had just returned from PayPal and ran the script if they had.

It was a hair puller for certain. I will do some research on your points. Thank you very much!
View profile  Send private message
saseow

Posts: 744
Posted: 02/09/2012, 5:28 AM

btw, the code was in the before show event.
View profile  Send private message
datadoit
Posted: 02/09/2012, 6:27 AM

I suspect PayPal is returning to the .html versus the .php. You can
validate that by putting a label on the page. If you see the
{YourLabel}, then you know it's loading the .html.
saseow

Posts: 744
Posted: 02/09/2012, 6:46 AM

Interesting! The success page on PayPal is entered as thanks.php. Perhaps that means naught to PayPal. I will have to check.

Thanks datadoit. Really appreciate your thoughts!
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.