- public static function &singleton($mode, &$paymentProcessor, &$paymentForm = NULL, $force = false) {
+ public static function &singleton($mode, &$paymentProcessor, &$paymentForm = NULL, $force = FALSE) {
// Generate the request xml that is send to Realex Payments.
$request_xml = "<request type='auth' timestamp='{$this->_getParam('timestamp')}'>
<merchantid>{$this->_getParam('merchant_ref')}</merchantid>
// Generate the request xml that is send to Realex Payments.
$request_xml = "<request type='auth' timestamp='{$this->_getParam('timestamp')}'>
<merchantid>{$this->_getParam('merchant_ref')}</merchantid>
* Format the params from the form ready for sending to Realex. Also perform some validation
*/
public function setRealexFields(&$params) {
* Format the params from the form ready for sending to Realex. Also perform some validation
*/
public function setRealexFields(&$params) {
$this->_setParam('currency', $config->defaultCurrency);
// Format the expiry date to MMYY
$this->_setParam('currency', $config->defaultCurrency);
// Format the expiry date to MMYY
$this->_setParam('exp_date', $expmonth . $expyear);
if (isset($params['credit_card_start_date']) && (strlen($params['credit_card_start_date']['M']) !== 0) &&
(strlen($params['credit_card_start_date']['Y']) !== 0)
) {
$this->_setParam('exp_date', $expmonth . $expyear);
if (isset($params['credit_card_start_date']) && (strlen($params['credit_card_start_date']['M']) !== 0) &&
(strlen($params['credit_card_start_date']['Y']) !== 0)
) {