|
Rank: Starting Member
Groups: Registered
Joined: 2/6/2006 Posts: 2 Location: ,
|
This is my first post. I have been searching for help with this and the more I read, the more confused I get. Here is what I want to do:
I am doing a Valentine donation page where for a $6 donation the user can send their love a virtual chocolate, flower or heart. So the first page is filling in their name and email and the recipients name and email and choosing their gift. If that information is complete, then I redirect them to paypal for the $6 payment. Then I want verification from paypal that they paid before sending the cfmail off. All the examples I've seen are lines and lines of code.....all I want is just the verification that they paid. I'm not using a database for this....just doing it all on the fly.....with sessions keeping track of who is who.
I have a form, if filled in completely/correctly, I direct user to PayPal, using <form> and having our account information in hidden variables. Up to this point, all works well. I currently have the donation amount for 1 cent, as not to drain my bank account.
I turned the IPN on at PayPal and put the returning URL to our site, specifically to the actual cfm file that should carry on processing...checks for payment and then sends the cfmail and thanks the user for the donation. It was just making it work that was challenging me. But the concept of what I needed to do was fairly clear. From what I read, I expect PayPal to redirect itself to the URL that I provided.
Then I start reading posts from forums and snippets of code.... and I don't know where it is all supposed to fit in. Like this bit:
<!--- PAYPAL WILL POST TO THIS SCRIPT --->
<cfset str="cmd=_notify-validate">
<cfloop list="#form.FieldNames#" index="TheField">
<cfset str = str & "#LCase(TheField)#=#URLEncodedformat(Evaluate(TheField))#">
</cfloop>
.......
<cfhttp url="https://www.paypal.com/cgi-bin/webscr?#str#" method="GET" resolveurl="false">
</cfhttp>
I'm not clear on where in the process this goes.....am I communicating with PayPal with the <cfhttp> tag? at what point am I conveying to PayPal what account my account name is?
Perhaps I need a dumb-down version of the instructions....so if anyone knows of a clear cut tutorial on IPN, close to what I'm needing, I would sure appreciate it.
Thanks!
Stephanie
|
|
Rank: Starting Member
Groups: Registered
Joined: 2/6/2006 Posts: 2 Location: ,
|
ok, I almost have it working....except I can't seem to capture the verification from paypal.
I have a <form> tag to bring them to PayPal, and if they cancel, they go to one place, and if they pay it goes to another. It's at this page that I need a trigger telling me that they came from PayPal.
Am I supposed to send a variable in the <form> tag? If so, how do I make it return to me. I just need to know it's paid....all the other variables (name, email etc) I have captured.
thanks! stephanie
|