Gateway Integration and Test Examples - activemerchant/active_merchant GitHub Wiki

Gateway Examples

Below are links to successful gateway integrations of varying complexity. Please use these as reference resources when building your own gateway integration.

Cams Gateway

  • Utilizes post JSON formatting for requests
  • STANDARD_ERROR_CODE mapping

CyberSource Gateway

  • Utilizes xml formatting for requests
  • Includes integration with Spreedly’s stored credential framework

NMI Gateway

  • Utilizes post JSON formatting for requests
  • Includes integration with Spreedly’s stored credential framework

Stripe Gateway

  • Utilizes post JSON formatting for requests
  • STANDARD_ERROR_CODE mapping
  • Apple Pay as payment type

Test Examples

Below are links to live gateway tests that can be used as reference for building successful test files. Test templates are generated with the gateway skeleton so by completing the templates, you’ll be well on your way to integrating your new gateway into Active Merchant!

Remote

Cams Gateway

  • Straightforward, basic tests

CyberSource Gateway

  • Includes tests for passing additional data, stored credential, and 3DS

NMI Gateway

  • Includes tests for passing additional options, stored credential, 3DS, and e-checks

Stripe Gateway

  • Includes extensive testing for things like payment tokens, token strings, transactions with metadata, and error codes

Unit

Cams Gateway

CyberSource Gateway

NMI Gateway

Stripe Gateway