• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Adding CIM to AIM direct post page

Participant ,
Jan 30, 2017 Jan 30, 2017

Copy link to clipboard

Copied

0down votefavorite

I have a cart I built years ago using Anuthorize.net AIM direct post. The site runs on the ReturnedValues and works great.

The client wants to start saving credit card data for future transactions.

I would like to continue using the same post page and just add the CIM script as follows: - Run transaction in AIM - If tranaction is successful run CIM script to save credit card and return the key for the card. - To use the saved card use CIM to run transaction with saved credit card data. - If transaction fails call the credit card entry page so client can update information and run AIM and then CIM in the update client mode.

Here is my AIM direct post page and an example of how i work with ReturnedValues.
<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>

What I would like to happen is...

If transaction is approved use an cfif to save client data (CIM?) with client key saved in my database.

If transaction is turned down use my standard pages to allow client to edit their CC data.. Skip CIM at this point. If approved create client in CIM.

If existing client skip AIM and uses CIM to run transaction.

If existing client is turned down use standard pages for client to update card info.

Update client info in CIM and run as existing client.

Views

282

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 02, 2017 Feb 02, 2017

Copy link to clipboard

Copied

Hi Ranger, it is unclear what your question is. Are you just thinking aloud, as they say?

You seem to have answered the emerging questions yourself. Which is a good thing, of course.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 02, 2017 Feb 02, 2017

Copy link to clipboard

Copied

LATEST

Hi ACP

No. I can't seem to get anywhere with this. Even from A/N

The script above is for AIM which only runs transactions.

A/N requires CIM for saving CC data and running transactions with an A/N assigned ID.

I can find no information of what a CIM request would look like in CF for:

Create Client Profile ID and run transaction

Run transaction with Client Profile ID

Update client profile and run transaction

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation