How could I accomplish this (payment system for website)?

Discussion in 'HTML & Website Design' started by TBBucs, May 8, 2008.

  1. #1
    Here's the premise of my latest project. A client creates an account (that part is done), then clicks on the "Post a listing" link, where they are directed to a page with a form to fill out (that part is done).

    Now for the part I don't know how to do:

    The user clicks a button to buy a credit, which redirects them to a PayPal page where they complete the transaction. One purchase like this gives the user one credit (the number of credits they have would be stored in the database). They can use these credits to post listings on the site.

    I know how to check for credits and either allow or deny them a listing, but I'm not sure how to go from the PayPal page to giving them a credit. Any ideas how I'd accomplish this?

    By the way, sorry if this is in the wrong forum, as it is heavy on PHP.
     
    TBBucs, May 8, 2008 IP
  2. itcn

    itcn Well-Known Member

    Messages:
    795
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    118
    #2
    Paypal has something called Payment Data Transfer with Return URL. After someone completes a transaction on PayPal, they get redirected back to a page on your website (the return URL) with the purchase info in the querystring. You can then log that data in your database to keep track of who purchased what & for how much.

    In your Paypal account click on Profile > Website payment preferences
     
    itcn, May 9, 2008 IP
  3. andymayo

    andymayo Guest

    Messages:
    652
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yea thats the feature im using on my site www.xninelivesx.com.. click donations on the top right.
     
    andymayo, May 9, 2008 IP
  4. TBBucs

    TBBucs Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Payment Data Transfer sounds like the way to go. But, reading through this page...

    https://www.paypal.com/IntegrationCenter/ic_pdt.html

    ...I don't quite understand how to implement it.

    I think I understand that bit, but how exactly do I "get" and use the transaction id? By using $_GET['transactionID']?

    So where exactly in my code does this form go?
     
    TBBucs, May 9, 2008 IP
  5. TBBucs

    TBBucs Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    TBBucs, May 9, 2008 IP
  6. itcn

    itcn Well-Known Member

    Messages:
    795
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    118
    #6
    Glad I could help!
     
    itcn, May 9, 2008 IP