Hi all,

I've setup a simple cart where users choose how much they would like to deposit as virtual currency using the PayPal sandbox - I've tested it and it works great. So far I've got to successful money transfers between accounts and notifications.

However what I can't figure out is how to give the account on my website the virtual credit after the user pays. I want to store the value in a SQL column next to their username; doing so is easy - but how do I execute that SQL command only when a user has genuinely paid?

To clarify, this is a script that allows users to deposit money to their website account using paypal - I've got as far as the transactions (sending and receiving the money) and notifications. What I'm stuck with is adding the transaction value to the users account on my website.

Can anyone with previous experience please assist?

Thanks!

Recommended Answers

All 4 Replies

Member Avatar for LastMitch

@mmcdonald

However what I can't figure out is how to give the account on my website the virtual credit after the user pays. I want to store the value in a SQL column next to their username; doing so is easy - but how do I execute that SQL command only when a user has genuinely paid?

Since you got your cart working. Have you google this before you came on Daniweb?

Read this and there is an instructions about it:

https://www.paypal.com/cgi-bin/webscr?cmd=p/acc/ipn-info-outside

Since you got your cart working. Have you google this before you came on Daniweb?

Yes I has googled it - came up with a load of crap saturating the world wide web. That one page you have linked was not on the first 3 pages as I cleared them all. Also - the represenative from PayPal couldn't even provide me with that link.

Thanks for your help,
Mike

Something I still cant get me head around.

Tom and Charlie are on my website.

Tom credits his account with $5.00.

Charlie credits his account with $20.00.

My listener gets 2 responses, one with the value of 5$ and one with the value of 20$.

How does my script know to give the user called 'Tom' $5 and the user called 'Charlie' $20?

Whats the unique identifier? It can't be their PayPal address because I may have one address stored for them and they use another to pay?

Can it carry the value of a PHP session?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.