Skip to main content

Hello,

I want to accept credit card payments in my Acumatica instance using Cybersource

Acumatica already support Authorize.Net, but for Cybersource I will need to create a new payment integration.

What I understand is that I will need to create a new Payment Processing Center for cybersource, where the integration code will be written, then I should add payment method where its Payment Processing Center is the new Processing center I developed.

 

The problem is that it’s not clear how we can proceed on that, so if anyone can send us any document that can guide us in this process or give some hints and tips will be much appreciated. thanks in advance.

To integrate Cybersource with Acumatica, you'll indeed need to create a custom Payment Processing Center and tie it to the appropriate Payment Method. Since Acumatica has built-in support for Authorize.Net but not Cybersource, you'll need to develop this integration from scratch. Here’s an outline of how to proceed and some tips to guide you:

Step-by-Step Process:

1. Understand Acumatica Payment Plugin Framework

Acumatica provides a framework for integrating third-party payment gateways through its Payment Plugin Architecture. You'll need to familiarize yourself with how Acumatica handles payment integrations. The existing Authorize.Net integration can serve as a good reference.

  • Check out Acumatica I100 Developer Guide for details on how to build payment plugins.
  • Review the Payment Processing namespace in Acumatica's API documentation to understand available classes and methods.

2. Create a New Payment Plugin (Processing Center)

This will involve creating a new payment plugin that integrates with Cybersource’s API. Key steps include:

  • Create a new customization project in Acumatica.
  • Develop a payment plugin class that implements Acumatica’s payment processing interface (PXGraph) and interacts with Cybersource’s API.
  • Use Cybersource's API documentation to understand the endpoints, authentication, and data required for payment processing (i.e., charge, authorize, void, refund, etc.).
  • Implement the following methods:
    • Authorize Payment
    • Capture Payment
    • Void Transaction
    • Refund Transaction

Each of these methods will call Cybersource’s corresponding API endpoints, process responses, and handle errors.

Code Example Structure:

 

csharp

Copy code

public class CybersourcePaymentProcessing : PXGraph<CybersourcePaymentProcessing, PaymentMethod> { // Example method to authorize a payment public void AuthorizePayment(string paymentMethodId, decimal amount, string currency) { // Create request to Cybersource API for payment authorization // Process response and update the payment status } // Add methods for Capture, Refund, Void, etc. }

3. Register the Custom Payment Processing Center

Once you've developed your integration code:

  • Go to Finance > Configuration > Payment Processing Centers.
  • Create a new Payment Processing Center entry for Cybersource.
  • In the customization code, register the custom payment plugin (the class created in step 2) with Acumatica so that it's recognized in the payment processing center setup.

Example:

 

csharp

Copy code

/PXPaymentProcessingTypeName(typeof(CybersourcePaymentProcessing))] public class CybersourceProcessingCenter : PXGraphExtension<PaymentProcessingGraph> { // Additional configurations if needed }

4. Define the Payment Method

After the Payment Processing Center is created:

  • Go to Finance > Configuration > Payment Methods.
  • Create a new Payment Method and link it to your new Cybersource Payment Processing Center.

5. Test the Integration

Once everything is set up, you’ll need to test the integration thoroughly by:

  • Processing test transactions (authorize, capture, void, refund) in both live and sandbox modes.
  • Use the Cybersource test environment to simulate real-world scenarios.
  • Ensure that you handle errors gracefully, such as declined transactions, network failures, etc.

6. Customization Deployment

Once tested, you can deploy your customization as follows:

  • Export the customization project.
  • Import the customization into the production instance of Acumatica.

Helpful Tips:

  • Cybersource API Integration:

    • Cybersource has a comprehensive API, so make sure to leverage their developer portal for SDKs, guides, and testing tools. The API supports REST and SOAP protocols, and you'll want to use the REST API for ease of integration.
    • Authentication with Cybersource uses API keys or OAuth tokens. Ensure you have the appropriate credentials set up.
  • PCI Compliance: Be mindful of PCI DSS compliance requirements. Acumatica’s payment processing integrations are designed to handle credit card data securely, so ensure that any integration you develop also adheres to these standards.

  • Testing: Before going live, run thorough tests using Cybersource's test environment. Check all transaction types: authorization, capture, void, and refunds.

  • Use Acumatica’s Existing Documentation and Resources:

    • Acumatica's Open University has many resources related to customization and development.
    • Review the existing Authorize.Net plugin code (found in the customization project) to see how Acumatica integrates with payment gateways.
  • Performance Considerations: Since payment gateway communication involves API calls, ensure you have error handling and retries in case of network issues or timeouts.

Documentation Resources:

  • Acumatica Developer Guide
  • Cybersource API Documentation
  • Acumatica Customization Guide

By following these steps and utilizing the available resources, you should be able to create a custom Cybersource payment integration within Acumatica. 💡


Thanks so much @chameera71  for all the provided details, I will go through the guidelines you have shared here and update what I will reach here again!


Reply