close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Mark items Sold after PayPal payment

Thread began 2/24/2012 10:24 pm by troyd | Last modified 2/27/2012 11:09 am by troyd | 2897 views | 4 replies |

troyd

Mark items Sold after PayPal payment

What is the best route to take if items need to be marked sold after a PayPal payment is complete?
These are one of a kind items, so inventory is always just one of each item.
Right now, the database has a column for each item that is called "Status". It's either "Available" or "Sold".

Currently the user uses a "Buy Now" button, fills out their information, goes to PayPal and pays. The problem is that some items end up being purchased more than once and that needs to be addressed.

Ideally, they would pay at PayPal and the item would be marked "Pending" followed by "Sold" once the payment was confirmed.

I'm confused about the process. Is PayPal Standard ok or do they need Pro.

Thanks,
TroyD

Sign in to reply to this post

Jason ByrnesWebAssist

doing this with paypall standard is problematic and not very easy.

when the checkout page posts to the confirm page, the order summary and details are stored in the database, you could update the product table at this time also, then the user goes to paypal for payment and is returned to your site after completing payment.


the problem with standard, is that it is not a real time gateway. you need to configure an IP page that will accept the IPN post from paypal once the transaction goes through and update the product to sold at that time.



with payments pro, it's much easier, because it is a real time system, when the confirm page posts the details to the paypal gateway, the transaction is processed, if the funds are successfully sent to your account from the merchant bank, the order summary and details are stored, you could update the product status to sold at this time.

Sign in to reply to this post

troyd

Thanks Jason,

This particular client uses PP Standard but I will encourage them to move towards the Pro account. But in the mean time, if I were to continue with the Standard setup, please tell me if I have the workflow correct.

With a PayPal Standard account using the IPN, the checkout process would be the same as usual, (Products page > Shopping Cart Page > Checkout page > Confirm page > PayPal site).
...then following the completion of the PayPal payment, they would be sent to the "Thank You" page back at the site, and at the same time a notification would be sent to a separate hidden page (IPN).
That IPN page would then have some kind of Update behavior on it that would mark the item's table column for Status as "Sold"? Is that a correct summary?

If this is correct, do I simply use the sample IPN code that PayPal has for PHP on their site as a starting point and then add the recordset and Update behavior?

I know that within the PayPal account their is a location for me to enter the URL for the IPN page once I create it, but do I also need to include any information back at the checkout form for this part?

Thanks,
TroyD

Sign in to reply to this post

Jason ByrnesWebAssist

  then following the completion of the PayPal payment, they would be sent to the "Thank You" page back at the site, and at the same time a notification would be sent to a separate hidden page (IPN).  



you have the flow right up to this point. the timing of the post to the ipn page is an unknown, it wont happen at the same time as the user being directred to the thank you page, it will happen at a later time. when the user is dierected back to the thank you page, the payment is entered into a queue for pay[al to process with the merchant bank, it may take a few seconds for the transaction to process, it may take minutes, or hours even.


  That IPN page would then have some kind of Update behavior on it that would mark the item's table column for Status as "Sold"? Is that a correct summary?  


Yes, that is correct

  If this is correct, do I simply use the sample IPN code that PayPal has for PHP on their site as a starting point and then add the recordset and Update behavior?  


you are correct again

  I know that within the PayPal account their is a location for me to enter the URL for the IPN page once I create it, but do I also need to include any information back at the checkout form for this part?  



no nothing special needs be done to the code on the site for IPN except for setting up the IPN receiving page.

Sign in to reply to this post

troyd

Thanks again Jason,

I am working on a test version using the PP Sandbox and will report back with any successes or failures. And I am sure I will have a few other questions.

Thanks
TroyD

Sign in to reply to this post

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...