PayPalPDTHandler.aspx not redirecting

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
11/8/2010 11:26:03 AM
Gravatar
Total Posts 25

PayPalPDTHandler.aspx not redirecting

Hello,

I need some help. I have followed the paypal standard info for setting up the ecommerce site and store. I can successfully purchase my product via checkout and on to paypal's site. However, after purchase on paypal, the link to return to my site is just sitting on paypalPDTHandler.aspx. Is this expected behavior? I would expect to be redirected to an order confirmation page.

Details:
I am using it on a multiple site setup where the child site (/Data/Sites/2) is the one with the store and (/Data/Sites/1) has no items to buy as it is my brochure site.

I followed instructions for setup at: http://www.mojoportal.com/using-paypal-standard.aspx

My return URL is: http://www.lazy-admin.com/Services/PayPalPDTHandler.aspx. It did look like there were querystring parameters in the URL but it just sat on the page instead of redirecting to a confirmation page.

Thanks,

Scott

 

11/8/2010 12:13:29 PM
Gravatar
Total Posts 18439

Re: PayPalPDTHandler.aspx not redirecting

Hi Scott,

Without seeing the actual url parameters it is hard to know for sure, but I can say that there have been a few orders in my store recently where it seems like there has been some glitch at paypal where the query string params were duplicated in the url ie the same params included 2 times and this causes it to not obtain the parameters correctly because the result is like an array for each parameter rather than the expected single value.

Most orders have come through fine, but one or two times in the last week this happened. To me it seems like a bug at PayPal.

Luckily if you also setup IPN (Instant Payment Notification) the notification of payment is redundant so it still sends the user an email with the link to the order. 

Best,

Joe

11/8/2010 2:20:13 PM
Gravatar
Total Posts 25

Re: PayPalPDTHandler.aspx not redirecting

Well the issue for me is that I need to handle the return confirmation so that I can generate some keys based on the successful purchase of the order. In my case, they could order 1 or many sets of keys.

What is the best way to handle that? Modify the PayPalPDTHandler.aspx page and then redirect to my own confirmation page? I need to be able to iterate through the orders and I need to make sure that the payment was actually made and not canceled.

Thanks,

Scott

11/9/2010 6:28:06 AM
Gravatar
Total Posts 18439

Re: PayPalPDTHandler.aspx not redirecting

Hi Scott,

your question has now changed to a developer question not a question about site administration.

If you are a skilled ASP.NET developer and able to work with the source code in Visual Studio 2010 and produce your own builds, then you could ask this question in the developer forum and I can at least give you an idea of one way to try and accomplish your goal without forking mojoPortal code.

Best,

Joe

11/9/2010 8:41:46 PM
Gravatar
Total Posts 25

Re: PayPalPDTHandler.aspx not redirecting

Here is the URL....2nd straight time it is blank. Though I had a friend try it and it correctly took him to the confirmation page.

 

https://www.lazy-admin.com/Services/PayPalPDTHandler.aspx?tx=9K579114XU325245S&st=Completed&amt=9.90&cc=USD&cm=3c58cf8e%2d09e3%2d44af%2dae46%2d3ffb7f682820&item_number=&tx=9K579114XU325245S&st=Completed&amt=9.90&cc=USD&cm=3c58cf8e%2d09e3%2d44af%2dae46%2d3ffb7f682820&item_number=

 

Does this tell you why it's not redirecting correctly? I will start a thread on best way to make modifications to paypal page after I resolve this.

11/10/2010 9:07:10 AM
Gravatar
Total Posts 18439

Re: PayPalPDTHandler.aspx not redirecting

Hi Scott,

Yes, although it is clipped here in the forums, it was clear in the email notification that the url has duplicated parameters, so it is the same problem I mentioned and seems to be a bug on the paypal side of things since they are redirecting with this url.

If you look closely (not here since it is clipped and not visible but at your original url that you posted) you will see that the parameters are all included twice in the url.

From a little googling, it seems this problem has happened in the past with paypal as well.

http://paypaldev.org/yaf_postst13645_PDT-Duplicate-Return-URL-Variables.aspx

and

https://www.x.com/thread/35699

So it seems like an old paypal bug has resurfaced.

Best,

Joe

11/10/2010 9:16:16 AM
Gravatar
Total Posts 18439

Re: PayPalPDTHandler.aspx not redirecting

Actually, I'm going to add handling for this since it can be mitigated and it seems in the past this problem was not resolved quickly by PayPal. There was some sample code in the second link that gave me an idea how to work around it.

Best,

Joe

11/10/2010 9:57:17 AM
Gravatar
Total Posts 25

Re: PayPalPDTHandler.aspx not redirecting

Joe,

You nailed it. It is a paypal issue. I can't believe people were complaining about this back in 2007 and now it's happening again.

If you wouldn't mind, please post your solution to solve this via code or send me an email with your fix. I'm on my on version of the 2.3.5.4 release because I had to get the site up and running asap.

On a different note, I just want to say Thank you! You really have built a great product and I can't believe it's free. You code exactly as I would code (well maybe a little better than I would code it) so it was pretty easy for me to dive in and start making changes as needed. You blow DotNetNuke out of the water in terms of performance and I love how everything you need is pretty much already included without downloading and installing a ton of modules.

I've built 2 sites. My company website and my product website in the span of about a week and a half. Pretty impressive I think.

http://www.ntunedev.com/
http://www.lazy-admin.com/

We will be releasing our product to the new Zune marketplace for windows phone sometime today or tomorrow. If you're interested and you have a new windows phone 7, let me know and I'll give you a free license key.

Thanks,

Scott

11/10/2010 10:16:45 AM
Gravatar
Total Posts 18439

Re: PayPalPDTHandler.aspx not redirecting

Hi Scott,

My change is already in the source code repository. Look in the LoadParams method here

http://mojoportal.codeplex.com/SourceControl/changeset/view/584094dd75c3#Web%2fServices%2fPayPalPDTHandler.aspx.cs

Best,

Joe

12/28/2012 7:13:01 AM
Gravatar
Total Posts 13

Re: PayPalPDTHandler.aspx not redirecting

I am having a similar problem, although it is not parameters being posted twice.  I tried developing my own membership system using the "Subscribe" button hosted by PayPal and the code samples provided by Joe.  Everything seemed to be fine on the PayPal side, but when PayPal redirected back to my site, the PDTHandler page just sat there doing nothing (white page).  I figured I was doing something wrong in code that I couldn't figure out (I have a deadline to get this site done), so I purchased the Site Membership Pro.  Installation went perfect....  I set up my test membership product, and went through the purchase process.  EXACT same thing as with my own code!

This is the url that was showing in my browser (with my test membership product):  mysite.com/Services/PayPalPDTHandler.aspx?tx=5RH12952HH858031W&st=Completed&amt=0.01&cc=USD&cm=ef258316-77f8-4f91-b4c3-e1155563d71e&item_number=


MojoPortal Version: 2.3.9.3 MSSQL
Operating System: Microsoft Windows NT 6.1.7601 Service Pack 1
ASP.NET Info: Running in Partial Trust
Server Time Zone: Central Standard Time
Server Local Time: (GMT -6) 12/28/2012 7:07:19 AM
Greenwich Mean Time: (GMT/UTC)12/28/2012 1:07:19 PM

sts-SiteMembership: 1.0.0.7

I have gone over and over the code to try and see what was going on, but I have absolutely no clue.  I have no idea what PayPal is supposed to be sending to the PDTHandler, and trying to find info on their site is painful.  Any ideas, guys?
 

 

12/28/2012 7:29:53 AM
Gravatar
Total Posts 18439

Re: PayPalPDTHandler.aspx not redirecting

Are you seeing any clues in the mojoPortal log under Administration > System Log?

Note that Site Membership Pro does not currently support recurring payments, so if there is something configured in your paypal account to do something with recurring payments Site Membership Pro is not currently built to handle that if PayPal is sending some kind of different information back. It currnetly handles only single payments and it can send reminders to renew membership.

Basically the way the PDT and IPN handler works is that the order is serialized into the mp_PayPalLog table and the log guid is passed to PayPal. Then when paypal posts back it includes the log guid so we can lookup the log row which also has data about which provider (ie feature) should process the transaction and then it loads that provider and passes in the data. The PDT Handler must also be defined in a file in the /Setup/ProviderConfig/paypalpdthandlers folder, there should be a file in ther corresponding to Site Membership Pro, that file is what it uses to load the provider listed in the log table.

You must sign in to post in the forums. This thread is closed to new posts.