Techemistry Blog

Transaction Express / TransFirst API & ACH Payment Integration

3/31/2014 3:20:00 PM -- Ted Krapf

<img src="//www.tedkrapf.com/portals/tedkrapf.com/images/checkbook.jpg" alt="ACH API" style="float: right; margin-bottom: 30px; margin-left: 30px; border: 5px solid #d8d8d8;" /> <p>This last week I had a client come to me with another interesting situation that needed a solution. &nbsp;My client had previously sought out a cost effective and easy to administer 3rd party solution for taking checking account payments while having the ability to set up automatic recurring billing. They found Transaction Express by TransFirst.<br /> <br /> </p> <p>Transaction Express posed a new challenge for me because I had not previously worked with them, nor (obviously) integrating their solution into other software. &nbsp;My client has a homegrown CMS/POS system, part of which is used to sell subscriptions for their services - hence the need for recurring billing.<br /> <br /> </p> <p>It took a little digging and the help of Transaction Express' customer service to find the API's documentation, but i was pleasantly surprised when I received it. &nbsp;The docs were thorough, detailed and gave SOAP envelope examples that allow me to rapidly build up my library. Plus the doc's error and troubleshooting information help cut down on email tag with their support team which I'm sure they appreciate as well. &nbsp;When I did have to contact their support team, they were fast and provided accurate answers.<br /> <br /> </p> <p>What I did find slightly frustrating was the docs and the support team did not have any examples, documentation or specific support for integrating with any .NET language, only PHP. &nbsp;While they do have a WSDL so I could pull all the objects into Visual Studio, it wasn't exactly self evident how things went together because the objects themselves aren't documented within the WSDL.<br /> <br /> <br /> </p> <p>After some playing around, (and a totally unrelated, but ultimately useful, .NET example from Transaction Express' tech support) I was able piece together how to fire the Request object. &nbsp;It basically came down to this:<br /> <br /> </p> <p>MerchantWebServicesPortTypeClient client = <br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;new MerchantWebServicesPortTypeClient();<br /> Merc m = new Merc();<br /> <span style="color: #00b050;">//set merc properties</span><br /> Contact contact = new Contact();<br /> <span style="color: #00b050;">//set contact properties</span><br /> AchEcheck ach = new AchEcheck();<br /> <span style="color: #00b050;">//set ach properties</span><br /> SendTranRequest request = new SendTranRequest();<br /> <span style="color: #00b050;">//add above objects to request</span><br /> <br /> <span style="color: #00b050;">//finally, trigger call to API</span><br /> SendTranResponse response = new SendTranResponse();<br /> response = ((MerchantWebServicesPortType)(client)).SendTran(request);<br /> <br /> </p> <p>Obviously this is a simplification of the actual code needed to use the Transaction Express API. &nbsp; I found the tricky part was trying to find out that the PortTypeClient needed to be cast as a PortType. &nbsp;Ultimately I was able to figure it out because the PortTypeClient was declared as an interface.<br /> <br /> </p> <p>If you'd like to know more about how to integrate Transaction Express by TransFirst into your .NET application, please contact me for more information. &nbsp;I'd be happy to share any other useful tips I may pick up along the way. &nbsp;Or if you need assistance with the actual integration, please contact me with your project details and I can provide you with a quote.<br /> <br /> Happy Coding,</p> <p>Ted Krapf</p> <p><a href="/portals/tedkrapf.com/Docs/TransExpressExampleClass.pdf" target="_blank"><strong><span style="font-size: 16px;">Click here for the full code, please donate if it was helpful!</span></strong></a> </p> <iframe src="http://www.tedkrapf.com/portals/tedkrapf.com/paypal/TransExpressDonation.html" style="width: 250px; height: 80px; border: none;">&amp;amp;lt;/body&amp;amp;gt;&amp;amp;lt;/html&amp;amp;gt;</iframe>

[return to articles list]