You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Merchant Gateways must extend MerchantGateway class and implement at least one of the four interfaces provided by the payment system, to ensure proper functionality and integration.

MerchantGateway

The MerchantGateway class is an abstract class that defines methods that all merchant gateways must implement. In addition, it implements a set of overwritable helper methods to handle common errors as well as HTTP requests.

The MerchantGateway class can be found in /installpath/components/gateways/lib/merchant_gateway.php.

Merchant Interfaces

There are four merchant gateway interfaces, each with its own unique set of method requirements. A payment gateway must implement at least one of these interfaces.

  • MerchantCc found in /installpath/components/gateways/lib/merchant_cc.php
  • MerchantAch found in /installpath/components/gateways/lib/merchant_ach.php
  • MerchantCcOffsite found in /installpath/components/gateways/lib/merchant_cc_offsite.php
  • MerchantAchOffsite found in /installpath/components/gateways/lib/merchant_ach_offsite.php

Both the MerchantCc and MerchantAch interfaces allow for the capturing, returning, and voiding of funds with account information stored within Blesta. The MerchantCc interface handles credit cards, while the MerchantAch interface handles bank account transfers.

The MerchantCcOffsite and MerchantAchOffsite interfaces allow for the capturing, returning, and voiding of funds stored with the gateway processor. In addition, these interfaces define methods allowing payment account details to be stored, updated, and removed from the gateway processor. Again, the MerchantCcOffsite interface handles credit cards, while the MerchantAchOffsite interfaces handles bank account transfers.

The following table will help identify which interfaces should be implemented for a payment gateway based upon the features of that payment processor.

Processor FeatureMerchantCcMerchantAchMerchantCcOffsiteMerchantAchOffsite
Accept Credit CardsYesNoMaybeNo
Accept Bank TransfersNoYesNoMaybe
Allow Credit Card Account StorageMaybeNoYesNo
Allow Bank Account StorageNoMaybeNoYes
  • No labels