Changeset 2750512
- Timestamp:
- 06/30/2022 11:02:23 PM (4 years ago)
- Location:
- incuca-tech-pix-for-woocommerce
- Files:
-
- 10 edited
- 1 copied
-
tags/1.4.0 (copied) (copied from incuca-tech-pix-for-woocommerce/trunk)
-
tags/1.4.0/README.md (modified) (2 diffs)
-
tags/1.4.0/includes/class-wc-pix-gateway.php (modified) (6 diffs)
-
tags/1.4.0/includes/services/class-crc16.php (modified) (1 diff)
-
tags/1.4.0/pix-for-woocommerce.php (modified) (2 diffs)
-
tags/1.4.0/readme.txt (modified) (2 diffs)
-
trunk/README.md (modified) (2 diffs)
-
trunk/includes/class-wc-pix-gateway.php (modified) (6 diffs)
-
trunk/includes/services/class-crc16.php (modified) (1 diff)
-
trunk/pix-for-woocommerce.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
incuca-tech-pix-for-woocommerce/tags/1.4.0/README.md
r2621370 r2750512 8 8 Requires WooCommerce at least: 2.1 9 9 10 Tested up to: 5.8.110 Tested up to: 6.0 11 11 12 12 Requires PHP: 7.1 13 13 14 Stable Tag: 1. 3.614 Stable Tag: 1.4.0 15 15 16 16 License: GPLv3.0 … … 123 123 124 124 * Pequena correção de layout para mobile 125 126 = 2022.06.30 - version 1.4.0 = 127 128 * Opção de escolha do ícone do Pix 129 * Adição de descrição no pagamento 130 * Correção no retorno do código Pix -
incuca-tech-pix-for-woocommerce/tags/1.4.0/includes/class-wc-pix-gateway.php
r2621370 r2750512 25 25 $this->domain = 'woocommerce-pix'; 26 26 $this->id = 'pix_gateway'; 27 $this->icon = apply_filters('woocommerce_gateway_icon', WC_PIX_PLUGIN_URL . 'assets/icon-pix.png'); 27 $color = $this->get_option('icon_color') ? $this->get_option('icon_color') : 'black'; 28 $this->icon = apply_filters('woocommerce_gateway_icon', WC_PIX_PLUGIN_URL . 'assets/icon-pix-' . $color . '.png'); 28 29 $this->has_fields = false; 29 30 $this->method_title = __('Pix', $this->domain); … … 39 40 $this->instructions = $this->get_option('instructions'); 40 41 $this->key = $this->get_option('key'); 42 $this->prefix_transaction_id = $this->get_option('prefix_transaction_id') ? $this->get_option('prefix_transaction_id') : 'ID'; 41 43 $this->merchant = $this->get_option('merchant'); 42 44 $this->city = $this->get_option('city'); 43 $this->key = $this->get_option('key');44 45 $this->whatsapp = $this->get_option('whatsapp'); 45 46 $this->telegram = $this->get_option('telegram'); … … 116 117 { 117 118 return $this->key; 119 } 120 121 /** 122 * Get prefix_transaction_id. 123 * 124 * @return string 125 */ 126 public function get_prefix_transaction_id() 127 { 128 return $this->prefix_transaction_id; 118 129 } 119 130 … … 172 183 'default' => __('Faça um Pix', 'woocommerce-pix'), 173 184 ), 185 'icon_color' => array( 186 'title' => __('Cor do ícone do PIX', 'woocommerce-pix'), 187 'type' => 'select', 188 'description' => __('Cor do ícone que vai aparecer ao lado do título', 'woocommerce-pix'), 189 'desc_tip' => true, 190 'options' => array( 191 'black' => 'Preto', 192 'white' => 'Branco', 193 'green' => 'Verde' 194 ), 195 'default' => 'green', 196 ), 174 197 'description' => array( 175 198 'title' => __('Descrição', 'woocommerce-pix'), … … 189 212 'default' => '', 190 213 'required' => true, 214 ), 215 'prefix_transaction_id' => array( 216 'title' => __('Prefixo Transaction ID (obrigatório)', 'woocommerce-pix'), 217 'type' => 'text', 218 'description' => __('Por favor, informe o prefixo da Transaction ID.<br>Máximo de 10 caracteres.<br>Ela é importante identificar o pagamento no extrato do PIX.<br>Somente alfanúmerico (tabela ASCII): <code>A-Z</code>, <code>a-z</code> e <code>0-9</code>.', 'woocommerce-pix'), 219 'default' => '', 220 'required' => true, 221 'custom_attributes' => [ 222 'maxlength' => 10 223 ] 191 224 ), 192 225 'merchant' => array( … … 401 434 $pix->valor($order->get_total()); 402 435 $pix->cidade($this->city); 403 // $pix->info('ID '.$order_id);404 436 $pix->lojista($this->merchant); 405 437 $pix->moeda(986); // Real brasileiro (BRL) - Conforme ISO 4217: https://pt.wikipedia.org/wiki/ISO_4217 406 $pix->txId('ID' . $order_id); 438 $pix->txId($this->prefix_transaction_id . $order_id); 439 $pix->info($this->prefix_transaction_id . $order_id); 407 440 $link = $pix->toCode(); 408 441 $image = $pix->toImage(); -
incuca-tech-pix-for-woocommerce/tags/1.4.0/includes/services/class-crc16.php
r2524885 r2750512 48 48 } 49 49 } 50 return strtoupper( dechex( $response) );50 return strtoupper( str_pad( dechex( $response ), 4, '0', STR_PAD_LEFT) ); 51 51 } 52 52 } -
incuca-tech-pix-for-woocommerce/tags/1.4.0/pix-for-woocommerce.php
r2621370 r2750512 7 7 * Author: InCuca Tech 8 8 * Author URI: https://incuca.net 9 * Version: 1. 3.610 * Tested up to: 5.8.19 * Version: 1.4.0 10 * Tested up to: 6.0 11 11 * License: GNU General Public License v3.0 12 12 * … … 16 16 defined('ABSPATH') or exit; 17 17 18 define('WC_PIX_VERSION', '1. 3.6');18 define('WC_PIX_VERSION', '1.4.0'); 19 19 define('WC_PIX_PLUGIN_FILE', __FILE__); 20 20 define('WC_PIX_PLUGIN_URL', plugin_dir_url(__FILE__)); -
incuca-tech-pix-for-woocommerce/tags/1.4.0/readme.txt
r2621370 r2750512 3 3 Tags: woocommerce, payment gateway, gateway, pix 4 4 Requires WooCommerce at least: 2.1 5 Tested up to: 5.8.15 Tested up to: 6.0 6 6 Requires PHP: 7.1 7 Stable Tag: 1. 3.67 Stable Tag: 1.4.0 8 8 License: GPLv3.0 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 114 114 115 115 * Pequena correção de layout para mobile 116 117 = 2022.06.30 - version 1.4.0 = 118 119 * Opção de escolha do ícone do Pix 120 * Adição de descrição no pagamento 121 * Correção no retorno do código Pix -
incuca-tech-pix-for-woocommerce/trunk/README.md
r2621370 r2750512 8 8 Requires WooCommerce at least: 2.1 9 9 10 Tested up to: 5.8.110 Tested up to: 6.0 11 11 12 12 Requires PHP: 7.1 13 13 14 Stable Tag: 1. 3.614 Stable Tag: 1.4.0 15 15 16 16 License: GPLv3.0 … … 123 123 124 124 * Pequena correção de layout para mobile 125 126 = 2022.06.30 - version 1.4.0 = 127 128 * Opção de escolha do ícone do Pix 129 * Adição de descrição no pagamento 130 * Correção no retorno do código Pix -
incuca-tech-pix-for-woocommerce/trunk/includes/class-wc-pix-gateway.php
r2621370 r2750512 25 25 $this->domain = 'woocommerce-pix'; 26 26 $this->id = 'pix_gateway'; 27 $this->icon = apply_filters('woocommerce_gateway_icon', WC_PIX_PLUGIN_URL . 'assets/icon-pix.png'); 27 $color = $this->get_option('icon_color') ? $this->get_option('icon_color') : 'black'; 28 $this->icon = apply_filters('woocommerce_gateway_icon', WC_PIX_PLUGIN_URL . 'assets/icon-pix-' . $color . '.png'); 28 29 $this->has_fields = false; 29 30 $this->method_title = __('Pix', $this->domain); … … 39 40 $this->instructions = $this->get_option('instructions'); 40 41 $this->key = $this->get_option('key'); 42 $this->prefix_transaction_id = $this->get_option('prefix_transaction_id') ? $this->get_option('prefix_transaction_id') : 'ID'; 41 43 $this->merchant = $this->get_option('merchant'); 42 44 $this->city = $this->get_option('city'); 43 $this->key = $this->get_option('key');44 45 $this->whatsapp = $this->get_option('whatsapp'); 45 46 $this->telegram = $this->get_option('telegram'); … … 116 117 { 117 118 return $this->key; 119 } 120 121 /** 122 * Get prefix_transaction_id. 123 * 124 * @return string 125 */ 126 public function get_prefix_transaction_id() 127 { 128 return $this->prefix_transaction_id; 118 129 } 119 130 … … 172 183 'default' => __('Faça um Pix', 'woocommerce-pix'), 173 184 ), 185 'icon_color' => array( 186 'title' => __('Cor do ícone do PIX', 'woocommerce-pix'), 187 'type' => 'select', 188 'description' => __('Cor do ícone que vai aparecer ao lado do título', 'woocommerce-pix'), 189 'desc_tip' => true, 190 'options' => array( 191 'black' => 'Preto', 192 'white' => 'Branco', 193 'green' => 'Verde' 194 ), 195 'default' => 'green', 196 ), 174 197 'description' => array( 175 198 'title' => __('Descrição', 'woocommerce-pix'), … … 189 212 'default' => '', 190 213 'required' => true, 214 ), 215 'prefix_transaction_id' => array( 216 'title' => __('Prefixo Transaction ID (obrigatório)', 'woocommerce-pix'), 217 'type' => 'text', 218 'description' => __('Por favor, informe o prefixo da Transaction ID.<br>Máximo de 10 caracteres.<br>Ela é importante identificar o pagamento no extrato do PIX.<br>Somente alfanúmerico (tabela ASCII): <code>A-Z</code>, <code>a-z</code> e <code>0-9</code>.', 'woocommerce-pix'), 219 'default' => '', 220 'required' => true, 221 'custom_attributes' => [ 222 'maxlength' => 10 223 ] 191 224 ), 192 225 'merchant' => array( … … 401 434 $pix->valor($order->get_total()); 402 435 $pix->cidade($this->city); 403 // $pix->info('ID '.$order_id);404 436 $pix->lojista($this->merchant); 405 437 $pix->moeda(986); // Real brasileiro (BRL) - Conforme ISO 4217: https://pt.wikipedia.org/wiki/ISO_4217 406 $pix->txId('ID' . $order_id); 438 $pix->txId($this->prefix_transaction_id . $order_id); 439 $pix->info($this->prefix_transaction_id . $order_id); 407 440 $link = $pix->toCode(); 408 441 $image = $pix->toImage(); -
incuca-tech-pix-for-woocommerce/trunk/includes/services/class-crc16.php
r2524885 r2750512 48 48 } 49 49 } 50 return strtoupper( dechex( $response) );50 return strtoupper( str_pad( dechex( $response ), 4, '0', STR_PAD_LEFT) ); 51 51 } 52 52 } -
incuca-tech-pix-for-woocommerce/trunk/pix-for-woocommerce.php
r2621370 r2750512 7 7 * Author: InCuca Tech 8 8 * Author URI: https://incuca.net 9 * Version: 1. 3.610 * Tested up to: 5.8.19 * Version: 1.4.0 10 * Tested up to: 6.0 11 11 * License: GNU General Public License v3.0 12 12 * … … 16 16 defined('ABSPATH') or exit; 17 17 18 define('WC_PIX_VERSION', '1. 3.6');18 define('WC_PIX_VERSION', '1.4.0'); 19 19 define('WC_PIX_PLUGIN_FILE', __FILE__); 20 20 define('WC_PIX_PLUGIN_URL', plugin_dir_url(__FILE__)); -
incuca-tech-pix-for-woocommerce/trunk/readme.txt
r2621370 r2750512 3 3 Tags: woocommerce, payment gateway, gateway, pix 4 4 Requires WooCommerce at least: 2.1 5 Tested up to: 5.8.15 Tested up to: 6.0 6 6 Requires PHP: 7.1 7 Stable Tag: 1. 3.67 Stable Tag: 1.4.0 8 8 License: GPLv3.0 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 114 114 115 115 * Pequena correção de layout para mobile 116 117 = 2022.06.30 - version 1.4.0 = 118 119 * Opção de escolha do ícone do Pix 120 * Adição de descrição no pagamento 121 * Correção no retorno do código Pix
Note: See TracChangeset
for help on using the changeset viewer.