Download the SDK
The SDK includes a sample Non-merchant Gateway to get you started.
Non-merchant Gateways must extend the NonmerchantGateway class.
The NonmerchantGateway class is an abstract class that defines methods that all non-merchant gateways must implement. In addition, it implements a method to handle common errors, and extends the Gateway class which can be found in /installpath/components/gateways/lib/gateway.php.
The NonmerchantGateway class can be found in /installpath/components/gateways/lib/nonmerchant_gateway.php.
When implementing nonmerchant gateways a number of errors may occur either with validation or with processing. The NonmerchantGateway class provides a method called getCommonError(), which converts common error types into error response values suitable for error message passing (i.e. can be set into Input::setErrors()). You are encouraged, whenever possible, to use these common error types.
|invalid||Use whenever the gateway processor submits an invalid request.|
|transaction_not_found||Use whenever the gateway processor does not recognize the transaction.|
|unsupported||Use whenever the gateway does not support the requested action (e.g. refund())|
Use for all other cases.