On 2/6/02, <[EMAIL PROTECTED]> penned:
>Hi, does anyone here have any experience with the Linkpoint Cold Fusion tag.
>
>Their documentation is really poor and I can't figure out:
>
>1. Precisely how you define the total amount for a transaction that does not
>have any shipping or tax info involved.

It calls for a query to be passed to it, which could be used for 
passing multiple line items. I just create the query with one record, 
the total of the order with a quantity of 1. For the description, 
rather than a description of the item, I put the description of the 
order. Like "Online Sale" or whatnot. For itemid, rather than a 
product ID, I just pass the store number to pass something. itemprice 
is the order total.

<CFSET ItemContext = queryNew("ITEMID, DESCRIPTION, ITEMPRICE, ITEMQTY")>
<CFSET TempValue = queryAddRow(ItemContext)>
<CFSET TempValue = querySetCell(ItemContext, "ITEMID", attributes.login)>
<CFSET TempValue = querySetCell(ItemContext, "DESCRIPTION", 
attributes.description)>
<CFSET TempValue = querySetCell(ItemContext, "ITEMPRICE", attributes.amount)>
<CFSET TempValue = querySetCell(ItemContext, "ITEMQTY", 1)>

Then I pass the query the the cfx tag with an empty shipping value 
and ordertax of 0.

ORDERSHIPPINGPRICE = ""
ORDERTAX = "0"
QUERY = "ItemContext"

Of course there are a zillion other parameters also.

>2. Which field provides the result of the transaction and

CSIOrderFieldApproved returns "Approved" for an approval. Anything 
else is a decline or an error. If an error, CSIOrderFieldError 
returns the reason or error I believe.

I've also found that if you do a duplicate transaction, the tag 
returns a ColdFusion error rather than an error from the tag with the 
CSIOrderFieldError field. I therefore wrap the whole calling tag with 
cftry.

The default of 3 below, I use to designate an error in case the tag 
doesn't work, which like I said, it doesn't on a duplicate 
transaction.

<CFPARAM NAME="caller.linkpoint_response_text" DEFAULT="">
<CFPARAM NAME="caller.linkpoint_result" DEFAULT="3">

<cftry>
<CFX_LinkAPI
etc
etc
>
<CFIF CSIOrderFieldApproved IS "Approved">
<cfset caller.linkpoint_result = 1>
<cfelse>
<cfset caller.linkpoint_response_text = CSIOrderFieldError>
<cfset caller.linkpoint_result = 2>
</CFIF>

<cfcatch type="any">

<CFIF cfcatch.detail contains "order number given must be unique">
Here I run a query to check the database where I write the result to the order.

<cfquery name="checkorder">
blah blah blah
</cfquery>
<CFIF checkorder.OrderApproved IS 1>
<cfset caller.linkpoint_result = 1>
<cfelse>
<cfset caller.linkpoint_result = 2>
</CFIF>

</cfif>


>3. The variable codes of the transaction result, i.e. 0 = declined, 1 =
>approved, 2 = customer sucks, etc, etc

I don't think there are any. Just the "Approved" string I mentioned. 
:) I use the caller values I set myself (I put mine in a custom tag, 
just set them in the variables scope rather than the caller scope if 
you put the cfx_LinkAPI tag right into your template).

1=approved
2=declined (display my caller.linkpoint_response_text which = 
CSIOrderFieldError)
3=error (display error processing request, try again)

HTH. The tag is a little archaic but it's worked OK the few times 
I've had to use it.
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to