Exemple #1
0
 function __construct($settings = array(), $mode)
 {
     $this->_x_test_request = ET_Payment::get_payment_test_mode();
     $api = ET_Authorize::get_api();
     if ($this->_x_test_request) {
         $this->_post_location = 'https://test.authorize.net/gateway/transact.dll';
     } else {
         $this->_post_location = 'https://secure.authorize.net/gateway/transact.dll ';
     }
     $this->_login = $api['x_login'];
     $this->_md5_hash = $api['x_MD5_hash'];
     $this->_transaction_key = $api['x_transaction_key'];
     $this->_x_method = 'cc';
     $this->_x_show_form = 'payment_form';
     $default_settings = array('return' => 'http://localhost', 'cancel' => 'http://localhost');
     $settings = wp_parse_args($settings, $default_settings);
     $this->_x_receipt_link_url = $settings['return'];
 }