View Full Version : Hi, I am trying to make a custom button for a site...
08-28-2012, 07:47 PM
Hello, I hope somebody can help me out.
I am trying to create a PAYPAL 'buy now' button which does the following (it's vaguely like an auction):
- When clicked on and item bought the price will be, for example, £1.00. Once the sale is complete, the item may not be bought again for £1.00.
- Automatically when the next user clicks on the button and completes a purchase it will automatically be for £2. For the third, £3 and so on.
- I would like this to occur so no two people can buy for the same price, it will be ever increasing.
Any ideas? With basic designing I am ok, but this is out of my depth.
Thank you in advance everyone :)
08-29-2012, 06:23 PM
Lets say four people are looking at the same item for 1.00 and user A clicks buy now. How do the others know the price went up even if we do program the button for you?
Look at ajax push here: http://www.ape-project.org/
08-30-2012, 05:21 PM
if more than one person clicked buy the button when it said 1.00 then the first payment processed would be succesful and the second/third/fourth would be redirected with the button saying an updated number.
08-30-2012, 09:00 PM
OK that works for me.
Your page probably will have a picture of the item, a description of it, the price, and the button. You get this info from a DB called merchandise. These items are written into a form alone with a hidden item id number so they will be sent to the php file when the button is clicked.
When the buy me button is clicked the php it calls looks at the cost(price) in DB merchandise. If it's the same as the page we change it to the next higher value in the DB and proceed to write data to a purchase DB - that being the item, item number, cost and buyer with buyerID to link to his account.
If the price that was sent to the php via a $_POST method and the DB cost are different then we rewrite the page with the new price.
That should work.
08-31-2012, 04:34 PM
Wow, thank you!
Would you say this would be particularly difficult to produce? Really good information there.
08-31-2012, 04:42 PM
what about this
I press buy now and spend 20minutes flapping around on paypal
before I've actually paid for the item someone else has pressed buy now
if you increment simply by pressing the button before going to paypal, the price will go up regardless of whether it has been bought or not
if you only increment after payment has been received from paypal, then others can buy while you are in paypal, and multiple people can buy at each level of price
08-31-2012, 05:45 PM
Yes, that is very very true indeed... something that seemed quite simple to me clearly isn't at all.
08-31-2012, 06:10 PM
Would you say this would be particularly difficult to produce?
Depends on if you know php and can work with a database. If you can it's not difficult.
and multiple people can buy at each level of price was not in the original specs.
- I would like this to occur so no two people can buy for the same price,
08-31-2012, 06:27 PM
yes, so if you implement that route, people can buy at the same price and break the specs
08-31-2012, 06:34 PM
one possible way round this -
buy credits upfront for buying power through paypal
then you have credits to spend
when you press buy now, it reduces the amount of credits you have by the price, but the purchase is instant, and price can go up by say $1
that way, all your specs are met, but they have to buy credits beforehand through paypal to participate
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.