|
|
|
Rank: Starting Member
Groups: Registered
Joined: 5/14/2003 Posts: 9 Location: ,
|
"<input type="hidden" name="rm" value="1">"
What is rm and why is the value=1?
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 9/16/2002 Posts: 2,960 Location: ,
|
rm=1 forces the "return" URL to be a get/link instead of a post as usual. I believe all of this is documented but I'll take a look. Patrick Breitenbach PayPal, Inc. Dev Net: https://www.paypal.com/pdn
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 5/14/2003 Posts: 9 Location: ,
|
I've taken out the rm variable in my code. The code on the continue button after I make a payment says my return page: action="http://www.mydomain.com/thankyou.cfm". When is it supposed to process my ipn page and when is it supposed to go to my return page? Knowing this would be helpful to me in setting up my processing system.
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 9/16/2002 Posts: 2,960 Location: ,
|
The IPN posts when the payment completes. The "return" URL is hit when the buyer clicks the Continue button/link. The IPN normally beats the "return" URL. Patrick Breitenbach PayPal, Inc. Dev Net: https://www.paypal.com/pdn
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 5/14/2003 Posts: 9 Location: ,
|
That doesn't seem to be happening with mine. Here is my code behind the "Buy Now" button:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <p>We are so glad you've decided to take the challenge and try for a chance at the Winner Circle! Please enter the number of quizzes you want to buy and then click the "Buy Now" button to get started.</p> <p> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="simone@simonehenry.com"> <input type="hidden" name="item_name" value="Quiz"> <input type="hidden" name="item_number" value="Quiz1"> <input type="hidden" name="amount" value="0.99"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="notify_url" value="http://www.nwinnercircle.com/cart/ipn.cfm"> <input type="hidden" name="return" value="http://www.nwinnercircle.com/game/thankyou.cfm">
<input name="quantity" type="text" id="quantity" value="10" size="3" maxlength="2"> <input type="image" src="https://www.paypal.com/images/x-click-but23.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form>
Here is the code behind the "Continue" button on the Paypal page: <form method="post" action="http://www.nwinnercircle.com/game/thankyou.cfm"> <!-- Begin Notify parameters--> <BR>
<input type="hidden" name="payment_date" value="11:33:25 May 22, 2003 PDT">
<input type="hidden" name="txn_type" value="web_accept">
<input type="hidden" name="last_name" value="Henry">
<input type="hidden" name="payment_gross" value="1.98">
<input type="hidden" name="item_name" value="Quiz">
<input type="hidden" name="mc_currency" value="USD">
<input type="hidden" name="payment_type" value="instant">
<input type="hidden" name="business" value="simone@simonehenry.com">
<input type="hidden" name="verify_sign" value="A0zOTcl8YZYJB98PiMzz7A-pZwdGASTtyVlP9CTAZs8r6nIsWO.LneAi">
<input type="hidden" name="payer_status" value="unverified">
<input type="hidden" name="payer_email" value="simoneanne@ureach.com">
<input type="hidden" name="tax" value="0.00">
<input type="hidden" name="txn_id" value="60L011408F5994407">
<input type="hidden" name="address_status" value="confirmed">
<input type="hidden" name="first_name" value="Simone">
<input type="hidden" name="quantity" value="2">
<input type="hidden" name="receiver_email" value="simone@simonehenry.com">
<input type="hidden" name="payer_id" value="EETZFGAYE3BRL">
<input type="hidden" name="item_number" value="Quiz1">
<input type="hidden" name="payment_status" value="Completed">
<input type="hidden" name="mc_fee" value="0.36">
<input type="hidden" name="payment_fee" value="0.36">
<input type="hidden" name="mc_gross" value="1.98">
<input type="hidden" name="custom" value="">
<input type="hidden" name="notify_version" value="1.4">
<input type="hidden" name="address_country" value="USA">
<input type="hidden" name="address_name" value="Simone Henry">
<!-- End Notify parameters --> </form>
As you can see, it's posting the notify variables to my return page. Is it supposed to be doing this? Can you tell me if there's a field that I'm missing?
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 9/16/2002 Posts: 2,960 Location: ,
|
It will post the IPN fields to your "return" URL unless you include rm=1 in your pay button. Patrick Breitenbach PayPal, Inc. Dev Net: https://www.paypal.com/pdn
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 1/24/2003 Posts: 3 Location: ,
|
[quote]Originally posted by simoneanne [br]"<input type="hidden" name="rm" value="1">"
What is rm and why is the value=1?
If you are using HTML for your return URL, you must use rm=1. Since you can not post with the HTML format, you will need to get. This is the return URL behavor. When you set the value at 1, upon completion of the payment the buyer will be sent to the return URL with a get method.
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 2/7/2004 Posts: 4 Location: ,
|
No kidding PayPal. Post a frickin ipn.cfm file that actually works. I've wasted soooooo much time on this.
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 4/30/2004 Posts: 3 Location: ,
|
I too am having great difficulty in getting this to work. I saw this post and used your test page on my site. Please help. I have spent countless hours trying to get this to work and from what I can see, so have others. I'm about to give up on PayPal IPN and explore another solution. Thanks in advance for any help you can provide.
************************************** Here is what I am getting :
Invalid token '>' found on line 149 at column 8. <p>The CFML compiler was processing:<ul><li>a cfhttpparam tag beginning on line 15, column 2.<li>The closing tag for the CFML comment is missing.Comment begins on line 16.</ul> The error occurred in D:\Inetpub\quintessentialdesigns\project\ipn.cfm: line 149 147 : 148 : </cfmail> 149 : </CFIF> ************************************** Here is the IPN Test page:
<form method="post" action="http://www.quintessentialdesigns.com/project/ipn.cfm"> <input type="hidden" name="mc_gross" value="0.01"> <input type="hidden" name="address_status" value="unconfirmed"> <input type="hidden" name="payer_id" value="QGVDAFGZ9XHLJ"> <input type="hidden" name="tax" value="0.00"> <input type="hidden" name="payment_date" value="13:50:26 Mar 11, 2004 PST"> <input type="hidden" name="address_street" value="1840 Embarcadero Road"> <input type="hidden" name="payment_status" value="Pending"> <input type="hidden" name="address_zip" value="94303"> <input type="hidden" name="first_name" value="Patrick"> <input type="hidden" name="address_name" value="Patrick Breitenbach"> <input type="hidden" name="notify_version" value="1.6"> <input type="hidden" name="custom" value=""> <input type="hidden" name="payer_status" value="unverified"> <input type="hidden" name="business" value="pb-pdn@paypal.com"> <input type="hidden" name="address_country" value="United States"> <input type="hidden" name="address_city" value="Palo Alto"> <input type="hidden" name="quantity" value="1"> <input type="hidden" name="verify_sign" value="AkU-lzGsIkV0gazwa9nDVpmsx9X0AMF3KqbmhBuM8UTVNO5CFNAptk78"> <input type="hidden" name="payer_email" value="pb-test@paypal.com"> <input type="hidden" name="txn_id" value="4MX09190KB7728256"> <input type="hidden" name="payment_type" value="instant"> <input type="hidden" name="last_name" value="Breitenbach"> <input type="hidden" name="address_state" value="CA"> <input type="hidden" name="receiver_email" value="pb-pdn@paypal.com"> <input type="hidden" name="receiver_id" value="WAT63H8628SRN"> <input type="hidden" name="pending_reason" value="verify"> <input type="hidden" name="txn_type" value="web_accept"> <input type="hidden" name="item_name" value="Test"> <input type="hidden" name="mc_currency" value="USD"> <input type="hidden" name="item_number" value=""> <input type="hidden" name="payment_gross" value="0.01"> <input type="submit" value="Pay Pal Test IPN"> </form> **************** I also have results from a live transacation test I did and sent myself the output. I do not want to post that here but will send to you at email address you specify.
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 4/30/2004 Posts: 3 Location: ,
|
Disregard the previous post from me. Error on my part. I did get the script to work but am not getting a valid notification. I end up in this part of my script where I email myself that it failed.......
My Code:
<!-- Read post from PayPal system and add 'cmd' --> <CFSET str="_notify-validate"> <CFLOOP INDEX="TheField" list="#Form.FieldNames#"> <CFSET str = str & "#LCase(TheField)#=#URLEncodedFormat(Evaluate(TheField))#"> </CFLOOP>
<!--- Added to correct payment_date FieldName getting droped by CF Server --->
<CFSET str = str & "&payment_date=#URLEncodedFormat(Form.payment_date)#">
<!-- post back for validation --> <CFHTTP METHOD="Get" URL="https://www.paypal.com/cgi-bin/webscr"> <cfhttpparam type="FORMFIELD" name="cmd" value="#str#"></CFHTTP>
<!-- Assign posted variables to local variables and Do A URLDecode Add or remove variables to fit appliction needs --> <CFIF IsDefined("FORM.item_name")> <CFSET item_name=URLDecode(FORM.item_name)> </CFIF>
<CFIF IsDefined("FORM.payment_status")> <CFSET payment_status=URLDecode(FORM.payment_status)> </CFIF>
<CFIF IsDefined("FORM.pending_reason")> <CFSET pending_reason=URLDecode(FORM.pending_reason)> </CFIF>
<CFIF IsDefined("FORM.payment_date")> <CFSET payment_date=URLDecode(FORM.payment_date)> </CFIF>
<CFIF IsDefined("FORM.payment_gross")> <CFSET payment_gross=URLDecode(FORM.payment_gross)> </CFIF>
<CFIF IsDefined("FORM.txn_id")> <CFSET txn_id=URLDecode(FORM.txn_id)> </CFIF>
<CFIF IsDefined("FORM.first_name")> <CFSET first_name=URLDecode(FORM.first_name)> </CFIF>
<CFIF IsDefined("FORM.last_name")> <CFSET last_name=URLDecode(FORM.last_name)> </CFIF>
<CFIF IsDefined("FORM.address_street")> <CFSET address_street=URLDecode(FORM.address_street)> </CFIF>
<CFIF IsDefined("FORM.address_city")> <CFSET address_city=URLDecode(FORM.address_city)> </CFIF>
<CFIF IsDefined("FORM.address_state")> <CFSET address_state=URLDecode(FORM.address_state)> </CFIF>
<CFIF IsDefined("FORM.address_zip")> <CFSET address_zip=URLDecode(FORM.address_zip)> </CFIF>
<CFIF IsDefined("FORM.payer_email")> <CFSET payer_email=URLDecode(FORM.payer_email)> </CFIF> <!--- <CFIF IsDefined("FORM.custom")> <CFSET payer_CustID=ListGetAt(URLDecode(FORM.custom),1)> <CFSET payer_CartID=ListGetAt(URLDecode(FORM.custom),2)> </CFIF> ---> <!-- check notification validation -->
<CFIF #CFHTTP.FileContent# is "VERIFIED"> <!-- check that payment_status=Completed --> <CFIF FORM.payment_status eq "Completed"> <!-- check that txn_id has not been previously processed --> <!-- check that receiver_email is your email address --> <CFIF #FORM.RECEIVER_EMAIL# eq "payments@mydomainname.com"> <cfmail FROM="payments@mydomain.com" TO="payments@mydomain.com" SUBJECT="PayPal Verified!" server="Mail19"> IPN Test Result: #CFHTTP.FileContent# </cfmail> </CFIF> </CFIF>
<!-- put code here to process payment --> <CFELSEIF #CFHTTP.FileContent# is "INVALID"> <!-- log for investigation --> <cfmail FROM="payments@mydomain.com" TO="payments@mydomain.com" SUBJECT="PayPal INVALID!" server="Mail19"> IPN Test Result: #CFHTTP.FileContent# </cfmail> <CFELSE> <!-- error --> <cfmail FROM="payments@mydomain.com" TO="payments@mydomain.com" SUBJECT="PayPal Error!" server="Mail19">
IPN Test Result: #CFHTTP.FileContent# </cfmail> </CFIF>
|
|
|
|
Guest
|
YAFVision Theme by Jaben Cargman (Tiny Gecko)Powered by YAF |
YAF © 2003-2009, Yet Another Forum.NETThis page was generated in 0.565 seconds.