- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following is CF code developed for the function
Hi Casey,
I'm trying to create to simple connection to a test account using the Auth.NET function
createCustomerProfileRequest
The following is CF code developed for the function. Any suggestions or comments would be much appreciated. Thanks in advanced.
...
<cfset mLoginID='OurLogin'>
<cfset mTransKey='OurTransKey'>
<cfset mMerchantCustomerId='1'>
<cfset mCustomerProfileId='1000'>
<cfset mFirstName='Karl'>
<cfset mlastName='Erdmann'>
<cfset mCompany='none'>
<cfset mAddress='123 abc St.'>
<cfset mCity='Bellevue'>
<cfset mState='Wa'>
<cfset mZip='98004'>
<cfset mCountry='USA'>
<cfset mPhoneNumber='000-000-0000'>
<cfset mCardNumber='6011000000000012'>
<cfset mExpirationDate='2014-01'>
<cfset mCustomerPaymentProfileId=20000>
<cfset mValidationMode='testMode'>
<!--- Create the XML data to post. --->
<cfsavecontent variable="strXML">
<?xml version="1.0" encoding="utf-8"?>
<createCustomerPaymentProfileRequestxmlns="https://apitest.authorize.net/xml/v1/request.api">
<merchantAuthentication>
<name>#mLoginID#</name>
<transactionKey>#mTransKey#</transactionKey>
</merchantAuthentication>
<customerProfileId>#mCustomerProfileId#</customerProfileId>
<paymentProfile>
<billTo>
<firstName>#mFirstName#</firstName>
<lastName>#mLastName#</lastName>
<company>#mCompany#</company>
<address>#mAddress#</address>
<city>#mCity#</city>
<state>#mState#</state>
<zip>#mZip#</zip>
<country>#mCountry#</country>
<phoneNumber>#mPhoneNumber#</phoneNumber>
<faxNumber></faxNumber>
</billTo>
<payment>
<creditCard>
<cardNumber>#mCardNumber#</cardNumber>
<expirationDate>#mExpirationDate#</expirationDate>
</creditCard>
</payment>
<customerPaymentProfileId>#mCustomerPaymentProfileId#</customerPaymentProfileId>
</paymentProfile>
<validationMode>#mValidationMode#</validationMode>
</createCustomerPaymentProfileRequest>
</cfsavecontent>
<!---Post the XML data to catch page. We are going to post this value as an XML object will actually just post it as an XML body.--->
<cfhttp url="https://apitest.authorize.net/xml/v1/request.api" method="POST" result="objGet">
<!---When posting the xml data, remember to trim the value so that it is valid XML.--->
<cfhttpparam type="XML" value="#strXML.Trim()#"/>
</cfhttp>
11-27-2012
02:07 PM
- last edited on
11-27-2012
10:17 PM
by
RichardH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello BellevueWa
It doesn't look like anyone has responded yet, but someone still may have feedback on what you're looking for. I'd recommend subscribing to this topic so that you'll be alerted via email if anyone else from the community is able to respond with any comments. To subscribe, click Topic Options at the top of this thread and then select Subscribe. You'll then receive an email once anyone replies to your post.
Thanks,
Richard
12-13-2012 02:43 PM

