Designing shopping basket using PHP code with MySQL Database - Payment Processing

Discussion in 'PHP' started by MattBOnline, Apr 6, 2011.

  1. #1
    Hi,

    I have visited YouTube and seen tutorials about building a shopping basket. Each tutorial has its' flaws but by viewing about 20 tutorials I think I can design my own version, with the features that I want.

    ONLINE PAYMENT PROCESSING COMPANY

    My query is about the linking of the basket contents with the Payment Processing Company such as WorldPay or SagePay. I am confident I can get the items added to the basket, added to the MySQL Database, prices calculated, etc.. Does there need to be any coding on my web site for the purposes of WorldPay or SagePage. Does the information get passed to them from my MySQL Database? Or is it separate from the database?

    POSTAGE OPTIONS

    Besides this query regarding passing data from my site to the Payment Processing Company I see another issue that you may have experience with. If I wanted to offer different rates of postage for different items I could include a field in my database called postage but if a customer buys more than one it would show more than one postage charge. Add on top of that the fact we can offer Saturday delivery, Delivery before midday, delivery before 9am, etc. I am not sure how best to offer these different postage options, without confusing the customer too much. Do you have any experience with handling postage options?

    Thanks for your help,

    Matthew.
     
    MattBOnline, Apr 6, 2011 IP
  2. rainborick

    rainborick Well-Known Member

    Messages:
    424
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    120
    #2
    Many online payment processors offer tools for developers that allow them to integrate payment services into their own applications through Application Program Interfaces (APIs). The APIs will certainly require information about each transaction, but that information does not necessarily have to reside in a MySQL database. And there are usually stringent legal requirements for storing credit card information in a local database, so you'll probably want to avoid doing so until you get more experience.

    Shopping carts generally deal with shipping costs based on the entire order, rather than individual items. This makes it easy to more accurately calculate the true shipping costs of multi-item orders, base the shipping charge on the value of the order instead of the weight, and more.

    You might want to try playing with a program like osCommerce or Zen Cart just to see an example of some of these issues. I'm not saying they do everything perfectly, but you'll at least see an example of how they could be handled. Good luck!
     
    rainborick, Apr 6, 2011 IP