PayPal Buy Now - how to update my db once payment has been made

Discussion in 'PayPal' started by ten, Apr 28, 2007.

  1. #1
    I've got a site that lets people create their own webpage. When they're done they can pay to make it public. There is no shopping cart on my site and i thought i would use paypal's Buy Now button to handle the transaction. This works if i want to manually make each customer's webpage public once i receive payment (i would simply pass their user name and webpage id to paypal as options in the buy now button).

    But obviously it would be better if the process was automatic - ie: the user pays and pay pal sends the user to a page with a variable in the url that i can use on my end to recognize that the payment was made and then make thier page public. I originally thought i would use the return url variable in the buy now button for this but it is visible in the html so it would be easy for a user to 'trick' my system into believing a payment has been made.

    Is there a way to do what i want with Pay Pal's Buy Now Button?

    If not is there another company / service that would?

    Any insights greatly appreciated .. i've tried calling paypal on this but they offered little info.
     
    ten, Apr 28, 2007 IP
  2. eddy2099

    eddy2099 Peon

    Messages:
    8,028
    Likes Received:
    568
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well, actually it is not that difficult, you create a Buy Now button and set it to the unencrypted mode, you will see it is just a HTML form where you can change the various variable settings to suit your needs. So in your script, you just need to populate it with the relevant information.

    Here is one the Buy Now button in HTML codes

    You just need to get your script to populate the items in bold and that should do the trick.
     
    eddy2099, Apr 28, 2007 IP
  3. ten

    ten Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the reply eddy2099.

    If the return url, and the variables about which user and page to make public are all in the html for the buy now button wouldn't that allow anyone to just skip the buy now button and just send those variables to that url to trick it into believing a payment has been made?

    ... or is there an encrypted mode where none of this info is visible in the html page?
     
    ten, Apr 29, 2007 IP
  4. eddy2099

    eddy2099 Peon

    Messages:
    8,028
    Likes Received:
    568
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I am not sure what encryption Paypal is using so that can be an issue. I re-read your posting and you are more concerned about what happens after the transaction is made, I supposed that is where the Instant Payment Notification (IPN) comes into play, Paypal does have some API which you can use for that. Check out https://www.paypal.com/IntegrationCenter/ic_home.html .

    So far, I am using encrypted mode myself but they are fixed contents.
     
    eddy2099, Apr 29, 2007 IP