Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

EWay ColdFusion Component CFC – Payment Gateway

I’ve invested some time a while ago in creating a ColdFusion Component to integrate with Eway Payment Gateway. I’m not using them anymore and giving the Component away in return for a text link. If you want a copy of the component just leave a comment with the URL where I can find a link to any page of the following sites:

http://www.executiveresults.com.au
http://www.clickfind.com.au
pacificfox.com
http://www.thetoughspot.com.au
http://www.glovesboxing.com.au
http://www.cavemantraining.com.au

Following is bit of the CFC

<cfcomponent 
 displayname="Eway" 
 hint="Eway" 
 output="false" 
 author="Taco Fleur ([email protected])" 
 version="1">

 <!--- Set instance variables --->
 <!---
 // http://www.eway.com.au/Support/Developer/PaymentsRebill.aspx
 --->
 <cfscript>
 this.constant.LIVE_GATEWAY_URI = "https://www.eway.com.au/gateway/rebill/manageRebill.asmx";
 this.constant.TEST_GATEWAY_URI = "https://www.eway.com.au/gateway/rebill/test/manageRebill_test.asmx";
 this.constant.GATEWAY = "TEST";                 // TEST or LIVE
 this.constant.LIVE_EWAY_CUSTOMER_ID = "";     // required, customer id assigned to you by eWay
 this.constant.TEST_EWAY_CUSTOMER_ID = "";
 
 variables.instance.userIdentity = 0;
 variables.instance.customerFirstName = "";             // required
 variables.instance.customerLastName = "";             // required
 variables.instance.ewayTotalAmount = 0;             // total amount in cents for the transaction, eg $1.00 = 100, maximum length 12
 // the test Total Amount should end in 00 or 08 to get a successful response (e.g. $10.00 or $10.08) - all other amounts will return a failed response
 variables.instance.ewayCustomerInvoiceRef = 0;         // reference to your own invoice system for the purchase
 variables.instance.rebillCCName = "";                 // required, customer's credit card number
 variables.instance.rebillCCNumber = "";             // required, customer's credit card number
 variables.instance.rebillCCExpMonth = "";             // required, expiry month of customer's credit card
 variables.instance.rebillCCExpYear = "";             // required, expiry year of customer's credit card. Format must be either (yy or yyyy) eg. 06 or 2006.
 variables.instance.rebillInitAmt = 0;                 // required, initial payment amount of the reBILL event. Enter 0 if initial payment is not required.
 variables.instance.rebillInitDate = lsDateFormat( now(), "dd/mm/yyyy" ); // required, date of the initial payment of the reBILL event. Enter today's date if no initial payment is required. Format dd/mm/yyyy.
 variables.instance.rebillRecurAmt = 0;                 // required, recurring payment amount of the reBILL. The value must be greater than 0.
 variables.instance.rebillStartDate = lsDateFormat( now(), "dd/mm/yyyy" ); // required, date of the first recurring payment. Format must of  dd/mm/yyyy
 variables.instance.rebillInterval = 1;                 // required, size of the interval between recurring payments (used in conjunction with RebillIntervalType). The value must be 1 to 31 only.
 variables.instance.rebillIntervalType = "Months";     // required, type of Interval. (1 = Days, 2 = Weeks, 3 = Months, 4 = Years). The value must be only 1 or 2 or 3 or 4. eg. Payments every 3 weeks, enter 3 in the RebillInterval field, and 2 in the RebillIntervalType field. 
 variables.instance.rebillEndDate = lsDateFormat( dateAdd( "y", 10, now() ), "dd/mm/yyyy" ); // required, date that recurring payments are to stop. Format must of  dd/mm/yyyy. This date must be after RebillStartDate.
 variables.instance.requestXML = xmlNew();
 variables.instance.responseXML = xmlNew();
 </cfscript>

…………..

You’ll get the component in return for a simple text link, the link needs to stay up for at least a year, once I send the component I’ll trust you’ll do the honorable thing :-)


Filed under: ColdFusion, Programming Tagged: component, eway, payment gateway


This post first appeared on Just Random Crap, please read the originial post: here

Share the post

EWay ColdFusion Component CFC – Payment Gateway

×

Subscribe to Just Random Crap

Get updates delivered right to your inbox!

Thank you for your subscription

×