예제 #1
0
 /**
  * Constructor function
  *
  * @param object $config
  */
 function os_authnet($params)
 {
     parent::setName('os_authnet');
     parent::os_payment();
     parent::setCreditCard(true);
     parent::setCardType(false);
     parent::setCardCvv(true);
     parent::setCardHolderName(false);
     $this->mode = $params->get('authnet_mode', 0);
     $this->login = $params->get('x_login');
     $this->transkey = $params->get('x_tran_key');
     if ($this->mode) {
         $this->url = "https://secure.authorize.net/gateway/transact.dll";
     } else {
         $this->url = "https://test.authorize.net/gateway/transact.dll";
     }
     $this->params['x_delim_data'] = "TRUE";
     $this->params['x_delim_char'] = "|";
     $this->params['x_relay_response'] = "FALSE";
     $this->params['x_url'] = "FALSE";
     $this->params['x_version'] = "3.1";
     $this->params['x_method'] = "CC";
     $this->params['x_type'] = "AUTH_CAPTURE";
     $this->params['x_login'] = $this->login;
     $this->params['x_tran_key'] = $this->transkey;
     $this->params['x_invoice_num'] = $this->_invoiceNumber();
 }
예제 #2
0
 /**
  * Constructor functions, init some parameter
  *
  * @param object $config
  */
 function os_paypal($params)
 {
     parent::setName('os_paypal');
     parent::os_payment();
     parent::setCreditCard(false);
     parent::setCardType(false);
     parent::setCardCvv(false);
     parent::setCardHolderName(false);
     $this->ipn_log = true;
     $this->ipn_log_file = JPATH_COMPONENT . '/ipn_logs.txt';
     $this->_mode = $params->get('paypal_mode');
     if ($this->_mode) {
         $this->_url = 'https://www.paypal.com/cgi-bin/webscr';
     } else {
         $this->_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
     }
     $this->setParam('business', $params->get('paypal_id'));
     $this->setParam('rm', 2);
     $this->setParam('cmd', '_xclick');
     $this->setParam('no_shipping', 1);
     $this->setParam('no_note', 1);
     $this->setParam('lc', 'US');
     $this->setParam('currency_code', $params->get('paypal_currency', 'USD'));
     $this->setParam('charset', 'utf-8');
 }
예제 #3
0
 /**
  * Constructor functions, init some parameter
  *
  * @param object $params
  */
 function os_offline($params)
 {
     parent::setName('os_offline');
     parent::os_payment();
     parent::setCreditCard(false);
     parent::setCardType(false);
     parent::setCardCvv(false);
     parent::setCardHolderName(false);
 }
예제 #4
0
 function os_eway($params)
 {
     parent::setName('os_eway');
     parent::os_payment();
     parent::setCreditCard(true);
     parent::setCardType(false);
     parent::setCardCvv(true);
     parent::setCardHolderName(true);
     $this->myCustomerID = $params->get('eway_customer_id');
     $ewayMode = $params->get('eway_mode', 0);
     $ewayCvn = $params->get('eway_cvn', 0);
     if ($ewayMode) {
         if ($ewayCvn) {
             $gatewayURL = 'https://www.eway.com.au/gateway_cvn/xmlpayment.asp';
         } else {
             $gatewayURL = 'https://www.eway.com.au/gateway/xmlpayment.asp';
         }
     } else {
         //Test mode
         if ($ewayCvn) {
             $gatewayURL = 'https://www.eway.com.au/gateway_cvn/xmltest/testpage.asp';
         } else {
             $gatewayURL = 'https://www.eway.com.au/gateway/xmltest/testpage.asp';
         }
     }
     $this->myGatewayURL = $gatewayURL;
 }