|
|
|
Rank: Starting Member
Groups: Registered
Joined: 2/8/2005 Posts: 2 Location: ,
|
Ok this is very frustrating.
Heres my code for my shopping cart results.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="vikas@linkexchanged.com">
<input type="hidden" name="item_name" value="Jewelry">
<input type="hidden" name="item_number" value="001">
<input type="hidden" name="amount" value="0.01">
<input type="hidden" name="shipping" value="0">
<input type="hidden" name="shipping2" value="0">
<input type="hidden" name="handling" value="0">
<input type="hidden" name="return" value="http://www.vanjewelry.com/payment.cfm">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="cancel_return" value="http://www.somedomain.net">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="custom" value="blank,27">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
Here's my return page code:
<CFSET str="cmd=_notify-validate">
<CFLOOP INDEX="TheField" list="#Form.FieldNames#">
<CFSET str = str & "#LCase(TheField)#=#URLEncodedFormat(Form[TheField])#">
</CFLOOP>
<CFIF IsDefined("FORM.payment_date")>
<CFSET str = str & "&payment_date=#URLEncodedFormat(Form.payment_date)#">
</CFIF>
<CFIF IsDefined("FORM.subscr_date")>
<CFSET str = str & "&subscr_date=#URLEncodedFormat(Form.subscr_date)#">
</CFIF>
<!-- post back to PayPal system to validate -->
<CFHTTP URL="https://www.paypal.com/cgi-bin/webscr?#str#" METHOD="GET" RESOLVEURL="false">
</CFHTTP>
<!-- assign posted variables to local variables -->
<CFSET item_name=FORM.item_name>
<CFSET payment_status=FORM.payment_status>
<CFSET payment_amount=FORM.mc_gross>
<CFSET payment_currency=FORM.mc_currency>
<CFSET txn_id=FORM.txn_id>
<CFSET receiver_email=FORM.receiver_email>
<CFSET payer_email=FORM.payer_email>
<CFIF IsDefined("FORM.item_number")>
<CFSET item_number=FORM.item_number>
</CFIF>
<!-- check notification validation -->
<CFIF #CFHTTP.FileContent# is "VERIFIED">
VERIFIED
<!-- check that payment_status=Completed -->
<!-- check that txn_id has not been previously processed -->
<!-- check that receiver_email is your Primary PayPal email -->
<!-- check that payment_amount/payment_currency are correct -->
<!-- process payment -->
<CFELSEIF #CFHTTP.FileContent# is "INVALID">
INVALID
<!-- log for investigation -->
<CFELSE>
<!-- error -->
</CFIF>
I get this error from ColdFusion:
Error Occurred While Processing Request
Element FIELDNAMES is undefined in FORM.
The error occurred in E:\Inetpub\Websites\vanjewelry\web\payment.cfm: line 5
3 : <CFSET str="cmd=_notify-validate">
4 :
5 : <CFLOOP INDEX="TheField" list="#Form.FieldNames#">
6 : <CFSET str = str & "#LCase(TheField)#=#URLEncodedFormat(Form[TheField])#">
7 : </CFLOOP>
I tested http://www.vanjewelry.com/IPN.cfm and posted to http://www.vanjewelry.com/payment.cfm and it worked FINE. You'll see "verified" come back NO problem.
What am i doing wrong???????????????????????????????
Vik Tailor
Vik Tailor
|
|
|
|
|
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 10/17/2002 Posts: 2,139 Location: ,
|
Hello, Try using notify_url as a variable in your button with the value of http://www.vanjewelry.com/payment.cfm for a penny payment on the live site, or in the sanbox. The test button has all the transaction information and is doing the second post to validate the payment. Have you already tested this with a new transaction? Stephen Ivaskevicius PayPal/eBay, Inc. www.paypal.com/pdn
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 2/8/2005 Posts: 2 Location: ,
|
Tried it and it still doesnt work. What other things can I try? I'm on CFMX 6.1
Vik Tailor
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 9/16/2002 Posts: 2,960 Location: ,
|
You'll need to turn Auto-Return off. Patrick Breitenbach PayPal, Inc. Dev Net: https://www.paypal.com/pdn
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 3/17/2005 Posts: 2 Location: ,
|
Here's what I get when I turn off Auto-Return: You have not turned on Auto Return. You must turn on Auto Return in order for Payment Data Transfer to work properly. <blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"> Originally posted by paypal_pb[br]You'll need to turn Auto-Return off. Patrick Breitenbach PayPal, Inc. Dev Net: https://www.paypal.com/pdn
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
|
|
|
|
Guest
|
YAFVision Theme by Jaben Cargman (Tiny Gecko)Powered by YAF |
YAF © 2003-2009, Yet Another Forum.NETThis page was generated in 0.380 seconds.