OMS Custom Payment Integrations

Introduction

This document allows System Integrators to build their payment integrations into the Magento

Magento OMS Custom Payment Integration Guide

Before starting development

Before starting development, it is recommended to engage with Magento Technical Support team, to:

  • agree on a suitable custom payment endpoint name
  • receive an OAuth 2.0 client id and client secret that could be used to authorize the HTTP requests being sent to the Magento Integration Bus (MIB).

During deployment

During application deployment process, or periodically by some scheduled process:

  • registration of the MIB custom payment end-point

Custom Payment Integration during Development

At runtime

A custom payment integration is expected to:

  • Deal with incoming payment commands in the following way:

    • accept payment commands forwarded by MIB to the URL specified in the MIB registration message
    • adapt and transform the payment command received to a format suitable for the payment gateway systems
    • interact with the payment provider API to perform the action requested in the payment command
    • in the event of an error in the communication with the payment gateway (e.g., due to a network outage) the custom payment integration is expected to keep trying until the message is successfully delivered to the gateway

Custom Payment Integration at Runtime 1

  • And, generate payment events in the following way:

    • either poll the payment provider for a payment action outcome or expose a web hook where the payment gateway can push notifications
    • adapt and transform the payment action outcome response or the web hook notification received from the payment gateway to a payment event
    • send the payment event to the MIB reno-proxy endpoint delegate URL

Custom Payment Integration at Runtime 2

Before starting development

Before starting development, it is recommended to engage with Magento Technical Support team, to:

  • agree on a suitable custom payment endpoint name
  • receive an OAuth 2.0 client id and client secret that could be used to authorize the HTTP requests being sent to MIB.

Use the received values to configure the following fields in reno-diy/app/config/parameters.yml:

  • service_bus.endpoint_name
  • mom_client, and
  • service_bus.secret

During deployment

During application deployment process, or periodically by some scheduled process:

  • registration of the MIB custom payment end-point

RENO DIY provides the following command to easily register the custom payment end-point:

bin/console service_bus:register_payment_command_endpoint -vvv