コード例 #1
0
ファイル: ANZ.php プロジェクト: pear/payment_process2
 /**
  * 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');
 }
コード例 #2
0
ファイル: LinkPoint.php プロジェクト: pear/payment_process2
 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();
 }
コード例 #3
0
ファイル: Transfirst.php プロジェクト: pear/payment_process2
 /**
  * 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;
 }
コード例 #4
0
 /**
  * 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';
 }
コード例 #5
0
ファイル: PayPal.php プロジェクト: pear/payment_process2
 /**
  * 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;
 }
コード例 #6
0
 /**
  * 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');
 }
コード例 #7
0
 public function testShouldSetOptionsCorrectly3()
 {
     $object = new Payment_Process2_Common();
     try {
         $object->setOptions(null);
         $this->fail("Should have raised exceptiosn");
     } catch (InvalidArgumentException $iae) {
     }
 }
コード例 #8
0
ファイル: Bibit.php プロジェクト: pear/payment_process2
 /**
  * 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');
 }