function update()
 {
     parent::update();
     $gateway_options = array($this->gateway . "_dev_email" => $_REQUEST[$this->gateway . '_dev_email'], $this->gateway . "_app_id" => $_REQUEST[$this->gateway . '_app_id'], $this->gateway . "_site" => $_REQUEST[$this->gateway . '_site'], $this->gateway . "_email" => $_REQUEST[$this->gateway . '_email'], $this->gateway . "_api_username" => $_REQUEST[$this->gateway . '_api_username'], $this->gateway . "_api_password" => $_REQUEST[$this->gateway . '_api_password'], $this->gateway . "_api_signature" => $_REQUEST[$this->gateway . '_api_signature'], $this->gateway . "_sb_email" => $_REQUEST[$this->gateway . '_sb_email'], $this->gateway . "_api_sb_username" => $_REQUEST[$this->gateway . '_api_sb_username'], $this->gateway . "_api_sb_password" => $_REQUEST[$this->gateway . '_api_sb_password'], $this->gateway . "_api_sb_signature" => $_REQUEST[$this->gateway . '_api_sb_signature'], $this->gateway . "_fees_payer" => $_REQUEST[$this->gateway . '_fees_payer'], $this->gateway . "_currency" => $_REQUEST['currency'], $this->gateway . "_status" => $_REQUEST[$this->gateway . '_status'], $this->gateway . "_manual_approval" => $_REQUEST[$this->gateway . '_manual_approval'], $this->gateway . "_booking_feedback" => wp_kses_data($_REQUEST[$this->gateway . '_booking_feedback']), $this->gateway . "_booking_feedback_free" => wp_kses_data($_REQUEST[$this->gateway . '_booking_feedback_free']), $this->gateway . "_booking_feedback_thanks" => wp_kses_data($_REQUEST[$this->gateway . '_booking_feedback_thanks']), $this->gateway . "_booking_timeout" => $_REQUEST[$this->gateway . '_booking_timeout'], $this->gateway . "_return" => $_REQUEST[$this->gateway . '_return'], $this->gateway . "_cancel_return" => $_REQUEST[$this->gateway . '_cancel_return']);
     foreach ($gateway_options as $key => $option) {
         update_option('em_' . $key, stripslashes($option));
     }
     //default action is to return true
     return true;
 }
 /**
  * Update Getway Settings
  * @since 1.3
  * @version 1.2
  */
 function update()
 {
     parent::update();
     if (!isset($_POST['mycred_gateway']) || !is_array($_POST['mycred_gateway'])) {
         return;
     }
     // Prep
     $data = $_POST['mycred_gateway'];
     $new_settings = array();
     // Setup
     $new_settings['setup'] = $data['setup'];
     $new_settings['type'] = sanitize_text_field($data['type']);
     $new_settings['refund'] = abs($data['refund']);
     $new_settings['share'] = abs($data['share']);
     // Logs
     $new_settings['log']['purchase'] = trim(stripslashes($data['log']['purchase']));
     $new_settings['log']['refund'] = trim(stripslashes($data['log']['refund']));
     if ($new_settings['setup'] == 'multi') {
         $new_settings['rate'] = sanitize_text_field($data['rate']);
     } else {
         $new_settings['rate'] = $this->prefs['rate'];
     }
     // Override Pricing Options
     if ($new_settings['setup'] == 'single') {
         update_option('dbem_bookings_currency_decimal_point', $this->core->format['separators']['decimal']);
         update_option('dbem_bookings_currency_thousands_sep', $this->core->format['separators']['thousand']);
         update_option('dbem_bookings_currency', 'XMY');
         if (empty($this->core->before) && !empty($this->core->after)) {
             $format = '@ #';
         } elseif (!empty($this->core->before) && empty($this->core->after)) {
             $format = '# @';
         }
         update_option('dbem_bookings_currency_format', $format);
     }
     // Labels
     $new_settings['labels']['link'] = sanitize_text_field(stripslashes($data['labels']['link']));
     $new_settings['labels']['header'] = sanitize_text_field(stripslashes($data['labels']['header']));
     $new_settings['labels']['button'] = sanitize_text_field(stripslashes($data['labels']['button']));
     $new_settings['labels']['checkout'] = sanitize_text_field(stripslashes($data['labels']['checkout']));
     // Messages
     $new_settings['messages']['success'] = sanitize_text_field(stripslashes($data['messages']['success']));
     $new_settings['messages']['error'] = sanitize_text_field(stripslashes($data['messages']['error']));
     // Save Settings
     $current = $this->prefs;
     $this->prefs = mycred_apply_defaults($current, $new_settings);
     update_option('mycred_eventsmanager_gateway_prefs', $this->prefs);
     // Let others play
     do_action('mycred_em_save_settings', $this);
     //default action is to return true
     return true;
 }
 function update()
 {
     parent::update();
     $gateway_options = array($this->gateway . "_email" => $_REQUEST[$this->gateway . '_email'], $this->gateway . "_site" => $_REQUEST[$this->gateway . '_site'], $this->gateway . "_currency" => $_REQUEST['currency'], $this->gateway . "_inc_tax" => $_REQUEST['em_' . $this->gateway . '_inc_tax'], $this->gateway . "_lc" => $_REQUEST[$this->gateway . '_lc'], $this->gateway . "_status" => $_REQUEST[$this->gateway . '_status'], $this->gateway . "_format_logo" => $_REQUEST[$this->gateway . '_format_logo'], $this->gateway . "_format_border" => $_REQUEST[$this->gateway . '_format_border'], $this->gateway . "_manual_approval" => $_REQUEST[$this->gateway . '_manual_approval'], $this->gateway . "_booking_feedback" => wp_kses_data($_REQUEST[$this->gateway . '_booking_feedback']), $this->gateway . "_booking_feedback_free" => wp_kses_data($_REQUEST[$this->gateway . '_booking_feedback_free']), $this->gateway . "_booking_feedback_thanks" => wp_kses_data($_REQUEST[$this->gateway . '_booking_feedback_thanks']), $this->gateway . "_booking_timeout" => $_REQUEST[$this->gateway . '_booking_timeout'], $this->gateway . "_return" => $_REQUEST[$this->gateway . '_return'], $this->gateway . "_cancel_return" => $_REQUEST[$this->gateway . '_cancel_return']);
     foreach ($gateway_options as $key => $option) {
         update_option('em_' . $key, stripslashes($option));
     }
     //default action is to return true
     return true;
 }
 function update()
 {
     parent::update();
     $gateway_options = array($this->gateway . "_mode" => $_REQUEST['mode'], $this->gateway . "_api_user" => $_REQUEST['api_user'], $this->gateway . "_api_key" => $_REQUEST['api_key'], $this->gateway . "_user_login" => $_REQUEST['user_login'], $this->gateway . "_email_customer" => $_REQUEST['email_customer'], $this->gateway . "_header_email_receipt" => $_REQUEST['header_email_receipt'], $this->gateway . "_footer_email_receipt" => $_REQUEST['footer_email_receipt'], $this->gateway . "_md5_hash" => $_REQUEST['md5_hash'], $this->gateway . "_manual_approval" => $_REQUEST['manual_approval'], $this->gateway . "_booking_feedback" => wp_kses_data($_REQUEST['booking_feedback']), $this->gateway . "_booking_feedback_free" => wp_kses_data($_REQUEST['booking_feedback_free']));
     foreach ($gateway_options as $key => $option) {
         update_option('em_' . $key, stripslashes($option));
     }
     //default action is to return true
     return true;
 }
 function update()
 {
     $gateway_options = $options_wpkses = array();
     //$gateway_options[] = 'em_'. $this->gateway . '_email';
     $gateway_options[] = 'em_' . $this->gateway . '_merchantID';
     $gateway_options[] = 'em_' . $this->gateway . '_accessCode';
     $gateway_options[] = 'em_' . $this->gateway . '_secureHash';
     $gateway_options[] = 'em_' . $this->gateway . '_site';
     $gateway_options[] = 'em_' . $this->gateway . '_currency';
     $gateway_options[] = 'em_' . $this->gateway . '_inc_tax';
     $gateway_options[] = 'em_' . $this->gateway . '_lc';
     $gateway_options[] = 'em_' . $this->gateway . '_status';
     //$gateway_options[] = 'em_'. $this->gateway . '_format_logo';
     //$gateway_options[] = 'em_'. $this->gateway . '_format_border';
     $gateway_options[] = 'em_' . $this->gateway . '_manual_approval';
     $gateway_options[] = 'em_' . $this->gateway . '_booking_timeout';
     $gateway_options[] = 'em_' . $this->gateway . '_return';
     $gateway_options[] = 'em_' . $this->gateway . '_cancel_return';
     //add wp_kses filters for relevant options and merge in
     $options_wpkses[] = 'em_' . $this->gateway . '_booking_feedback';
     $options_wpkses[] = 'em_' . $this->gateway . '_booking_feedback_free';
     $options_wpkses[] = 'em_' . $this->gateway . '_booking_feedback_completed';
     foreach ($options_wpkses as $option_wpkses) {
         add_filter('gateway_update_' . $option_wpkses, 'wp_kses_post');
     }
     $gateway_options = array_merge($gateway_options, $options_wpkses);
     //pass options to parent which handles saving
     return parent::update($gateway_options);
 }
 function update()
 {
     parent::update();
     $gateway_options = array($this->gateway . "_mode" => $_REQUEST['_mode'], $this->gateway . "_test_publishable_key" => $_REQUEST['_test_publishable_key'], $this->gateway . "_test_secret_key" => $_REQUEST['_test_secret_key'], $this->gateway . "_live_publishable_key" => $_REQUEST['_live_publishable_key'], $this->gateway . "_live_secret_key" => $_REQUEST['_live_secret_key'], $this->gateway . "_email_customer" => $_REQUEST['_email_customer'], $this->gateway . "_header_email_receipt" => $_REQUEST['_header_email_receipt'], $this->gateway . "_footer_email_receipt" => $_REQUEST['_footer_email_receipt'], $this->gateway . "_manual_approval" => $_REQUEST['_manual_approval'], $this->gateway . "_booking_feedback" => wp_kses_data($_REQUEST['_booking_feedback']), $this->gateway . "_booking_feedback_free" => wp_kses_data($_REQUEST['_booking_feedback_free']), $this->gateway . "_debug" => $_REQUEST['_debug']);
     foreach ($gateway_options as $key => $option) {
         update_option('em_' . $key, stripslashes($option));
     }
     //default action is to return true
     return true;
 }
 function update()
 {
     parent::update();
     $gateway_options = array($this->gateway . "_button" => $_REQUEST['offline_button'], $this->gateway . "_form" => $_REQUEST['offline_form'], $this->gateway . "_booking_feedback" => $_REQUEST['offline_booking_feedback']);
     foreach ($gateway_options as $key => $option) {
         update_option('em_' . $key, stripslashes($option));
     }
     //default action is to return true
     return true;
 }
	/**
	* Run when saving settings, saves the settings available in self::mysettings()
	* return boolean
	*/
	public function update() {
		parent::update();

		$options = array (
			'em_' . EM_EWAY_GATEWAY . '_mode'					=> sanitize_text_field(self::getPostValue('eway_mode')),
			'em_' . EM_EWAY_GATEWAY . '_cust_id'				=> sanitize_text_field(self::getPostValue('eway_cust_id')),
			'em_' . EM_EWAY_GATEWAY . '_stored'					=> self::getPostValue('eway_stored') ? '1' : '0',
			'em_' . EM_EWAY_GATEWAY . '_beagle'					=> self::getPostValue('eway_beagle') ? '1' : '0',
			'em_' . EM_EWAY_GATEWAY . '_test_force'				=> self::getPostValue('eway_test_force') ? '1' : '0',
			'em_' . EM_EWAY_GATEWAY . '_ssl_force'				=> self::getPostValue('eway_ssl_force') ? '1' : '0',
			'em_' . EM_EWAY_GATEWAY . '_card_msg'				=> sanitize_text_field(self::getPostValue('eway_card_msg')),
			'em_' . EM_EWAY_GATEWAY . '_manual_approval'		=> self::getPostValue('manual_approval') ? '1' : '',
			'em_' . EM_EWAY_GATEWAY . '_booking_feedback'		=> wp_kses_data(self::getPostValue('booking_feedback')),
			'em_' . EM_EWAY_GATEWAY . '_booking_feedback_free'	=> wp_kses_data(self::getPostValue('booking_feedback_free')),
		);

		foreach ($options as $option => $value) {
			update_option($option, $value);
		}

		// default action is to return true
		return true;
	}