Plugin Directory

Changeset 1340245


Ignore:
Timestamp:
01/31/2016 11:58:35 PM (10 years ago)
Author:
gesman
Message:

bug fix

Location:
bitcoin-payments-for-woocommerce/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • bitcoin-payments-for-woocommerce/trunk/bitcoinway-woocommerce.php

    r1335289 r1340245  
    66Plugin URI: http://www.bitcoinway.com/
    77Description: Bitcoin Payments for WooCommerce plugin allows you to accept payments in bitcoins for physical and digital products at your WooCommerce-powered online store.
    8 Version: 4.02
     8Version: 4.03
    99Author: BitcoinWay
    1010Author URI: http://www.bitcoinway.com/
  • bitcoin-payments-for-woocommerce/trunk/bwwc-bitcoin-gateway.php

    r1335289 r1340245  
    4848      $this->method_title     = __( 'Bitcoin', 'woocommerce' );
    4949
    50             // Load the settings.
     50      // Load BWWC settings.
     51      $bwwc_settings = BWWC__get_settings ();
     52            $this->service_provider = $bwwc_settings['service_provider']; // This need to be before $this->init_settings otherwise it generate PHP Notice: "Undefined property: BWWC_Bitcoin::$service_provider" down below.
     53
     54            // Load the form fields.
     55            $this->init_form_fields();
    5156            $this->init_settings();
    52       $bwwc_settings = BWWC__get_settings ();
    5357
    5458            // Define user set variables
    5559            $this->title        = $this->settings['title']; // The title which the user is shown on the checkout – retrieved from the settings which init_settings loads.
    56             $this->service_provider = $bwwc_settings['service_provider'];
    5760            $this->bitcoin_addr_merchant = $this->settings['bitcoin_addr_merchant'];    // Forwarding address where all product payments will aggregate.
    5861           
     
    6366            $this->instructions_single_payment_str = __('You must pay in a single payment in full.', 'woocommerce');
    6467
    65             // Load the form fields.
    66             $this->init_form_fields();
    6768
    6869            // Actions
    6970      if ( version_compare( WOOCOMMERCE_VERSION, '2.0.0', '>=' ) )
    70         add_action('woocommerce_update_options_payment_gateways_' . $this->id, array( &$this, 'process_admin_options' ) );
     71        add_action('woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
    7172      else
    72                 add_action('woocommerce_update_options_payment_gateways', array(&$this, 'process_admin_options')); // hook into this action to save options in the backend
    73 
    74         add_action('woocommerce_thankyou_' . $this->id, array(&$this, 'BWWC__thankyou_page')); // hooks into the thank you page after payment
     73                add_action('woocommerce_update_options_payment_gateways', array($this, 'process_admin_options')); // hook into this action to save options in the backend
     74
     75        add_action('woocommerce_thankyou_' . $this->id, array($this, 'BWWC__thankyou_page')); // hooks into the thank you page after payment
    7576
    7677            // Customer Emails
    77         add_action('woocommerce_email_before_order_table', array(&$this, 'BWWC__email_instructions'), 10, 2); // hooks into the email template to show additional details
     78        add_action('woocommerce_email_before_order_table', array($this, 'BWWC__email_instructions'), 10, 2); // hooks into the email template to show additional details
    7879
    7980            // Hook IPN callback logic
    8081            if (version_compare (WOOCOMMERCE_VERSION, '2.0', '<'))
    81                 add_action('init', array(&$this, 'BWWC__maybe_bitcoin_ipn_callback'));
     82                add_action('init', array($this, 'BWWC__maybe_bitcoin_ipn_callback'));
    8283            else
    8384                add_action('woocommerce_api_' . strtolower(get_class($this)), array($this,'BWWC__maybe_bitcoin_ipn_callback'));
    8485
    8586            // Validate currently set currency for the store. Must be among supported ones.
    86             if (!$this->is_gateway_valid_for_use()) $this->enabled = false;
     87            if (!BWWC__is_gateway_valid_for_use()) $this->enabled = false;
    8788        }
    8889        //-------------------------------------------------------------------
     
    349350        {
    350351            $validation_msg = "";
    351             $store_valid    = $this->is_gateway_valid_for_use ($validation_msg);
     352            $store_valid    = BWWC__is_gateway_valid_for_use ($validation_msg);
    352353
    353354            // After defining the options, we need to display them too; thats where this next function comes into play:
     
    364365            __('Bitcoin payment gateway is operational','woocommerce') .
    365366            '</p>') : ('<p style="border:1px solid #DDD;padding:5px 10px;font-weight:bold;color:#EE0000;background-color:#FFFFAA;">' .
    366             __('Bitcoin payment gateway is not operational: ','woocommerce') . $validation_msg . '</p>');
     367            __('Bitcoin payment gateway is not operational (try to re-enter and save Bitcoinway Plugin settings): ','woocommerce') . $validation_msg . '</p>');
    367368            ?>
    368369            <table class="form-table">
     
    380381    public function process_admin_options()
    381382    {
    382       return; // Not needed as all bitcoinway's settings are now inside BWWC plugin.
    383 
    384         // // Call parent
    385         // parent::process_admin_options();
    386 
     383        // Call parent
     384        parent::process_admin_options();
     385
     386      return;
     387
     388      // Not needed as all bitcoinway's settings are now inside BWWC plugin.
     389      //
    387390        // if (isset($_POST) && is_array($_POST))
    388391        // {
  • bitcoin-payments-for-woocommerce/trunk/bwwc-include-all.php

    r1335289 r1340245  
    99if (!defined('BWWC_PLUGIN_NAME'))
    1010  {
    11   define('BWWC_VERSION',           '4.02');
     11  define('BWWC_VERSION',           '4.03');
    1212
    1313  //-----------------------------------------------
  • bitcoin-payments-for-woocommerce/trunk/bwwc-render-settings.php

    r1335289 r1340245  
    5757    $gateway_status_message =
    5858    '<p style="border:1px solid #DDD;padding:5px 10px;font-weight:bold;color:#EE0000;background-color:#FFFFAA;">' .
    59     "Bitcoin Payment Gateway is NOT operational: " . $gateway_status_message .
     59    "Bitcoin Payment Gateway is NOT operational (try to re-enter and save settings): " . $gateway_status_message .
    6060    '</p>';
    6161  }
  • bitcoin-payments-for-woocommerce/trunk/bwwc-utils.php

    r1335289 r1340245  
    478478function BWWC__getreceivedbyaddress_info ($address_request_array, $bwwc_settings=false)
    479479{
     480    // https://blockchain.bitcoinway.com/?q=getreceivedbyaddress
     481    //    with POST: btc_address=12fFTMkeu3mcunCtGHtWb7o5BcWA9eFx7R&required_confirmations=6&api_timeout=20
    480482  // https://blockexplorer.com/api/addr/1KWd23GZ4BmTMo9zcsUZXpWP4M8hmxZwRU/totalReceived
    481483  // https://blockchain.info/q/getreceivedbyaddress/1H9uAP3x439YvQDoKNGgSYCg3FmrYRzpD2 [?confirmations=6]
Note: See TracChangeset for help on using the changeset viewer.