/** * Initialize */ public static function init() { if (Pronamic_WP_Pay_Extensions_Jigoshop_Jigoshop::is_active()) { $slug = self::SLUG; add_action("pronamic_payment_status_update_{$slug}", array(__CLASS__, 'update_status'), 10, 2); add_filter("pronamic_payment_source_text_{$slug}", array(__CLASS__, 'source_text'), 10, 2); } }
/** * Constructs and initialize an iDEAL gateway */ public function __construct() { /* * Parent constructor only exists in Jigoshop 1.3+: * @see https://github.com/jigoshop/jigoshop/blob/1.2/gateways/gateway.class.php * @see https://github.com/jigoshop/jigoshop/blob/1.3/gateways/gateway.class.php * * The 'jigoshop::jigoshop_version()' function doesn't exists in version < 1.3. * @see https://github.com/jigoshop/jigoshop/blob/dev/classes/jigoshop.class.php#L54 * * Use of Jigoshop version constant: * 1.0 = 1202010 - @see https://github.com/jigoshop/jigoshop/blob/1.0/jigoshop.php#L28 * 1.1 = 1202130 - @see https://github.com/jigoshop/jigoshop/blob/1.1/jigoshop.php#L28 * 1.2 = 1203310 - @see https://github.com/jigoshop/jigoshop/blob/1.2/jigoshop.php#L45 * 1.3 = 1207160 - @see https://github.com/jigoshop/jigoshop/blob/1.3/jigoshop.php#L45 * 1.9.5 = 1307110 - @see https://github.com/jigoshop/jigoshop/blob/1.9.5/jigoshop.php#L45 * 1.9.6 = 1.9.6 - @see https://github.com/jigoshop/jigoshop/blob/1.9.6/jigoshop.php#L45-L47 */ if (version_compare(JIGOSHOP_VERSION, 1207160, '>=') || version_compare(JIGOSHOP_VERSION, '1.3', '>=')) { parent::__construct(); } // Give this gateway an unique ID so Jigoshop can identiy this gateway $this->id = self::ID; // The method title that Jigoshop will display in the admin $this->method_title = __('Pronamic iDEAL', 'pronamic_ideal'); // The icon that Jigoshop will display on the payment methods radio list $this->icon = plugins_url('images/icon-24x24.png', Pronamic_WP_Pay_Plugin::$file); // Let Jigoshop know that this gateway has field // Technically only iDEAL advanced variants has fields $this->has_fields = true; // Set default Jigoshop variables, load them form the WordPress options $this->enabled = Pronamic_WP_Pay_Extensions_Jigoshop_Jigoshop::get_option('pronamic_pay_ideal_jigoshop_enabled'); $this->title = Pronamic_WP_Pay_Extensions_Jigoshop_Jigoshop::get_option('pronamic_pay_ideal_jigoshop_title'); $this->description = Pronamic_WP_Pay_Extensions_Jigoshop_Jigoshop::get_option('pronamic_pay_ideal_jigoshop_description'); // Set own variables, load them form the WordPress options $this->config_id = Pronamic_WP_Pay_Extensions_Jigoshop_Jigoshop::get_option('pronamic_pay_ideal_jigoshop_config_id'); // Actions add_action('receipt_' . self::ID, array(&$this, 'receipt_page')); }
public function get_currency_alphabetic_code() { // @see http://plugins.trac.wordpress.org/browser/jigoshop/tags/1.1.1/admin/jigoshop-admin-settings-options.php#L421 // @see https://github.com/jigoshop/jigoshop/blob/1.12/jigoshop.php#L1247-L1255 return Pronamic_WP_Pay_Extensions_Jigoshop_Jigoshop::get_option('jigoshop_currency'); }