Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    This little Earth.
    Posts
    383
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Generate PayPal buttons dynamically?

    I've built a shopping cart and now I need to direct users to PayPal to pay for their cart. I want to use hosted buttons, but I can't directly create them in the PayPal Merchant account since there's no fixed price for users' purchase - it'll be according to each user's cart total.

    I've been at this for days but can't find out clearly how to dynamically create hosted PayPal buttons, the Button Manager API on the PayPal website is just full of variables but how do we set it all up?
    'If you don't stand for something, you'll fall for anything.'

  • #2
    Regular Coder
    Join Date
    Nov 2012
    Posts
    109
    Thanks
    6
    Thanked 12 Times in 12 Posts
    How is a PayPal button normally generated? Is there some kind of HTML, JS or PHP code that you paste on your page? In that case you can just paste that code, but with a PHP variable replacing the price.

    Can you show us an example of the code in question?

  • #3
    Master Coder mlseim's Avatar
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,397
    Thanks
    8
    Thanked 1,078 Times in 1,069 Posts
    I think you will need to use Express Checkout ... look into that on paypal.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •