Replacing a Legacy Payment Gateway

Q1 2020—Q3 2020 · Full-Time · State Government Agency

eCommerce · Payment Integration · ASP.NET Web Forms · VB.NET/Visual Basic · SQL · JavaScript · APIs · JSON

The agency was required to replace its CyberSource payment integration with Authorize.Net, and our team was already past the migration deadline when I was assigned the work. With no technical implementation plan and limited experience with APIs or payment processing, I had to quickly learn the existing payment workflow and determine what needed to change.

I built the new Authorize.Net integration with little API experience and adapted it to work with the application's existing cart, ordering, and payment processes.

At a Glance

 

Role: IT Programmer Analyst II

Experience: 1 year of professional programming experience, 8 months of experience with the eCommerce system

Environment: ASP.NET Web Forms, VB.NET/Visual Basic · JavaScript · APIs · JSON · SQL · CyberSource · Authorize.Net

Focus: Payment integration · Backend development · eCommerce · Testing · Production transition

Status: Replacement completed and launched in Q3 2020. There were no post-launch issues.

The Situation

The agency was required to replace its CyberSource payment integration with Authorize.Net. Our team missed the original migration deadline and received a short extension. After that extension expired, the agency began incurring charges for continuing to use CyberSource, so the message was loud and clear. “Replace it as soon as possible.”

At the time, we were also dealing with recurring problems with the existing CyberSource integration, including outages, payments that failed to go through, and payments that appeared to succeed but were not always recorded correctly in our system. Those issues were not the reason we had to migrate, but I had already been spending a fair amount of time troubleshooting them before the migration began.

I only had a year of professional programming experience and little experience working with APIs or the more complicated parts of our custom eCommerce system. There was no technical plan waiting for me. I had to learn:

  • how the existing payment and ordering process worked,

  • determine what needed to change, and

  • build the new integration.

The project also bled into the beginning of the COVID-19 pandemic, which made an already stressful situation harder. Some days I was working on the migration entirely on my own, without the usual option of turning to a coworker in person.

Learning Under Pressure

Before I could replace the payment integration, I first had to understand how the existing system actually handled payments.

The payment code was also tied into the cart, order processing, database updates, and patron receipts, most of which had been written before I joined the team.

I spent a lot of time reading documentation, tracing the existing code, and brainstorming with programmers and DBAs on my team. I also relied heavily on Authorize.Net's API documentation, example code, and other technical resources to fill in the gaps.

I didn't understand everything at the beginning. I just kept learning what I needed to know until I had enough of a picture to build the new integration.

Building the Integration

Once I understood the existing payment flow, I built the Authorize.Net integration from scratch. I used the provider's documentation and example code as a starting point, then adapted it to work with our application.

 

Building the API integration

I created the backend classes used to format the JSON requests, connected them to the payment workflow, and handled the different responses returned by Authorize.Net.

 

Connecting it to the existing system

The payment integration touched more than just the API. I had to make sure the new process worked with our existing cart, order processing, form data, receipts, and database calls.

 

Preventing duplicate payments

I also added a safeguard that disabled the payment button after the first click so that a customer could not accidentally submit the same payment more than once.

 

Getting the API connection working was only part of the job. The harder part was making the new integration behave correctly within an eCommerce system that was already in use.

Testing the Whole Process

  • Testing different outcomes

    I tested successful payments, declined transactions, invalid payment information, and other error conditions using the provider's test environment.

  • Following the order through the application

    I verified that successful payments flowed correctly through the existing ordering process, including the information shown on the patron receipt and the related application and database behavior.

  • Regression testing

    I also tested the surrounding eCommerce functionality to make sure replacing the payment gateway had not affected existing features.

  • Production testing

    After the production transition, my supervisor and I each placed test orders ourselves to confirm that the new integration worked from the customer's perspective as well as within the application.

What I Gained

More Experience Working With APIs

This project gave me my first substantial experience working with a third-party API. I learned how to read API documentation, work with JSON data, handle different responses, and fit a new integration into an existing application.

I still had more to learn about APIs and integrations, but this experience gave me a foundation I didn't have before.

Greater Confidence in My Persistence

This was a stressful project, and there were plenty of moments when I wasn't sure I could get through it. I kept working at it anyway.

The integration eventually worked, the old payment system was turned off, and the new one went into production. That experience showed me that persistence is one of my strengths, even when I don't have all the answers.

More Confidence in My Own Abilities

More than anything, this project changed how I saw myself as a developer.

I was early in my career and working on a problem that felt much bigger than my experience level. I didn't become an expert overnight, but I learned that I can take on something I don't fully understand, figure out what I need to know, and keep working until I find a way forward.