This document will help you to create EPP-DRS payment module.
You can find sources for PayPal and BeanStream modules inside EPP-DRS SDK.
EPP-DRS payment module is a folder inside module/payments. Folder name is the name of your module.
Module folder must contain at least one file named class.PaymentModule.php.
This file must contain PHP class called MyPaymentModule, where My is the name of your payment module.
Module folder must also be named My in this case.
The class must conform the following requirements:
IPostBackPaymentModule or IDirectPaymentModule interface
For example, PayPal module will be defined like this:
class PayPalPaymentModule extends AbstractPaymentModule implements IPostBackPaymentModule { }
If your module does not redirect users to external webpage and proccesses your payment internally (for example, using XML-RPC, SOAP or other protocol), and the status of the payment is known immediately, than you must implement IDirectPaymentModule. If to make a payment, user must leave your site and fill forms on gateway's website, then you must implement IPostBackPaymentModule.
IDirectPaymentModule contains one single method, ProcessPayment(), which is called when user submits a payment form. See phpdoc for detailed description of a method.
Since this interface describes stateless transactions, it has two main methods: RedirectToGateway() and OnPaymentComplete()
See phpdoc for detailed description of each method.
The following proccess diagram will help you understand the ordering proccess flow:
PAPI/samples/PayPal/ or PAPI/samples/BeanStream/ inside SDK to modules/payments inside EPP-DRS.MyPaymentModule. This will be the name of your module.MyPaymentModule.www/images/modules/My_icon.gif
You must create an image that will be displayed as a module icon, and copy it in www/images/modules/ModuleName_icon.gif.
You can find a template for creating module icons in resources/www/images/modules/template.png inside SDK.