Paypal Redirect after payment

Discussion in 'Programming' started by adamjblakey, Apr 5, 2007.

  1. #1
    Hi,

    What i am after doing is adding a feature into my site which sends a user to pay pal and when returns goes to e.g thankyou.php. But what i need it to do is return some information about what they have bought as i need to add what they have bought back into the database.

    Cheers,
    Adam
     
    adamjblakey, Apr 5, 2007 IP
  2. bdude

    bdude Peon

    Messages:
    124
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You need PayPal IPN integration. Have a look at PayPal's docs
     
    bdude, Apr 5, 2007 IP
  3. garye

    garye Active Member

    Messages:
    79
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    93
    #3
    I also recommend getting a paypal developer account at hxxp://developer.paypal.com to test IPN.

    I've had a lot of trouble with IPN in the past ~ it's not an ideal in my opinion and really for long term you want to be thinking about a merchant or vendor.

    Gary
     
    garye, Apr 5, 2007 IP
  4. NetworkTown.Net

    NetworkTown.Net Well-Known Member

    Messages:
    2,022
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    165
    #4
    Well i use DlCart it dose exactly what you want plus it has a admincp system.
     
    NetworkTown.Net, Apr 5, 2007 IP
  5. adamjblakey

    adamjblakey Active Member

    Messages:
    1,121
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    80
    #5
    I did not explain what i was fully going to do with this properly.

    Basically the site will be selling ads and what i want it to do is if someone wants to buy an add on e.g. abcde.com then they will pay the owner of that website into their paypal. This will then come back to my site so that i can add a record of the transaction for user rating.

    Cheers,
    Adam
     
    adamjblakey, Apr 5, 2007 IP
  6. bdude

    bdude Peon

    Messages:
    124
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Do you need any information back from PayPal or just a url for the user to go to when the sale's done? Because you can do that when you make a button as well as set a url for if the payment's unsuccessful
     
    bdude, Apr 5, 2007 IP
  7. adamjblakey

    adamjblakey Active Member

    Messages:
    1,121
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    80
    #7
    I need the full url of the site that they are buying links on, this way i can query that against which user it is that they are buying from.
     
    adamjblakey, Apr 6, 2007 IP
  8. aras

    aras Active Member

    Messages:
    533
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #8
    You can not get information from a paypal payment that is not made into your account. Unless the paypal address owner sets it up in their configuration.
     
    aras, Apr 6, 2007 IP
  9. adamjblakey

    adamjblakey Active Member

    Messages:
    1,121
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    80
    #9
    This can be done and i have worked it out.

    It is quite simply actually, when you set-up the form for paypal to return to. You simply site up a GET on the return url so it sends this to paypal.

    <input type="hidden" name="return" value="http://www.domain.com?id=<?php print $id; ?>">

    Works a treat :)

    Adam
     
    adamjblakey, Apr 7, 2007 IP