Jump to content


Photo

ASP probs- redirect?


  • This topic is locked This topic is locked
10 replies to this topic

#1 Guest(old)

Guest(old)

    Junior Member

  • Members
  • 312 posts

Posted 25 November 2002 - 08:08 AM

Hi, everyone. Sorry to bother you, this may be easy, but I have lost a week in dev trying to solve it. Customer is buying a generated report, a series of pages off a lead .asp page, populated with session vars. Everything works until I get to paypal. Based on the information I recieve in the IPN, I want to present 1) the proper lead/review pages, 2) a pending HTML to wait, or 3) a sorry-but-you-failed page. Redirects (the simplest for me, by far), don't work. I am only a moderate ASP programmer and know nothing about cgi. Now what? I appreciate the help!! George

#2 DaveC

DaveC

    Advanced Member

  • Members
  • PipPipPip
  • 37 posts

Posted 25 November 2002 - 09:33 AM

The IPN is a backend page to verify the trqnsaction from paypal. You cannot redirect from this page, as it will send a 300 reply to paypal, therefore breaking the IPN as paypal are looking for a 200 reply.

The real only way you can do it (there are two ways, but one needs trust)
1. In the IPN, send an email with the URL that you want the customer to go to.
2. (The trust one) give the URL in the normal thank you screen at the end of the transaction.

Dave.

Web development - http://www.revilloc.com

#3 Guest(old)

Guest(old)

    Junior Member

  • Members
  • 312 posts

Posted 25 November 2002 - 10:17 AM

Thanks for the reply, Dave. But I must be missing something. In the URL oriented one, where I tell PayPal to return the successful sale as a thank you page, are you saying the IPN has happened, and my end has responded, and now they go to the thank you page? And, of course, if it does not work, will paypal send it to the cancel URL in the IPN code? I guess I need to know how to get them to those URLs. Are those the same as the PayPal button original submissions? Thanks again. Wish I was a lot stronger in this stuff... George

#4 DaveC

DaveC

    Advanced Member

  • Members
  • PipPipPip
  • 37 posts

Posted 25 November 2002 - 11:07 AM

Quite often, the IPN has completed straight away. It is a background process and therefore is extremely difficult to tamper with (unless you can get into the network, but that is another issue altogethor)

What you could do, is during the IPN, set a flag in the customers table. When that customer gets to their thank you page, you could read this flag and send them to the URL. However, you need a scenario if the IPN has not yet been called yet. For example, you could ask the customer to refresh the thank you page after 5 minutes, or take the easy option, send them an email (sent automatically during the IPN process) with the link.

The thing to remember is that the IPN will not be seen by the customer. It is a verification and response page designed to be handled by the backend to verify the transaction.

Dave.

Web development - http://www.revilloc.com

#5 Guest(old)

Guest(old)

    Junior Member

  • Members
  • 312 posts

Posted 25 November 2002 - 11:49 AM

Thanks again, Dave- I am looking into the Win 2000 ASP (my server uses Win 2k) that allows execute and transfer to redirect from within an ASP page, without the ramifications of the redirect command. Ever use either one? Meanwhile, thanks again, and I will get to work on SOME KIND of solution... George

#6 DaveC

DaveC

    Advanced Member

  • Members
  • PipPipPip
  • 37 posts

Posted 26 November 2002 - 02:03 AM

If you are using the IPN to redirect, then the paypal verification will fail, as a redirect will send a 300 response rather than a 200. (In fact, I think the response is 304)

Apart from that, the site visitor never sees the IPN page. It is purely for paypal transaction purposes. You have nothing to be gained by redrecting an IPN page, as your visitor will never see it.

The only options left to you to give your visitor the code is either in email, or check the status of the transaction on your thank you page.

Dave.

Web development - http://www.revilloc.com

#7 nuander

nuander

    Member

  • Members
  • PipPip
  • 10 posts

Posted 29 November 2002 - 08:02 AM

I have been working on this one problem for a over a week now. You guys seem to be on the track to solving so here goes...

Problem
A) How do you give the customer feedback on the outcome of the payment. ie "we got your money and we are sending you..."
B) As far as I can tell, PayPal DOES NOT automatically redirect the customer to my return or cancel_return pages. The customer has to click on the small and vague "Click here to contine" at the bottom of the PayPal payment summary page. This is highly unreliable.
C) Leaving your customer uninformed until they click on an email link is UNSATISFACTORY.

Solution
Use my ipn processing page to send them back to my site. Sounds like your saying this won't work. But you discussion raises 2 questions:
1) I don't see why the http 200 response is an issue if my ipn page does the redirect AFTER sending the verification to PayPal?
2) Would the redirect really go to my customer's web browser, or would it just go back to paypal?

Thanks


#8 DaveC

DaveC

    Advanced Member

  • Members
  • PipPipPip
  • 37 posts

Posted 29 November 2002 - 10:53 AM

Hi,

The IPN is a backend process. Think of it as you have ordered something with your companies account.

The company you have just ordered it from has phoned your finance director to confirm the transaction.

You have no party to the backend transaction, just like the IPN process, therefore, you cannot redirect your customer because the transaction is detached from their browsing experience (i.e. there is no physical connection to your customer anymore).

For A)
You could do 1 of 2 things...
1, the most favoured. Send the customer an email with the transaction details. This is handled by your IPN page.
2, Much less reliable, as you have already realised. When they press continue at paypal to return to your site, you can check if the IPN has already been processed. Most of the time it has. If it has been processed, then tell them the order is being processed. If not, then tell them that you are awaiting confirmation and they should get an email very soon.

For B)
That is correct. Not much can be done about the process. It is down to the customer to complete. However, what Paypal could do (that i have seen elsewhere) is to "screen-scrape" your receipt page and put it inside their page. During the screen-scrape process, they send transaction details as well so that you can see what is happening.

For C)
You have not quite grasped the idea.
In the email, tell them about the transaction. You control what to put in it. The email only gets sent during your IPN phase. If there is a problem, the IPN will send your customer an email telling them. If it is succesful, your IPN page will tell them that all is well.

You might as well send yourself an email as well during this IPN stage.


For 1)
Simply because the IPN process runs on a different line to what your visitor is on. The IPN is effectively somebody else (automated) looking at your website. Your customer has absolutely no contact with it, therefore you cannot send your customer to another page by asking the IPN to send them there.

For 2)
If a redirect would work, then it would go to paypal, but it doesn't work, so it won't.

Hope this has answered your questions.

Regards.
Dave.

Web development - http://www.revilloc.com

#9 paypal_pb

paypal_pb

    Advanced Member

  • Members
  • 2,960 posts

Posted 29 November 2002 - 12:54 PM

You should update your database and/or trigger fulfillment based on the "notify_url".

The "return" URL, which is where customers go upon clicking the (un-vague, imo) "Click here to continue" button will also transmit all of the IPN variables which you can read in order to give the buyer a personalized confirmation page. Only a very small fraction of buyers will not press the "Continue" button.

Patrick Breitenbach
PayPal, Inc.
Dev Net: https://www.paypal.com/pdn

#10 nuander

nuander

    Member

  • Members
  • PipPip
  • 10 posts

Posted 30 November 2002 - 05:11 AM

DaveC - Thanks for that detailed and highly informative explaination.

paypal_pb - Please don't take my use of the word "vague" personal. As a developer I have to design to the "lowest common denominator".

Thanks All

#11 rmunson

rmunson

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 12 January 2003 - 08:00 PM

Is there something specific that needs to be included on the "return" page?

Everything works for me, and when they click the Continue button, it tries to display my given "return" page, but it just diplays as an HTTP 405 error.

If I just enter my "return" page URL, the page diplays just fine. It is only when it when opening that page via the Continue button that it doesn't work.

Any ideas?

Ryan Munson




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users