Shopping Cart Best Practice and IPN with paypal

Posted on 2006-04-24
Medium Priority
Last Modified: 2013-11-29

Right this really is a high level question about creating shopping carts and intergrating with Paypal.

I have an online shop at the moment that has all the product in a DB with categories etc etc.  The site currently just pulls the details of the product from the DB and i put these details into a button that then uses the paypal shopping cart.  Now we are ready to integrate this fully into paypal.

I am have some ideas about how to do this so here goes....

Firstly i was planning on creating a new table called tblCart and creating some sort of unique session variable for a customer when they add the first product to a cart then use the same session variable each time after that. This would create the online cart that on the site.  From this i would then have a checkout option that transferred the entire cart details into an tblOrders and would then create a page to get the user to fill in their personal details (name, address, email, phone etc) and this would get populated into my tblCustomers and the new customer ID added into my tblOrders.

Once this customer has entered their personal detials the checkout option is displayed which will take them to the paypal payments page when they enter their credit/debit card details and make the payment, i then use IPN to send a message back to my server with the order number in say a querystring which i then upload the order record to status completed or pament ok or something along those lines.  This would then let me log into an admin panel and see all the orders which have been paid ok and pick/pack them and ship them, marking the order as dispatched along the way.  I am ok with moveing the data around and manipulating it once i get the payment confirm back.

Does this seem like a logical flow or have i totally missed a the point and am going in the wrong direction.

Once i know am thinking about this correctly then i will start to progress and will ask further questions along the way on a more technical level.

Question by:net-workx
LVL 10

Accepted Solution

slamhound earned 2000 total points
ID: 16530238
Yes, you are on the right track. There are many ways to do it but your method is logical and will work. Also, you have the added advantage that you don't lose the customer's order even if payment fails or is rejected.

Author Comment

ID: 16590790
Thanks for the help - just needed to get some confidence i was heading in the right direction...

Its going well at the moment - almost done just trying to get Paypals IPN to work...

Thanks Again,

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
Businesses who process credit card payments have to adhere to PCI Compliance standards. Here’s why that’s important.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question