Changeset 2524885
- Timestamp:
- 05/02/2021 01:00:28 PM (5 years ago)
- Location:
- incuca-tech-pix-for-woocommerce
- Files:
-
- 31 added
- 7 edited
-
tags/1.3.1 (added)
-
tags/1.3.1/README.md (added)
-
tags/1.3.1/assets (added)
-
tags/1.3.1/assets/icon-pix.png (added)
-
tags/1.3.1/assets/icon-pix.svg (added)
-
tags/1.3.1/includes (added)
-
tags/1.3.1/includes/admin (added)
-
tags/1.3.1/includes/admin/views (added)
-
tags/1.3.1/includes/admin/views/html-admin-page.php (added)
-
tags/1.3.1/includes/admin/views/html-notice-currency-not-supported.php (added)
-
tags/1.3.1/includes/admin/views/html-notice-missing-woocommerce.php (added)
-
tags/1.3.1/includes/admin/views/html-notice-token-missing.php (added)
-
tags/1.3.1/includes/class-qrcode.php (added)
-
tags/1.3.1/includes/class-wc-pix-gateway.php (added)
-
tags/1.3.1/includes/class-wc-pix.php (added)
-
tags/1.3.1/includes/helpers (added)
-
tags/1.3.1/includes/helpers/jetpack.php (added)
-
tags/1.3.1/includes/js (added)
-
tags/1.3.1/includes/js/main.js (added)
-
tags/1.3.1/includes/services (added)
-
tags/1.3.1/includes/services/class-crc16.php (added)
-
tags/1.3.1/includes/services/class-emv.php (added)
-
tags/1.3.1/pix-for-woocommerce.php (added)
-
tags/1.3.1/readme.txt (added)
-
tags/1.3.1/templates (added)
-
tags/1.3.1/templates/email-on-hold-pix.php (added)
-
tags/1.3.1/vendor (added)
-
tags/1.3.1/vendor/php-qrcode (added)
-
tags/1.3.1/vendor/php-qrcode/LICENSE (added)
-
tags/1.3.1/vendor/php-qrcode/README.md (added)
-
tags/1.3.1/vendor/php-qrcode/qrcode.php (added)
-
trunk/README.md (modified) (2 diffs)
-
trunk/includes/class-qrcode.php (modified) (3 diffs)
-
trunk/includes/class-wc-pix-gateway.php (modified) (6 diffs)
-
trunk/includes/services/class-crc16.php (modified) (2 diffs)
-
trunk/includes/services/class-emv.php (modified) (3 diffs)
-
trunk/pix-for-woocommerce.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
incuca-tech-pix-for-woocommerce/trunk/README.md
r2478380 r2524885 8 8 Requires WooCommerce at least: 2.1 9 9 10 Tested up to: 5. 6.110 Tested up to: 5.7.1 11 11 12 12 Requires PHP: 7.1 13 13 14 Stable Tag: 1.3. 014 Stable Tag: 1.3.1 15 15 16 16 License: GPLv3.0 … … 103 103 104 104 * Opção de enviar o Pix por e-mail para pagamento 105 106 = 2021.02.21 - version 1.3.1 = 107 108 * Correções de Warnings do PHP -
incuca-tech-pix-for-woocommerce/trunk/includes/class-qrcode.php
r2463916 r2524885 8 8 * 9 9 * @package Pix_For_WooCommerce 10 * @version 1. 2.010 * @version 1.3.1 11 11 */ 12 12 … … 40 40 public function __construct() 41 41 { 42 $ICPFW_MERCHANT_ACCOUNT_INFORMATION = new ICPFW_EMV();42 $ICPFW_MERCHANT_ACCOUNT_INFORMATION = new WP_ICPFW_EMV(); 43 43 $ICPFW_MERCHANT_ACCOUNT_INFORMATION->set(ICPFW_GUI, 'br.gov.bcb.pix'); 44 44 $ICPFW_MERCHANT_ACCOUNT_INFORMATION->set(ICPFW_CHAVE, ''); 45 45 46 $ICPFW_ADDITIONAL_DATA_FIELD_TEMPLATE = new ICPFW_EMV();46 $ICPFW_ADDITIONAL_DATA_FIELD_TEMPLATE = new WP_ICPFW_EMV(); 47 47 $ICPFW_ADDITIONAL_DATA_FIELD_TEMPLATE->set(ICPFW_TXID, '***'); 48 48 49 $this->emv = new ICPFW_EMV();49 $this->emv = new WP_ICPFW_EMV(); 50 50 $this->emv->set(ICPFW_PAYLOAD_FORMAT_INDICATOR, '01'); 51 51 $this->emv->set(ICPFW_POINT_OF_INITIATION_METHOD, '12'); … … 226 226 include dirname(__FILE__) . '/../vendor/php-qrcode/qrcode.php'; 227 227 228 $generator = new ICPFW_Generate_QRCode($this->toString(), $options);228 $generator = new ICPFW_Generate_QRCode($this->toString(), ['s'=>null]); 229 229 230 230 /* Create bitmap image. */ -
incuca-tech-pix-for-woocommerce/trunk/includes/class-wc-pix-gateway.php
r2478380 r2524885 5 5 * 6 6 * @package Pix_For_WooCommerce/Classes/Gateway 7 * @version 1.3. 07 * @version 1.3.1 8 8 */ 9 9 … … 193 193 'title' => __('Nome do titular (obrigatório)', 'woocommerce-pix'), 194 194 'type' => 'text', 195 'description' => __('Por favor, informe o nome do titular da conta bancária da chave PIX cadastrada. ', 'woocommerce-pix'),195 'description' => __('Por favor, informe o nome do titular da conta bancária da chave PIX cadastrada.<br>Máximo de 25 caracteres.<br>Não abreviar o nome, apenas descartar os caracteres que excederem esse limite.<br>Retirar acentuação para melhor compatibilidade entre bancos: utilize apenas <code>A-Z</code>, <code>a-z</code> e <code>espaço</code>.', 'woocommerce-pix'), 196 196 'default' => '', 197 197 'required' => true, … … 203 203 'title' => __('Cidade do titular (obrigatório)', 'woocommerce-pix'), 204 204 'type' => 'text', 205 'description' => __('Por favor, informe a cidade do titular da conta bancária da chave PIX cadastrada. ', 'woocommerce-pix'),205 'description' => __('Por favor, informe a cidade do titular da conta bancária da chave PIX cadastrada.<br>Máximo de 15 caracteres.<br>Não abreviar a cidade, apenas descartar os caracteres que excederem esse limite.<br>Retirar acentuação para melhor compatibilidade entre bancos: utilize apenas <code>A-Z</code>, <code>a-z</code> e <code>espaço</code>', 'woocommerce-pix'), 206 206 'default' => '', 207 207 'required' => true, 208 208 'custom_attributes' => [ 209 'maxlength' => 25209 'maxlength' => 15 210 210 ] 211 211 ), … … 316 316 { 317 317 $order = wc_get_order($order_id); 318 if ($order-> payment_method!= 'pix_gateway') {318 if ($order->get_payment_method() != 'pix_gateway') { 319 319 return; 320 320 } … … 393 393 $pix = new ICPFW_QRCode(); 394 394 $pix->chave($this->key); 395 $pix->valor($order-> total);395 $pix->valor($order->get_total()); 396 396 $pix->cidade($this->city); 397 397 $pix->lojista($this->merchant); 398 398 $pix->moeda(986); // Real brasileiro (BRL) - Conforme ISO 4217: https://pt.wikipedia.org/wiki/ISO_4217 399 $pix->txId('ID -' . $order_id);399 $pix->txId('ID' . $order_id); 400 400 $link = $pix->toCode(); 401 401 $image = $pix->toImage(); … … 411 411 * Add content to the WC emails. 412 412 */ 413 public function email_instructions($order, $sent_to_admin, $plain_text = false, $email)413 public function email_instructions($order, $sent_to_admin, $plain_text, $email) 414 414 { 415 415 if ($order->get_payment_method() === $this->id && get_class($email) === 'WC_Email_Customer_On_Hold_Order') { -
incuca-tech-pix-for-woocommerce/trunk/includes/services/class-crc16.php
r2462413 r2524885 6 6 * @package Pix_For_WooCommerce/Classes/Gateway 7 7 */ 8 class ICPFW_CRC168 class WP_ICPFW_CRC16 9 9 { 10 10 /** … … 13 13 * @param string $texto The string 14 14 * @param integer $ordem Char position 15 * @return inte rger15 * @return integer 16 16 */ 17 17 public function byte($texto, $ordem) -
incuca-tech-pix-for-woocommerce/trunk/includes/services/class-emv.php
r2447380 r2524885 6 6 * @package Pix_For_WooCommerce/Classes/Gateway 7 7 */ 8 class ICPFW_EMV8 class WP_ICPFW_EMV 9 9 { 10 10 /** … … 23 23 * @param string $key 24 24 * @param mixed $value 25 * @return ICPFW_EMV25 * @return WP_ICPFW_EMV 26 26 */ 27 27 public function set($key, $value) … … 73 73 if (isset($this->fields[ICPFW_CRC16])) { 74 74 $stream = mb_substr($stream, 0, -4); 75 $crcCalculator = new ICPFW_CRC16();76 $ ICPFW_CRC16 = $crcCalculator->calculate($stream);77 $stream .= $ ICPFW_CRC16;75 $crcCalculator = new WP_ICPFW_CRC16(); 76 $WP_ICPFW_CRC16 = $crcCalculator->calculate($stream); 77 $stream .= $WP_ICPFW_CRC16; 78 78 } 79 79 return $stream; -
incuca-tech-pix-for-woocommerce/trunk/pix-for-woocommerce.php
r2478380 r2524885 4 4 * Plugin Name: InCuca Tech - Pix for WooCommerce 5 5 * Plugin URI: https://github.com/InCuca/woocommerce-pix 6 * Description: Ac cept payments with Pix technology.6 * Description: Aceite pagamentos com Pix. 7 7 * Author: InCuca Tech 8 8 * Author URI: https://incuca.net 9 * Version: 1.3. 010 * Tested up to: 5. 5.69 * Version: 1.3.1 10 * Tested up to: 5.7.1 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. 0' );18 define( 'WC_PIX_VERSION', '1.3.1' ); 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
r2478380 r2524885 3 3 Tags: woocommerce, payment gateway, gateway, pix 4 4 Requires WooCommerce at least: 2.1 5 Tested up to: 5. 6.15 Tested up to: 5.7.1 6 6 Requires PHP: 7.1 7 Stable Tag: 1.3. 07 Stable Tag: 1.3.1 8 8 License: GPLv3.0 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 94 94 95 95 * Opção de enviar o Pix por e-mail para pagamento 96 97 = 2021.02.21 - version 1.3.1 = 98 99 * Correções de Warnings do PHP
Note: See TracChangeset
for help on using the changeset viewer.