/** * Initialize the object. * * @since 1.0.0 */ public function after_load() { parent::after_load(); $this->_api = MS_Factory::load('MS_Gateway_Stripe_Api'); // If the gateway is initialized for the first time then copy settings // from the Stripe Single gateway. if (false === $this->test_secret_key) { $single = MS_Factory::load('MS_Gateway_Stripe'); $this->test_secret_key = $single->test_secret_key; $this->secret_key = $single->secret_key; $this->test_publishable_key = $single->test_publishable_key; $this->publishable_key = $single->publishable_key; $this->save(); } $this->id = self::ID; $this->name = __('Stripe Subscriptions Gateway', MS_TEXT_DOMAIN); $this->group = 'Stripe'; $this->manual_payment = false; // Recurring charged automatically $this->pro_rate = true; $this->unsupported_payment_types = array(MS_Model_Membership::PAYMENT_TYPE_PERMANENT, MS_Model_Membership::PAYMENT_TYPE_FINITE, MS_Model_Membership::PAYMENT_TYPE_DATE_RANGE); // Update all payment plans and coupons. $this->add_action('ms_gateway_toggle_stripeplan', 'update_stripe_data'); // Update a single payment plan. $this->add_action('ms_saved_MS_Model_Membership', 'update_stripe_data_membership'); // Update a single coupon. $this->add_action('ms_saved_MS_Addon_Coupon_Model', 'update_stripe_data_coupon'); }
/** * Hook to show payment info. * This is called by the MS_Factory * * @since 1.0.0 */ public function after_load() { parent::after_load(); $this->id = self::ID; $this->name = __('2Checkout', 'membership2'); $this->group = __('2Checkout', 'membership2'); $this->manual_payment = false; // Recurring charged automatically }
/** * Hook to add custom transaction status. * This is called by the MS_Factory * * @since 1.0.0 */ public function after_load() { parent::after_load(); $this->id = self::ID; $this->name = __('PayPal Single Gateway', MS_TEXT_DOMAIN); $this->group = 'PayPal'; $this->manual_payment = true; // Recurring billed/paid manually $this->pro_rate = true; }
/** * Initialize the object. * * @since 1.0.0 */ public function after_load() { parent::after_load(); $this->id = self::ID; $this->name = __('Authorize.net Gateway', 'membership2'); $this->group = 'Authorize.net'; $this->manual_payment = true; // Recurring billed/paid manually $this->pro_rate = true; }
/** * Hook to show payment info. * This is called by the MS_Factory * * @since 1.0.0 */ public function after_load() { parent::after_load(); $this->id = self::ID; $this->name = __('Free Gateway', 'membership2'); $this->group = ''; $this->active = true; $this->manual_payment = true; // Recurring billed/paid manually }
/** * Initialize the object. * * @since 1.0.0 * @internal */ public function after_load() { parent::after_load(); $this->_api = MS_Factory::load('MS_Gateway_Stripe_Api'); $this->id = self::ID; $this->name = __('Stripe Single Gateway', 'membership2'); $this->group = 'Stripe'; $this->manual_payment = true; // Recurring billed/paid manually $this->pro_rate = true; }
/** * Initialize the object. * * @since 1.0.0 * @internal */ public function after_load() { parent::after_load(); $this->_api = MS_Factory::load('MS_Gateway_Stripe_Api'); $this->id = self::ID; $this->name = __('Stripe Single Gateway', 'membership2'); $this->group = 'Stripe'; $this->manual_payment = true; // Recurring billed/paid manually $this->pro_rate = true; $this->add_filter('ms_model_pages_get_ms_page_url', 'ms_model_pages_get_ms_page_url_cb', 99, 4); }
/** * Hook to add custom transaction status. * * @since 1.0.0 */ public function after_load() { parent::after_load(); $this->id = self::ID; $this->name = __('PayPal Standard Gateway', MS_TEXT_DOMAIN); $this->group = 'PayPal'; $this->manual_payment = false; // Recurring charged automatically $this->pro_rate = false; if ($this->active && $this->is_live_mode() && strpos($this->merchant_id, '@')) { $settings_url = MS_Controller_Plugin::get_admin_url('settings', array('tab' => MS_Controller_Settings::TAB_PAYMENT)); lib2()->ui->admin_message(sprintf(__('Warning: You use your email address for the PayPal Standard gateway instead of your Merchant ID. Please check %syour payment settings%s and enter the Merchant ID instead', MS_TEXT_DOMAIN), '<a href="' . $settings_url . '">', '</a>'), 'err'); } }
/** * Hook to show payment info. * This is called by the MS_Factory * * @since 1.0.0 */ public function after_load() { parent::after_load(); $this->id = self::ID; $this->name = __('Manual Payment Gateway', 'membership2'); $this->description = __('(Bank orders, cash, etc)', 'membership2'); $this->group = __('Manual Payment', 'membership2'); $this->manual_payment = true; // Recurring billed/paid manually $this->pro_rate = true; if ($this->active) { $this->add_action('ms_controller_gateway_purchase_info_content', 'purchase_info_content'); } }
/** * Hook to show payment info. * This is called by the MS_Factory * * @since 1.0.0 */ public function after_load() { parent::after_load(); $this->id = self::ID; $this->name = __('Free Gateway', 'membership2'); $this->group = ''; $this->active = true; $this->manual_payment = true; // Recurring billed/paid manually /** * No sandbox option for manual payment gateway * The mode is always set to live */ $this->mode = 'live'; }