Changeset 1340245
- Timestamp:
- 01/31/2016 11:58:35 PM (10 years ago)
- Location:
- bitcoin-payments-for-woocommerce/trunk
- Files:
-
- 5 edited
-
bitcoinway-woocommerce.php (modified) (1 diff)
-
bwwc-bitcoin-gateway.php (modified) (5 diffs)
-
bwwc-include-all.php (modified) (1 diff)
-
bwwc-render-settings.php (modified) (1 diff)
-
bwwc-utils.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
bitcoin-payments-for-woocommerce/trunk/bitcoinway-woocommerce.php
r1335289 r1340245 6 6 Plugin URI: http://www.bitcoinway.com/ 7 7 Description: 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.0 28 Version: 4.03 9 9 Author: BitcoinWay 10 10 Author URI: http://www.bitcoinway.com/ -
bitcoin-payments-for-woocommerce/trunk/bwwc-bitcoin-gateway.php
r1335289 r1340245 48 48 $this->method_title = __( 'Bitcoin', 'woocommerce' ); 49 49 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(); 51 56 $this->init_settings(); 52 $bwwc_settings = BWWC__get_settings ();53 57 54 58 // Define user set variables 55 59 $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'];57 60 $this->bitcoin_addr_merchant = $this->settings['bitcoin_addr_merchant']; // Forwarding address where all product payments will aggregate. 58 61 … … 63 66 $this->instructions_single_payment_str = __('You must pay in a single payment in full.', 'woocommerce'); 64 67 65 // Load the form fields.66 $this->init_form_fields();67 68 68 69 // Actions 69 70 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' ) ); 71 72 else 72 add_action('woocommerce_update_options_payment_gateways', array( &$this, 'process_admin_options')); // hook into this action to save options in the backend73 74 add_action('woocommerce_thankyou_' . $this->id, array( &$this, 'BWWC__thankyou_page')); // hooks into the thank you page after payment73 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 75 76 76 77 // 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 details78 add_action('woocommerce_email_before_order_table', array($this, 'BWWC__email_instructions'), 10, 2); // hooks into the email template to show additional details 78 79 79 80 // Hook IPN callback logic 80 81 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')); 82 83 else 83 84 add_action('woocommerce_api_' . strtolower(get_class($this)), array($this,'BWWC__maybe_bitcoin_ipn_callback')); 84 85 85 86 // 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; 87 88 } 88 89 //------------------------------------------------------------------- … … 349 350 { 350 351 $validation_msg = ""; 351 $store_valid = $this->is_gateway_valid_for_use ($validation_msg);352 $store_valid = BWWC__is_gateway_valid_for_use ($validation_msg); 352 353 353 354 // After defining the options, we need to display them too; thats where this next function comes into play: … … 364 365 __('Bitcoin payment gateway is operational','woocommerce') . 365 366 '</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>'); 367 368 ?> 368 369 <table class="form-table"> … … 380 381 public function process_admin_options() 381 382 { 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 // 387 390 // if (isset($_POST) && is_array($_POST)) 388 391 // { -
bitcoin-payments-for-woocommerce/trunk/bwwc-include-all.php
r1335289 r1340245 9 9 if (!defined('BWWC_PLUGIN_NAME')) 10 10 { 11 define('BWWC_VERSION', '4.0 2');11 define('BWWC_VERSION', '4.03'); 12 12 13 13 //----------------------------------------------- -
bitcoin-payments-for-woocommerce/trunk/bwwc-render-settings.php
r1335289 r1340245 57 57 $gateway_status_message = 58 58 '<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 . 60 60 '</p>'; 61 61 } -
bitcoin-payments-for-woocommerce/trunk/bwwc-utils.php
r1335289 r1340245 478 478 function BWWC__getreceivedbyaddress_info ($address_request_array, $bwwc_settings=false) 479 479 { 480 // https://blockchain.bitcoinway.com/?q=getreceivedbyaddress 481 // with POST: btc_address=12fFTMkeu3mcunCtGHtWb7o5BcWA9eFx7R&required_confirmations=6&api_timeout=20 480 482 // https://blockexplorer.com/api/addr/1KWd23GZ4BmTMo9zcsUZXpWP4M8hmxZwRU/totalReceived 481 483 // https://blockchain.info/q/getreceivedbyaddress/1H9uAP3x439YvQDoKNGgSYCg3FmrYRzpD2 [?confirmations=6]
Note: See TracChangeset
for help on using the changeset viewer.