Transactions 将CIM添加到AIM direct post页面
我有一辆几年前用Anauthorize.net AIM direct post建造的购物车。该网站基于返回的值运行,效果很好 客户希望开始保存信用卡数据,以便将来进行交易 我想继续使用相同的post页面,只需添加CIM脚本,如下所示: -在AIM中运行事务 -如果交易成功,请运行CIM脚本保存信用卡并返回该卡的密钥。 -要使用已保存的卡,请使用CIM来使用已保存的信用卡数据运行交易。 -如果交易失败,请调用信用卡输入页面,以便客户端可以更新信息,然后在更新客户端模式下运行AIM和CIM 这是我的AIM direct post页面,也是我如何处理ReturnedValues的一个示例Transactions 将CIM添加到AIM direct post页面,transactions,authorize.net,coldfusion-11,Transactions,Authorize.net,Coldfusion 11,我有一辆几年前用Anauthorize.net AIM direct post建造的购物车。该网站基于返回的值运行,效果很好 客户希望开始保存信用卡数据,以便将来进行交易 我想继续使用相同的post页面,只需添加CIM脚本,如下所示: -在AIM中运行事务 -如果交易成功,请运行CIM脚本保存信用卡并返回该卡的密钥。 -要使用已保存的卡,请使用CIM来使用已保存的信用卡数据运行交易。 -如果交易失败,请调用信用卡输入页面,以便客户端可以更新信息,然后在更新客户端模式下运行AIM和CIM 这是我的
<cflock timeout="30" throwontimeout="No" name="12345">
<cfhttp url="https://secure2.authorize.net/gateway/transact.dll" method="post">
<cfoutput>
<cfhttpparam type="Formfield" name="x_login" value="mylogin">
<cfhttpparam type="Formfield" name="x_tran_key" value="mytranskey">
<cfhttpparam type="Formfield" name="x_version" value="3.1">
<cfhttpparam type="Formfield" name="x_test_request" value="FALSE">
<cfhttpparam type="Formfield" name="x_delim_data" value="TRUE">
<cfhttpparam type="Formfield" name="x_delim_char" value="|">
<cfhttpparam type="Formfield" name="x_relay_response" value="FALSE">
<cfhttpparam type="Formfield" name="x_invoice_num" value="#short_name#- #order_number#">
<cfhttpparam type="Formfield" name="auth_code" value="#orderID#">
<cfhttpparam type="Formfield" name="x_type" value="Auth_Capture">
<cfhttpparam type="Formfield" name="x_method" value="CC">
<cfhttpparam type="Formfield" name="x_card_num" value="#ccNumber#">
<cfhttpparam type="Formfield" name="x_exp_date" value="#ccMonth#/#ccYearr#">
<cfhttpparam type="Formfield" name="x_card_code" value="#ccCode#">
<cfhttpparam type="Formfield" name="x_amount" value="#NumberFormat(ORDER_TOTAL2, "9999.99")#">
<cfhttpparam type="Formfield" name="x_description" value="Internet and Network Service Order">
<cfhttpparam type="Formfield" name="x_first_name" value="#ccName#">
<cfhttpparam type="Formfield" name="x_last_name" value="#ccLastName#">
</cfoutput>
</cfhttp>
</cflock>
<cfoutput>
<cfset ReturnedValues = #CFHTTP.FileContent#>
<cfset rcode = #ListGetAt(ReturnedValues, 1, "|")#>
<cfset reason_code = #ListGetAt(ReturnedValues, 2, "|")#>
<cfset reason_text = #ListGetAt(ReturnedValues, 4, "|")#>
<cfset auth_code = "#ListGetAt(ReturnedValues, 5, "|")#">
</cfoutput>
AIM端点不支持CIM函数。相反,您需要使用XML或JSON来使用完整的Authorize.NETAPI。谢谢你rhldr。如果是这样的话,您知道我在哪里可以找到Coldfusion中的代码示例,包括CFHTTPS标记、页面标题等,以及如何获取返回值。A/N手册把我弄糊涂了,我不懂XML。