YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

FORM.payment_status not posted by IPN Options
neilorourke
#1 Posted : Saturday, May 14, 2005 2:30:47 PM
Rank: Starting Member

Groups: Registered

Joined: 5/13/2005
Posts: 1
Location: ,
Paypal does not appear to be posting back FORM.payment_status to my IPN script. The scripts I am using are as follows: Subscription Form: <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> <input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/x-click-but20.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> <input type="hidden" name="cmd" value="_xclick-subscriptions"> <input type="hidden" name="business" value="testneil@galleries-online.co.uk"> <input type="hidden" name="item_name" value="Bronze Level"> <input type="hidden" name="item_number" value="1"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="return" value="http://www.galleries-online.co.uk/a_subscribeupdate.cfm"> <cfoutput><input type="hidden" name="cancel_return" value="http://www.galleries-online.co.uk/cms/artist_cms.cfm?artistid=#session.artistid#&content=subscribecancel"></cfoutput> <input type="hidden" name="payer_id" value="#session.artistid#"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="GBP"> <input type="hidden" name="a3" value="4.00"> <input type="hidden" name="p3" value="1"> <input type="hidden" name="t3" value="M"> <input type="hidden" name="src" value="1"> <input type="hidden" name="sra" value="1"> <input type="hidden" name="rm" value="2"> </form> And the IPN script is: <CFSET str="cmd=_notify-validate"> <CFLOOP INDEX="TheField" list="#Form.FieldNames#"> <CFSET str = str & "#LCase(TheField)#=#URLEncodedFormat(Evaluate(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> <!-- 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> <!-- post back to PayPal system to validate --> <CFHTTP URL="https://www.sandbox.paypal.com/cgi-bin/webscr?#str#" METHOD="GET" RESOLVEURL="false"> </CFHTTP> <!-- check notification validation --> <CFIF #CFHTTP.FileContent# is "VERIFIED"> <!-- check that payment_status=Completed --> <cfif payment_status eq "Completed"> <!-- check that receiver_email is your email address --> <cfif #RECEIVER_EMAIL# eq "neil@galleries-online.co.uk"> <!-- process payment --> <cftry> <cfquery name="qInsertOrder" datasource="#ds#"> INSERT INTO tbl_artists( package ) VALUES( '#ITEM_NUMBER#' ) WHERE artistid=#form.payer_id# </cfquery> <cfcatch> <!--- let's log all errors ---> <cffile action="append" file="D:\WWWRoot\galleries-onlineco.uk\www\paypal_logs\paypal_log.txt" output="Error order info"> </cfcatch> </cftry> <cfelse><p>email not neil@g</p> </cfif> <cfelse><p>Payment not complete</p> </cfif> <cfelse><p>unverified</p> </cfif> Any help would be greatly appreciated. Neil
Sponsor  
 
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFVision Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.136 seconds.