close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

paypal confirm post back to site

Thread began 7/12/2010 5:32 pm by watercolor346374 | Last modified 7/15/2010 4:05 pm by Dave Buchholz | 10782 views | 9 replies |

watercolor346374

paypal confirm post back to site

Hi,
I have been in touch with paypal re once the customer reaches paypal pays and is either accepted or rejected how to have the customer automatically go back to the site and get the success or failure script so that the database is updated or not updated. They have said that IPN is the way to go. Is this the way to go with cart4 and dreamweaver cs3?
Thank you
I have been looking through other posts and maybe I am missing something...is it possible to code the confirm.php so that after the customers payment has been either accepted or rejected, the customer is automatically brought back to the site and the info is posted to the database? My client has a standard pp account.
I generated an ipn script and the databases. Now I am baffled, how does the ipn script and the confirm.php work together. With the ipn I am adding tables to my database and that script will post back to the site, what happens to the confirm and how do the two work together?

Sign in to reply to this post

Eric Mittman

When you are using Payments Standard one of the biggest limitations is knowing the status of the transaction when it occurs. The problem is that PayPal does not process the transaction immediately then send the user to either a failed or success page. When the user submits their payment the status of the transaction is unknown. PayPal only sends the user back to the return page that you specify. You cannot assume that the transaction was completed successfully just because the user gets to this page.

To confirm the transaction you need an IPN page. This page is a page that is never visited directly. It just sits in your site and waits for a response from PayPal. Sometime after the transaction has occurred PayPal will send the information along to this IPN page. It is up to you to set this page up to listed for the response and do what you would need to with the information given. Usually you would record the status in your db and then send out an email receipt to the customer.

I think that using Payments Standard with an IPN page is the most difficult way to work with PayPal payments and provides the most inconvenient shopping experience for the user compared to the other checkouts that PayPal offers. If it is at all possible I would suggest that your client go with a Payments Pro account and implement that checkout with eCart.

Here is a link to more info on IPN from PayPal:
ipn

Sign in to reply to this post

watercolor346374

confirm and ipn

You are saying that the ipn page would be the page that posts to the db not the confirm page? You are also saying that the ipn is not reliable? If my client does not want payments pro, then I will have to deal with the ipn. Can the ipn page, which I have the script for, be integrated with the confirm page or would it bring up the success page which would then create the posting to the db from the confirm.php script?

Sign in to reply to this post

Eric Mittman

With IPN there is not user experience that will result with the user going to a success or failure page. You will not know this at the time of the transaction.

You can store the order information when you are on the confirm page, but you cannot assume that the transaction has or will occur successfully. This is what you need to the IPN page to do for you. The page is one that will never be visited directly by a user, it will only ever be posted to by PayPal with the details of the transactions.

This is why you need to rely on this page to update the order status in your db. It is also a great place to add in an email receipt to let the customer know that the transaction occurred successfully and any other post processing stuff that you would like to do.

Sign in to reply to this post

AlaskaTomBeta Tester

Eric,
If you have auto return enabled on paypal, you will automatically be sent back to the page you specify, and paypal attaches a auth token to the querystring.

If you post this token back to paypal, and it matches, paypal will respond with an array of values containing all of the info about the transaction, including the transaction ID, payment type etc.
You can then match this data with your order id, double check that the amounts match, and that the status is SUCCESS, and then, based on that update your orders table, and send out the emails.

Tom

Sign in to reply to this post

watercolor346374

can you say more about this auto return and token

Hi Tom,
This is all new to me, since this is my second experience with paypal. How do you go about setting paypal to auto return if it is paypal standard or express. Also, what do you mean by the token...I am using the sandbox and testing site before I put this live.

Thank you

Sign in to reply to this post

Dave BuchholzBeta Tester

Do NOT rely on auto return for your DB processing, always use IPN for this as there are to many situations where the auto return is never completed but an IPN post will always be sent from PayPal whether it is a second or an hour after the transaction.

What I would do in your situation is on the page that you return the customer to after the PayPal transaction is completed is explain that they will get an email confirmation/receipt as soon as the payment is cleared.

Sign in to reply to this post

watercolor346374

confirm.php, ipn, express checkout

Thank you all for your input. Still not sure what direction to go in with this check out process. Which is the most reliable for the customer and store owner. IPN, express or auto return. If I go with IPN this is where I get stuck, I have the IPN script which updates the db's that pp has set up. Still stuck on how the client returns to the site after they click pay on paypal, and how the confirm.php kicks in to update the db tables. If I can figure out how to have the client return to the site (using IPN) and have a message that they will be notified when payment is approved, then how are the db tables updated, does the store owner have to update the db tables once payment is approved? Is express check out accurate? And if so, does return the client back to the site, with either the success or failure message.
Thank you

Sign in to reply to this post

AlaskaTomBeta Tester

Dave,
I did not know that. I have used autoreturn quite a bit, and validate the return to see if its an instant payment, and completed, and has a transaction ID, and it works just fine.

You are correct that IPN is definitely a better way to go, because it is not uncommon for customers to close their window before getting sent back to the site, and the DB being updated.
However, in that case, the merchant has the info in the database, with a status of pending, and if they get a matching paypal email, they can manually change the status to completed.

Not as elegant as IPN, but easier for many to set up.

Generally though, I steer clients to use a more robust payment processor like paypal pro, or authorize.net.

Tom

Sign in to reply to this post

Dave BuchholzBeta Tester

Tom,

Over the years I have experimented with all the various forms of PayPal and Auto Return has it's uses but I would never rely on it, but I agree Authorise.net, PayPal Pro etc. is the way to go.

Watercolor,

If you are unsure how to proceed my best advice would be to hire someone who understands how the payment gateway works and get them to complete that part of the project on your behalf. You are looking at a world of hurt if you get it wrong, trust me.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...