我为什么没有在检查页上填写总数?
Apologies.
As my code is working, because it actually got to PayPal and does have all the field correct. I didn t think it was necessary to post the code. I thought it could be answered simply, "you re missing the XXXX variable in your post to PayPal."
但是,考虑到这一点,需要制定法典。
This is COLDFUSION (yes caps because people think this is a dead/dying language).
<cffunction name="expressCheckout" access="remote" returnformat="JSON" output="false" description="Processes PayPal Subscription">
<cfargument name="L_BILLINGAGREEMENTDESCRIPTION0" type="string" required="yes" />
<cfargument name="L_BILLINGTYPE0" type="string" required="yes" />
<cfargument name="AMT" type="numeric" required="yes" />
<cfset var username = "wpp_1306278086_biz_api1.blahblah.com">
<cfset var password = "1306278555">
<cfset var signature = "someSig">
<cfset var serverURL = "https://api-3t.sandbox.paypal.com/nvp">
<cfset var version = "65.1">
<cfset requestData = StructNew()>
<cfset requestData.USER = "#USERNAME#">
<cfset requestData.PWD = "#PASSWORD#">
<cfset requestData.SIGNATURE = "#SIGNATURE#">
<cfset requestData.SUBJECT = "">
<cfset requestData.VERSION = "#version#">
<cfset requestData.METHOD = "SetExpressCheckout">
<cfset requestData.AMT = "#arguments.AMT#">
<cfset requestData.DESC = "#arguments.L_BILLINGAGREEMENTDESCRIPTION0#">
<cfset requestData.CUSTOM = "#session.rfcid#">
<cfset requestData.returnURL = "http://localhost:8500/rfc2-1/membership/payPalConfirm.cfm">
<cfset requestData.cancelURL = "http://localhost:8500/rfc2-1/membership/creditcardform.cfm">
<cfset payPalReturn = doHttppost(requestData, serverURL, "no")>
<cfset payPalReturn = getNVPResponse(#URLDecode(payPalReturn)#)>
<cfif payPalReturn.ACK EQ "Failure">
<!--- return the error message --->
<cfset payPalReturn.ERRORMESSAGE = #payPalReturn.L_LONGMESSAGE0#>
</cfif>
<cfreturn payPalReturn>
</cffunction>
This retuns a json object to the browser. The browser then sends me to: https://sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=SomeToken
All fine when I get to PayPal. Just missing the total in the left hand box (as diagrammed)