Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

purplelizzard

macrumors newbie
Original poster
Feb 8, 2007
28
0
I have a website where people make orders and then the payment is done through PayPal, the payments are of varying size, and the code for the PayPal pay button is generated with PHP. What I would like is to be able to know the ammount of mony that they payed with PayPal. Right now I have a custom field in the PayPal form that is the ammount that they owe. I then want to be able to retrieve this value. I tried using a POST on the return page, but it didn't work.

Any suggestions?
 

emorydunn

macrumors 6502
Jun 5, 2006
457
0
Austin Texas
What is the problem with using PayPal's button? then when someone give's you money you get an email with the amount. And if you don't want to use the ugly paypal button you can use your own. I think you are making this to hard, so unless I'm missing some key detail- don't try and script it yourself.
 

purplelizzard

macrumors newbie
Original poster
Feb 8, 2007
28
0
How I have it now is that every user has an account with a balance. When they make a purchase, the ammount of the purchase is added to the account balance, so they can pay it later. At the time of order, it is an option for them to pay for the order right away. If they do this, I want to subtract the ammount of the order from their balance so that they don't have to pay again. I would like to use PHP to do this, so every time someone makes a transaction, I don't have to manually edit the database.
 

rksprst

macrumors member
Jan 17, 2004
37
0
another way to do what you want:

have a regular button subtracting the amount from their balance when clicked using php code, then after the amount is subtracted they are asked to click on the paypal button to pay

so they just click two buttons
first your button, then the paypal

also try using a session instead of post, see if that works
 

purplelizzard

macrumors newbie
Original poster
Feb 8, 2007
28
0
If they press one and then don't press the other, their payment is subtracted without them paying anything. I have a temporary solution now, but it doesn't work perfectly. I would like to use IPN i think.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.