I've done it.  Here's the code.  This is valuable code, so if you can please throw a 
bone my way.


<!-- begin act_public_cart_linkpoint.cfm  -->
<cfsetting enablecfoutputonly="yes">

<CFSET Chargetype_Auth = 0> <!--- Funds Captured upon approval, funds will be set to 
transfer --->
<CFSET Chargetype_Sale = 0> <!--- Funds Captured upon approval, funds will be set to 
transfer --->

<CFSET Chargetype_Preauth = 1> <!--- Funds Reserved upon approval, Postauth will be 
needed to transfer funds --->
<CFSET Chargetype_Postauth = 2> <!--- Reserved funds will be transferred, use upon 
shipping a hardgood --->
<CFSET Chargetype_Credit = 3> <!--- Return or Refund of funds that were, AUTH, SALE or 
POSTAUTH --->
<CFSET Chargetype_Error = 0> <!--- this option no longer used, please disregard --->

<CFSET Result_Live = 0> <!--- Run transactions in LIVE mode, transaction charges apply 
--->
<CFSET Result_Good = 1> <!--- Run transactions in TEST mode, no transaction charges 
--->
<CFSET Result_Duplicate = 2> <!--- Return a duplicate transaction result --->
<CFSET Result_Decline = 3> <!--- Return a decline transaction result --->

<CFSET Esdtype_None = 0> <!--- Electronic softgood download type none --->
<CFSET Esdtype_Softgood = 1> <!--- Electronic softgood download type file --->
<CFSET Esdtype_Key = 2> <!--- Electronic softgood download type key (serial number) 
--->

<!--- ITEMID, DESCRIPTION, ITEMPRICE, ITEMQTY, SOFTFILE, ESDTYPE, ITEMSERIAL, 
ITEMOPTION, ITEMCHOICE --->

<CFSET ItemContext = queryNew("ITEMID, DESCRIPTION, ITEMPRICE, ITEMQTY")>

<cfloop query="get_order_lineitems">

<CFSET TempValue = queryAddRow(ItemContext)>
<CFSET TempValue = querySetCell(ItemContext, "ITEMID", "#ID_PRODUCT#")>   
<CFSET TempValue = querySetCell(ItemContext, "DESCRIPTION", "#PRODUCT_NAME#")> 
<CFSET TempValue = querySetCell(ItemContext, "ITEMPRICE", VA_PRICE)>
<CFSET TempValue = querySetCell(ItemContext, "ITEMQTY", quantity)>

</cfloop>


<CFX_LinkAPI
        REQSTORENAME = "123456" 
        REQKEYFILE = "c:\\cfusion\\customtags\\123456.pem"
        REQHOSTADDR = "secure.linkpt.net"
        REQPORT = "1139"
        ORDERUSERID = "#session.id_contact#"
        ORDERBCOMPANY = "#BILLING_COMPANY#"
        ORDERBCOUNTRY = "#BILLING_COUNTRY_CODE#"
        ORDERBNAME = "#BILLING_FIRST_NAME# <cfif BILLING_MIDDLE_NAME neq 
"">#BILLING_MIDDLE_NAME# </cfif>#BILLING_LAST_NAME#"
        ORDERBADDR1 = "#BILLING_ADDRESS1# #BILLING_ADDRESS2#"
        ORDERBCITY = "#BILLING_CITY#"
        ORDERBSTATE = "<cfif BILLING_STATE_CODE neq 
"">#BILLING_STATE_CODE#<cfelse>#BILLING_STATE_OTHER#</cfif>"
        ORDERBZIP = "#BILLING_ZIP#"
        ORDERSNAME = "#SHIPPING_FIRST_NAME# <cfif SHIPPING_MIDDLE_NAME neq 
"">#SHIPPING_MIDDLE_NAME# </cfif>#SHIPPING_LAST_NAME#"
        ORDERSADDR1 = "#SHIPPING_ADDRESS1# #SHIPPING_ADDRESS2#"
        ORDERSCITY = "#SHIPPING_CITY#"
        ORDERSSTATE = "<cfif SHIPPING_STATE_CODE neq 
"">#SHIPPING_STATE_CODE#<cfelse>#SHIPPING_STATE_OTHER#</cfif>"
        ORDERSZIP = "#SHIPPING_ZIP#"
        ORDERSCOUNTRY = "#SHIPPING_COUNTRY_CODE#"
        ORDERPHONE = "#BILLING_DAY_PHONE# #BILLING_EVENING_PHONE# #SHIPPING_DAY_PHONE# 
#SHIPPING_EVENING_PHONE#"
        ORDERFAX = "null"
        ORDERCOMMENTS = "null"
        ORDERCARDNUMBER = "#CREDIT_CARD_NUMBER#"
        ORDERCHARGETYPE = "#Chargetype_Auth#"
        ORDERCARDEXPMONTH = "#CREDIT_CARD_EXP_MM#"
        ORDERCARDEXPYEAR = "#CREDIT_CARD_EXP_YY#"
        ORDEREMAIL = "#BILLING_EMAIL#"
        ORDERRESULT = "#Result_Good#"
        ORDERSHIPPINGPRICE = "#shipping_total#"
        ORDERTAX = "#TAX#"
        QUERY = "ItemContext" 
>

 <!--- Result mode set to "#RESULT_LIVE#" when live --->

<!--- now write the result code back to the database --->

<cfquery name="check_result_code" datasource="#session.dsn#">
UPDATE ORDERS
SET
ORDER_RESPONSE_CODE = '#CSIOrderFieldApproved#',
ORDER_REF = '#CSIOrderFieldRef#',
ORDER_CODE = '#CSIOrderFieldCode#',
ORDER_ERROR = '#CSIOrderFieldError#',
ORDER_NUM = '#CSIOrderFieldOrdernum#'
WHERE ID_ORDER = #id_order#
</cfquery>

<!--- <CFOUTPUT>
<PRE>
Api Version:            #APIVersion#
Order Time:                     #CSIOrderFieldTime#
Order Ref:                      #CSIOrderFieldRef#
Approved Status:        #CSIOrderFieldApproved#
Order Code:                     #CSIOrderFieldCode#
Order Error:            #CSIOrderFieldError#
Order Num:                      #CSIOrderFieldOrdernum#
Esd Links :                     #CSIEsdLinks#
</PRE>
</CFOUTPUT> --->

<cfsetting enablecfoutputonly="no">
<!-- end act_public_cart_linkpoint.cfm -->

---mark

========================================================
Mark Warrick ([EMAIL PROTECTED])
Founder, Fusioneers.com / CTO, ZapConnect.com
Phone: 714-547-5386 / 714-667-0203 / Efax: 801-730-7289
http://www.warrick.net / http://www.fusioneers.com
http://www.zapconnect.com
ICQ: 125160 AIM: markwarric Yahoo: Serengeti
========================================================
 

> -----Original Message-----
> From: Duane Boudreau [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 20, 2002 8:40 AM
> To: CF-Talk
> Subject: LinkPoint
> 
> 
> Anyone here using Linkpoint and there CFX tag?
> 
> I'm pulling my hair out try to figure out how to do a transaction void
> programmatically.
> 
> If anyone has code they wouldn't mind sharing please let me know.
> 
> Duane
> 
> 
> 
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to