question concerning web payment standard button.

hocus
Contributor
Contributor

 I am setting up a payment button using the standard method. In using the button generator on the paypal merchant site, I notice you can enter a "return" url and a "cancel_return" url. What happens when a user's payment does not go through, where are they taken? According to the HTML variables for Website Payment Standard the "return" is used to redirected after completing the payment and the "cancel_return" is used if payment is cancelled. What if payment fails, how will I know this information. I think I am missing something. Do i need to use IPN or PDT to verify payment or is simply have the user come back to the site via the "return" confirmation that the payment processed. Thank you for your time and my apologizes if it's a dumb question.

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

Misty11
Advisor
Advisor

Hello hocus, 

 

Welcome to the Forums. 

 

When a payment fails, the customer will have to click the link that will direct them to your “cancel_return”url that you have specified in your code.  They have to click this link for them to be returned to the cancellation page. If this does not work  you can hop on over to the PayPal Developer Forum to get more answers.

 

Smiley HappyMisty

View solution in original post

Login to Me Too
4 REPLIES 4
Solved

Misty11
Advisor
Advisor

Hello hocus, 

 

Welcome to the Forums. 

 

When a payment fails, the customer will have to click the link that will direct them to your “cancel_return”url that you have specified in your code.  They have to click this link for them to be returned to the cancellation page. If this does not work  you can hop on over to the PayPal Developer Forum to get more answers.

 

Smiley HappyMisty

Login to Me Too

hocus
Contributor
Contributor

 Thank you. One more question. In what instance(s) is it necessary to use IPN? I am trying to understand the best way to update a payment flag in the database for a customer once they purchase through paypal. okay, two questions: Can I assume that if they come back via the return url that the payment has been successful and I can update the payment flag to yes and if they return via the cancel_return url they payment failed and the payment flag should be set to no. Do i even need to use IPN. Thank you.

Login to Me Too

Misty11
Advisor
Advisor

Hello hocus,

 

You are very welcome, I am glad I can help and hopefully this will all make sense because Instant Payment Notifications can be confusing.

 

Question 1:

 

 "In what instance(s) is it necessary to use IPN? I am trying to understand the best way to update a payment flag in the database for a customer once they purchase through paypal."

 

Instant Payment Notification is a message service that notifies you about updates to your PayPal transactions. You can use it to automate administrative functions, such as fulfilling orders, tracking shipments, and providing status updates.

 

Question 2:

 

"Can I assume that if they come back via the return url that the payment has been successful and I can update the payment flag to yes and if they return via the cancel_return url they payment failed and the payment flag should be set to no. Do i even need to use IPN."

 

Yes, it sounds like you have the  process down, if you do have more questions or just want to clarify you can click here to go to the IPN PayPal page.

 

Smiley HappyMisty

Login to Me Too

hocus
Contributor
Contributor

Seriously this will hopefully be the last question. You have been so helpful, thank you. It just occurred to me that someone could after making their payment via paypal close the window/browser and not click the return button, in which case I will not have the opportunity to update the database that payment was recieved. Any suggestions? Is this where IPN would be handy. If the database doesn't get updated to Yes and the user tries to login to the Member Section of the site (which they just paid for) their login will fail. Thanks Again.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.