/** * Constructor. * * @param array $options Class options to set. * @param HTTP_Request2 $request Request object to use (optional) * * @see Payment_Process::setOptions() * @return void */ public function __construct($options = array(), HTTP_Request2 $request = null) { parent::__construct($options, $request); $this->_driver = 'ANZ'; $this->_makeRequired('login', 'password', 'action', 'amount', 'invoiceNumber', 'transactionReference'); }
function validate() { if (empty($this->_options['keyfile']) || !file_exists($this->_options['keyfile'])) { throw new Payment_Process2_Exception('Invalid key file'); } if (empty($this->_options['authorizeUri'])) { throw new Payment_Process2_Exception('Invalid authorizeUri'); } return parent::validate(); }
/** * Validate the zip code. * * Zip is only required if AVS is enabled. * * @return bool * @throws Payment_Process2_Exception */ function _validateZip() { if (strlen($this->zip) || $this->performAvs) { return parent::_validateZip(); } return true; }
/** * Constructor. * * @param array $options Class options to set. * @see Payment_Process::setOptions() * @return void */ function __construct($options = array(), HTTP_Request2 $request = null) { parent::__construct($options, $request); $this->_driver = 'TrustCommerce'; }
/** * Processes a callback from payment gateway * * Success here doesn't mean the transaction was approved. It means * the callback was received and processed without technical difficulties. * * @return Payment_Process2_Result instance on success, PEAR_Error on failure * @todo Implement support for PayPal IPN??? */ function processCallback() { $result =& parent::processCallback(); return $result; }
/** * Constructor. * * @param array $options Class options to set. * @see Payment_Process::setOptions() * @return void */ function __construct($options = array(), HTTP_Request2 $request = null) { parent::__construct($options, $request); $this->_driver = 'AuthorizeNet'; $this->_makeRequired('login', 'password', 'action'); }
public function testShouldSetOptionsCorrectly3() { $object = new Payment_Process2_Common(); try { $object->setOptions(null); $this->fail("Should have raised exceptiosn"); } catch (InvalidArgumentException $iae) { } }
/** * Constructor. * * @param array $options Class options to set. * * @see Payment_Process::setOptions() */ public function __construct($options = array(), HTTP_Request2 $request = null) { parent::__construct($options, $request); $this->_driver = 'Bibit'; $this->_makeRequired('login', 'password', 'ordercode', 'description', 'amount', 'currency', 'exponent', 'cardNumber', 'expDate', 'action'); }