Implementing a Payment Gateway requires PHP knowledge and is not part of support, this documentation is written for programmers. Already available Gateways can be seen here.
The payment gateway folder and files will have to be located in [SITE_ROOT]\administrator\components\com_rbids\thefactory\payments\plugins\gateways\
The main folder will be named "pay_mygateway" and contain the following files:
Must contain:
defined('_JEXEC') or die('Restricted access'); require_once(realpath(dirname(__FILE__).DS.'..'.DS.'..'.DS.'..'.DS.'classes'.DS.'gateways.php'));
Then a class named after the gateway folder which extends "TheFactoryPaymentGateway" has to be created, it must also contain:
class Pay_mygateway extends TheFactoryPaymentGateway { var $name='pay_mygateway'; //gateway name, used to load gateway parameters saved with form.xml var $fullname='My Payment Gateway';
function getPaymentForm($order,$items,$urls,$shipping=null,$tax=null) { function getPaymentForm($order,$items,$urls,$shipping=null,$tax=null) { $model=&JModel::getInstance('Gateways','JTheFactoryModel'); //loads TheFactory gateway model $params=$model->loadGatewayParams($this->name); //loads gateway parameters ...
Payment Form Values
Value | Description |
---|---|
$paypal_address | website paypal email |
$order | object containing order data |
$urls | return_url, cancel_url, notify_url |
$urls
URL | Description |
---|---|
return_url | The URL where the gateway will redirect after payment is completed |
cancel_url | The URL where the gateway will redirect if payment is cancelled |
notify_url | The IPN (Instant Payment Notification) URL |
The relevant Reverse Auction payment statuses are: ok, error and manual_check. These are extension specific and should be used as they are.
Any number of functions can be created depending on the Payment Processor's features and requirements, an example of such a function is the validate_ipn() used in the Pay Pal implementation. Use their specific documentation to see where something more is needed.