Ejemplo n.º 1
0
 /**
  * save setting
  */
 static function set_api($api = array())
 {
     update_option('et_google_checkout_api', $api);
     if (!self::is_enable()) {
         ET_Payment::disable_gateway('google_checkout');
         return __('Your Google Checkout was disabled because of invalid settings!', ET_DOMAIN);
     }
     return true;
 }
Ejemplo n.º 2
0
 /**
  * update stripe api setting
  */
 function set_api($api)
 {
     update_option('et_stripe_api', $api);
     if (!$this->is_enable()) {
         $gateways = ET_Payment::get_gateways();
         if (isset($gateways['stripe']['active']) && $gateways['stripe']['active'] != -1) {
             ET_Payment::disable_gateway('stripe');
             return __('Api setting invalid', ET_DOMAIN);
         }
     }
     return true;
 }
Ejemplo n.º 3
0
 /**
  * save api setting
  */
 static function set_api($api = array())
 {
     update_option('et_authorize_api', $api);
     if (!self::is_enable()) {
         $gateways = self::get_gateways();
         if (isset($gateways['authorize']['active']) && $gateways['authorize']['active'] != -1) {
             ET_Payment::disable_gateway('authorize');
             return __('Your Authorize.Net was disabled because of invalid settings!', ET_DOMAIN);
         }
     }
     return true;
 }
Ejemplo n.º 4
0
 /**
  * update ppexpress api setting
  */
 static function set_api($api = array())
 {
     update_option('ce_paypal_express_api', $api);
     $instance = self::getInstance();
     if (!self::$instance->is_enable()) {
         ET_Payment::disable_gateway('ce_ppexpress');
         return __('Api setting invalid', ET_DOMAIN);
     }
     return true;
 }
Ejemplo n.º 5
0
 static function set_api($api = array())
 {
     update_option('et_paypal_api', $api);
     if (!self::is_enable()) {
         $gateways = self::get_gateways();
         if (isset($gateways['paypal']['active']) && $gateways['paypal']['active'] != -1) {
             ET_Payment::disable_gateway('paypal');
             return __('Paypal option is disabled because of invalid setting.', ET_DOMAIN);
         }
     }
     return true;
 }