The starting point for the integration should be stubbing out the PaymentGateway plugin. I believe the nearest equivalent will be the Braintree integration, given its Hosted Fields implementation is similar in kind to CardPointe's Hosted iFrame Tokenizer.
The basic settings the gateway will need to incorporate include the Merchant ID, API username, and API password. The Merchant ID will be used in the body of API requests, and the API username and password will be base64 encoded and passed in a header.
During testing, the details from the following page may be used: https://support.cardpointe.com/gateway-test-credentials
When you look at the HostedFields
plugin in the Braintree module, you'll see that we made use of a third party PHP library to instantiate an api
property during gateway construction. There doesn't appear to be an actively maintained equivalent for CardPointe, just a library that hasn't seen a commit in 3 years and is not PHP 8 compatible.
Similar to our AvaTax integration, I believe we should just create our own API connector service called CardPointeApi in the module itself. This service can be stubbed out for the purpose of this ticket, and it should be instantiated in the gateway to an api
property.
Fixed
Code