function SI_CCProcessor_AuthorizeNet() { parent::SI_CCProcessor(); $this->addConfigOption('username', 'Authorize.Net Username', 'Your Authorize.Net username to be used for processing credit cards', 'string'); $this->addConfigOption('password', 'Authorize.Net Password', 'Your Authorize.Net password', 'string'); $this->addConfigOption('test_mode', 'Test Mode', 'Enable or disable test mode for Authorize.Net', 'bool'); }
function SI_CCProcessor_PayPalPro() { parent::SI_CCProcessor(); $this->addConfigOption('username', 'PayPal Username', 'Your PayPal API username to be used for processing credit cards', 'string'); $this->addConfigOption('password', 'PayPal Password', 'Your PayPal API password', 'string'); $this->addConfigOption('signature', 'PayPal Signature', 'Your PayPal API Signature', 'string'); $this->addConfigOption('sandbox', 'Sandbox', 'True to use the PayPal sandbox servers', 'bool'); }
} $payment = new SI_Payment(); $payment->company_id = $company_id; $title = "Add Payment"; if($_POST['save']){ $payment->amount = preg_replace('/[^0-9\.]/','', $_POST['amount']); if($payment->amount > $invoice->getTotal()){ fatal_error("Amount can not be more than amount due on the invoice!\n"); } $payment->timestamp = time(); $payment->type = 'CC'; // Process the card $cc_processor = SI_CCProcessor::getInstance(); $params = array( 'id' => $company_id, 'first_name' => $_POST['card_first_name'], 'last_name' => $_POST['card_last_name'], 'address' => $_POST['card_address'], 'city' => $_POST['card_city'], 'state' => $_POST['card_state'], 'zip' => $_POST['card_zip'], 'cc_number' => $_POST['card_number'], 'cc_expiration_month' => $_POST['card_exp_month'], 'cc_expiration_year' => $_POST['card_exp_year'], 'cc_type' => $_POST['card_type'], 'cc_cvv' => $_POST['card_cvv'], 'amount' => $payment->amount );