Пример #1
0
 public function __construct()
 {
     parent::__construct();
     $this->id = 'skrill';
     $this->title = 'Skrill';
     $this->has_fields = false;
     $this->enabled = Jigoshop_Base::get_options()->get_option('jigoshop_skrill_enabled');
     $this->title = Jigoshop_Base::get_options()->get_option('jigoshop_skrill_title');
     $this->email = Jigoshop_Base::get_options()->get_option('jigoshop_skrill_email');
     $this->locale = $this->getLocale();
     $skrillIcon = Jigoshop_Base::get_options()->get_option('jigoshop_skrill_icon');
     if (!filter_var($skrillIcon, FILTER_VALIDATE_URL)) {
         $this->icon = jigoshop::assets_url() . '/assets/images/icons/skrill.png';
     } else {
         $this->icon = $skrillIcon;
     }
     $pMeth = (array) Jigoshop_Base::get_options()->get_option('jigoshop_skrill_payment_methods_multicheck');
     $cList = '';
     foreach ($pMeth as $key => $value) {
         if ($value) {
             $cList = $cList . $key . ',';
         }
     }
     $cList = rtrim($cList, ",");
     $this->payment_methods = $cList;
     add_action('init', array($this, 'check_status_response'));
     if (isset($_GET['skrillPayment']) && $_GET['skrillPayment'] == true) {
         add_action('init', array($this, 'generate_skrill_form'));
     }
     add_action('valid-skrill-status-report', array($this, 'successful_request'));
     add_action('receipt_skrill', array($this, 'receipt_skrill'));
 }
Пример #2
0
 public function __construct()
 {
     parent::__construct();
     $options = Jigoshop_Base::get_options();
     $this->id = 'jigoshop_worldpay';
     $this->icon = jigoshop::assets_url() . '/assets/images/icons/worldpay.png';
     $this->has_fields = false;
     $this->enabled = $options->get('jigoshop_worldpay_is_enabled');
     $this->title = $options->get('jigoshop_worldpay_method_title');
     $this->description = $options->get('jigoshop_worldpay_checkout_description');
     $this->testmode = $options->get('jigoshop_worldpay_test_mode');
     $this->installation_id = $options->get('jigoshop_worldpay_install_id');
     $this->fixed_currency = $options->get('jigoshop_worldpay_fixed_currency');
     $this->md5_encrypt = $options->get('jigoshop_worldpay_md5');
     $this->secret_word = $options->get('jigoshop_worldpay_md5_secret_word');
     $this->response_pass = $options->get('jigoshop_worldpay_response_password');
     $this->receive_err_log = $options->get('jigoshop_worldpay_receive_security_logs');
     $this->emailto_err_log = $options->get('jigoshop_worldpay_security_logs_emailto');
     $this->currency = $options->get('jigoshop_currency');
     $this->notify_url = jigoshop_request_api::query_request('?js-api=JS_Gateway_WorldPay', false);
     add_action('jigoshop_api_js_gateway_worldpay', array($this, 'check_worldpay_response'));
     add_action('admin_notices', array($this, 'worldpay_notices'));
     add_action('receipt_jigoshop_worldpay', array($this, 'receipt_page'));
     add_action('wp_footer', array($this, 'worldpay_script'));
 }
 public function __construct()
 {
     parent::__construct();
     $this->paymentKaznacheyUrl = "http://payment.kaznachey.net/api/PaymentInterface/";
     $this->id = 'kaznachey';
     $this->has_fields = false;
     $this->kaznachey_init();
     $this->enabled = Jigoshop_Base::get_options()->get_option('jigoshop_kaznachey_enabled');
     $this->title = Jigoshop_Base::get_options()->get_option('jigoshop_kaznachey_title');
     $this->currency = Jigoshop_Base::get_options()->get_option('jigoshop_kaznachey_currency');
     $this->language = Jigoshop_Base::get_options()->get_option('jigoshop_kaznachey_language');
     $merchnatInfo = $this->GetMerchnatInfo();
     if (isset($merchnatInfo["PaySystems"])) {
         $box = '<br><br><label for="cc_types">Выберите способ оплаты</label><select name="cc_types" id="cc_types">';
         foreach ($merchnatInfo["PaySystems"] as $paysystem) {
             $box .= "<option value='{$paysystem['Id']}'>{$paysystem['PaySystemName']}</option>";
         }
         $box .= '</select><br><input type="checkbox" checked="checked" value="1" name="cc_agreed" id="cc_agreed"><label for="cc_agreed"><a href="' . $merchnatInfo['TermToUse'] . '" target="_blank">Согласен с условиями использования</a></label>';
         $box .= "<script type=\"text/javascript\">\n\t\t\t\t(function(){ \n\t\t\t\tvar cc_a = jQuery('#cc_agreed');\n\t\t\t\t\t cc_a.on('click', function(){\n\t\t\t\t\t\tif(cc_a.is(':checked')){\t\n\t\t\t\t\t\t\tjQuery('.custom_gateway').find('.error').text('');\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tcc_a.next().after('<span class=\"error\">Примите условие!</span>');\n\t\t\t\t\t\t}\n\t\t\t\t\t });\n\t\t\t\t\tjQuery('body').on('click', '#place_order', function() {\n\t\t\t\t\t\t document.cookie='cc_types='+jQuery('#cc_types').val();\n\t\t\t\t\t});\t\n\t\t\t\t})(); \n\t\t\t\t</script> ";
     }
     $this->description = Jigoshop_Base::get_options()->get_option('jigoshop_kaznachey_description') . $box;
     add_action('init', array($this, 'check_ipn_response'));
     add_action('receipt_kaznachey', array($this, 'receipt_kaznachey'));
     add_action('thankyou_kaznachey', array(&$this, 'thankyou_page'));
 }
Пример #4
0
 public function __construct()
 {
     parent::__construct();
     $this->id = 'cod';
     $this->icon = '';
     $this->has_fields = false;
     $this->enabled = Jigoshop_Base::get_options()->get('jigoshop_cod_enabled');
     $this->title = Jigoshop_Base::get_options()->get('jigoshop_cod_title');
     $this->description = Jigoshop_Base::get_options()->get('jigoshop_cod_description');
     add_action('thankyou_cod', array(&$this, 'thankyou_page'));
 }
Пример #5
0
 public function __construct()
 {
     parent::__construct();
     $this->id = 'bank_transfer';
     $this->icon = '';
     $this->has_fields = false;
     $this->enabled = Jigoshop_Base::get_options()->get('jigoshop_bank_transfer_enabled');
     $this->title = Jigoshop_Base::get_options()->get('jigoshop_bank_transfer_title');
     $this->description = Jigoshop_Base::get_options()->get('jigoshop_bank_transfer_description');
     $this->bank_name = Jigoshop_Base::get_options()->get('jigoshop_bank_transfer_bank_name');
     $this->acc_number = Jigoshop_Base::get_options()->get('jigoshop_bank_transfer_acc_number');
     $this->sort_code = Jigoshop_Base::get_options()->get('jigoshop_bank_transfer_sort_code');
     $this->account_holder = Jigoshop_Base::get_options()->get('jigoshop_bank_transfer_account_holder');
     $this->iban = Jigoshop_Base::get_options()->get('jigoshop_bank_transfer_iban');
     $this->bic = Jigoshop_Base::get_options()->get('jigoshop_bank_transfer_bic');
     $this->additional = Jigoshop_Base::get_options()->get('jigoshop_bank_transfer_additional');
     add_action('thankyou_bank_transfer', array(&$this, 'thankyou_page'));
 }
 public function __construct()
 {
     parent::__construct();
     $this->id = 'paymentwall';
     $this->has_fields = false;
     $this->enabled = Jigoshop_Base::get_options()->get_option('jigoshop_paymentwall_enabled');
     $this->title = Jigoshop_Base::get_options()->get_option('jigoshop_paymentwall_title');
     $this->appkey = Jigoshop_Base::get_options()->get_option('jigoshop_paymentwall_app_key');
     $this->secretkey = Jigoshop_Base::get_options()->get_option('jigoshop_paymentwall_secret_key');
     $this->widget = Jigoshop_Base::get_options()->get_option('jigoshop_paymentwall_widget');
     $this->description = Jigoshop_Base::get_options()->get_option('jigoshop_paymentwall_description');
     $this->thankyoutext = Jigoshop_Base::get_options()->get_option('jigoshop_paymentwall_thankyoutext');
     $this->currency = Jigoshop_Base::get_options()->get_option('jigoshop_paymentwall_currency');
     $this->successurl = Jigoshop_Base::get_options()->get_option('jigoshop_paymentwall_successurl');
     $this->testmode = Jigoshop_Base::get_options()->get_option('jigoshop_paymentwall_testmode');
     $this->CREDIT_TYPE_CHARGEBACK = 2;
     add_action('init', array($this, 'check_ipn_response'));
     add_action('receipt_paymentwall', array($this, 'receipt_paymentwall'));
 }
Пример #7
0
 public function __construct()
 {
     parent::__construct();
     /* installs our gateway options in the settings */
     $this->id = 'futurepay';
     $this->icon = jigoshop::assets_url() . '/assets/images/icons/futurepay.png';
     $this->has_fields = false;
     $this->enabled = Jigoshop_Base::get_options()->get('jigoshop_futurepay_enabled');
     $this->title = Jigoshop_Base::get_options()->get('jigoshop_futurepay_title');
     $this->description = Jigoshop_Base::get_options()->get('jigoshop_futurepay_description');
     $this->gmid = Jigoshop_Base::get_options()->get('jigoshop_futurepay_gmid');
     self::$request_url = Jigoshop_Base::get_options()->get('jigoshop_futurepay_mode') == 'no' ? self::FUTUREPAY_LIVE_URL : self::FUTUREPAY_SANDBOX_URL;
     add_action('init', array($this, 'check_response'));
     add_action('valid-futurepay-request', array($this, 'successful_request'), 10, 2);
     add_action('receipt_futurepay', array($this, 'receipt_page'));
     add_action('admin_notices', array($this, 'futurepay_notices'));
     add_action('wp_footer', array($this, 'futurepay_script'));
     $this->currency_symbol = get_jigoshop_currency_symbol();
     $this->shop_base_country = jigoshop_countries::get_base_country();
 }
 function __construct()
 {
     parent::__construct();
     $options = Jigoshop_Base::get_options();
     $this->id = 'atom';
     $this->icon = IMGDIR . 'logo.png';
     $this->has_fields = false;
     $this->enabled = $options->get('jigoshop_atom_enabled');
     $this->urls = $options->get('jigoshop_atom_url');
     $this->merchant_id = $options->get('jigoshop_atom_merchant_id');
     $this->atom_password = $options->get('jigoshop_atom_password');
     $this->product_id = $options->get('jigoshop_atom_product_id');
     $this->port = $options->get('jigoshop_atom_port');
     $this->ssl_version = $options->get('jigoshop_atom_ssl');
     $this->notify_url = jigoshop_request_api::query_request('?js-api=JS_Gateway_Paynetz', false);
     // add_action('jigoshop_settings_scripts', array($this, 'admin_scripts'));
     add_action('jigoshop_api_js_gateway_paynetz', array($this, 'check_ipn_response'));
     add_action('receipt_paynetz', array($this, 'receipt_page'));
     add_action('init', array($this, 'legacy_ipn_response'));
 }
Пример #9
0
 /**
  * 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'));
 }
Пример #10
0
 public function __construct()
 {
     parent::__construct();
     $options = Jigoshop_Base::get_options();
     $this->id = 'paypal';
     $this->icon = JIGOSHOP_URL . '/assets/images/icons/paypal.png';
     $this->has_fields = false;
     $this->enabled = $options->get('jigoshop_paypal_enabled');
     $this->title = $options->get('jigoshop_paypal_title');
     $this->email = $options->get('jigoshop_paypal_email');
     $this->description = $options->get('jigoshop_paypal_description');
     $this->force_payment = $options->get('jigoshop_paypal_force_payment');
     $this->testmode = $options->get('jigoshop_paypal_testmode');
     $this->testemail = $options->get('jigoshop_sandbox_email');
     $this->send_shipping = $options->get('jigoshop_paypal_send_shipping');
     $this->decimals = min($options->get('jigoshop_price_num_decimals'), in_array($options->get('jigoshop_currency'), self::$no_decimal_currencies) ? 0 : 2);
     $this->liveurl = 'https://www.paypal.com/webscr';
     $this->testurl = 'https://www.sandbox.paypal.com/webscr';
     $this->notify_url = jigoshop_request_api::query_request('?js-api=JS_Gateway_Paypal', false);
     add_action('jigoshop_settings_scripts', array($this, 'admin_scripts'));
     add_action('receipt_paypal', array($this, 'receipt_page'));
     add_action('jigoshop_api_js_gateway_paypal', array($this, 'check_ipn_response'));
     add_action('init', array($this, 'legacy_ipn_response'));
 }
 /**
  * This method makes sure we require payment for the particular gateway being used.
  *
  * @param jigoshop_payment_gateway $gateway the payment gateway
  * that is being used during checkout
  * @return boolean true when the gateway should be processed, otherwise false
  * @since 1.2
  */
 public static function process_gateway($gateway)
 {
     if ($gateway === null) {
         if (jigoshop_cart::$subtotal > 0) {
             jigoshop::add_error(__('Invalid payment method.', 'jigoshop'));
         }
         return false;
     }
     $shipping_total = jigoshop_cart::$shipping_total;
     if (self::get_options()->get('jigoshop_prices_include_tax') == 'yes') {
         $shipping_total += jigoshop_cart::$shipping_tax_total;
     }
     return $gateway->process_gateway(number_format((double) jigoshop_cart::$subtotal, 2, '.', ''), number_format((double) $shipping_total, 2, '.', ''), number_format((double) jigoshop_cart::$discount_total, 2, '.', ''));
 }
 public function __construct()
 {
     parent::__construct();
 }