Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues > ColdFusion

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-17-2010, 04:55 PM   PM User | #1
chedderslam
New to the CF scene

 
Join Date: Jun 2008
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
chedderslam is an unknown quantity at this point
paypal - Order total is missing - but passing PAYMENTREQUEST_0_AMT?

Looking at the api docs. I think I am passing what I should, but i'm getting that error.

<cfhttp method="get" url="#paypal_enviroment.api_url#" throwonerror="yes">
<cfhttpparam type="url" name="user" value="#paypal_enviroment.api_user#">
<cfhttpparam type="url" name="pwd" value="#paypal_enviroment.api_pwd#">
<cfhttpparam type="url" name="signature" value="#paypal_enviroment.api_signature#">
<cfhttpparam type="url" name="returnurl" value="#paypal_enviroment.return_url#">
<cfhttpparam type="url" name="cancelurl" value="#paypal_enviroment.cancel_url#">
<cfhttpparam type="url" name="method" value="SetExpressCheckout">
<cfhttpparam type="url" name="PAYMENTREQUEST_0_PAYMENTACTION" value="Sale">
<cfhttpparam type="url" name="PAYMENTREQUEST_0_CURRENCYCODE" value="USD">
<cfhttpparam type="url" name="allownote" value="1">
<cfhttpparam type="url" name="version" value="60.0">
<cfhttpparam type="url" name="noshipping" value="2">
<cfhttpparam type="url" name="PAYMENTREQUEST_0_SHIPPINGAMT" value="#numberformat( variables.shipping_cost, "9999.99" )#">
<cfif arguments.add_insurance>
<cfhttpparam type="url" name="PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED" value="true">
<cfhttpparam type="url" name="PAYMENTREQUEST_0_INSURANCEAMT" value="#numberformat( variables.insuranceamt, "9999.99" )#">
</cfif>
<cfset variables.item_total = 0>
<cfloop query="qry_paypallock_get">
<cfset variables.item_total = variables.item_total + ( qry_paypallock_get.unitprice * qry_paypallock_get.quantity )>
<cfset variables.paypal_item_row = qry_paypallock_get.currentrow - 1>
<cfhttpparam type="url" name="L_PAYMENTREQUEST_0_NAME#variables.paypal_item_row#" value="#qry_paypallock_get.name#">
<cfhttpparam type="url" name="L_PAYMENTREQUEST_0_NUMBER#variables.paypal_item_row#" value="#qry_paypallock_get.tblproductsfk#">
<cfhttpparam type="url" name="L_PAYMENTREQUEST_0_DESC#variables.paypal_item_row#" value="#qry_paypallock_get.shortdescription#">
<cfhttpparam type="url" name="L_PAYMENTREQUEST_0_AMT#variables.paypal_item_row#" value="#numberformat(qry_paypallock_get.unitprice, "9999.99" )#">
<cfhttpparam type="url" name="L_PAYMENTREQUEST_0_QTY#variables.paypal_item_row#" value="#qry_paypallock_get.quantity#">
</cfloop>
<cfhttpparam type="url" name="PAYMENTREQUEST_0_ITEMAMT" value="#numberformat( variables.item_total, "9999.99" )#">

<cfset variables.order_total = variables.item_total + variables.shipping_cost + variables.insuranceamt>
<cfhttpparam type="url" name="PAYMENTREQUEST_0_AMT" value="#numberformat( variables.order_total, "9999.99" )#">
</cfhttp>

Here is what I am passing:
ALLOWNOTE 1
CANCELURL (redacted)
L_PAYMENTREQUEST_0_AMT0 14.00
L_PAYMENTREQUEST_0_DESC0 Laurel Burch Mini Bag zipper top 11" x 3" x 8"
L_PAYMENTREQUEST_0_NAME0 Indigo Cats Mini Bag
L_PAYMENTREQUEST_0_NUMBER0 217
L_PAYMENTREQUEST_0_QTY0 1
METHOD SetExpressCheckout
NOSHIPPING 2
PAYMENTREQUEST_0_AMT 21.00
PAYMENTREQUEST_0_CURRENCYCODE USD
PAYMENTREQUEST_0_INSURANCEAMT 2.00
PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED true
PAYMENTREQUEST_0_ITEMAMT 14.00
PAYMENTREQUEST_0_PAYMENTACTION Sale
PAYMENTREQUEST_0_SHIPPINGAMT 5.00
PWD (redacted)
RETURNURL (redacted)
SIGNATURE (redacted)
USER (redacted)
VERSION 60.0
chedderslam is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:35 PM.


Advertisement
Log in to turn off these ads.