Plugin Directory

Changeset 2524885


Ignore:
Timestamp:
05/02/2021 01:00:28 PM (5 years ago)
Author:
incuca
Message:

update 1.3.1

Location:
incuca-tech-pix-for-woocommerce
Files:
31 added
7 edited

Legend:

Unmodified
Added
Removed
  • incuca-tech-pix-for-woocommerce/trunk/README.md

    r2478380 r2524885  
    88Requires WooCommerce at least: 2.1
    99
    10 Tested up to: 5.6.1
     10Tested up to: 5.7.1
    1111
    1212Requires PHP: 7.1
    1313
    14 Stable Tag: 1.3.0
     14Stable Tag: 1.3.1
    1515
    1616License: GPLv3.0
     
    103103
    104104* 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  
    88 *
    99 * @package Pix_For_WooCommerce
    10  * @version 1.2.0
     10 * @version 1.3.1
    1111 */
    1212
     
    4040    public function __construct()
    4141    {
    42         $ICPFW_MERCHANT_ACCOUNT_INFORMATION = new ICPFW_EMV();
     42        $ICPFW_MERCHANT_ACCOUNT_INFORMATION = new WP_ICPFW_EMV();
    4343        $ICPFW_MERCHANT_ACCOUNT_INFORMATION->set(ICPFW_GUI, 'br.gov.bcb.pix');
    4444        $ICPFW_MERCHANT_ACCOUNT_INFORMATION->set(ICPFW_CHAVE, '');
    4545
    46         $ICPFW_ADDITIONAL_DATA_FIELD_TEMPLATE = new ICPFW_EMV();
     46        $ICPFW_ADDITIONAL_DATA_FIELD_TEMPLATE = new WP_ICPFW_EMV();
    4747        $ICPFW_ADDITIONAL_DATA_FIELD_TEMPLATE->set(ICPFW_TXID, '***');
    4848
    49         $this->emv = new ICPFW_EMV();
     49        $this->emv = new WP_ICPFW_EMV();
    5050        $this->emv->set(ICPFW_PAYLOAD_FORMAT_INDICATOR, '01');
    5151        $this->emv->set(ICPFW_POINT_OF_INITIATION_METHOD, '12');
     
    226226        include dirname(__FILE__) . '/../vendor/php-qrcode/qrcode.php';
    227227
    228         $generator = new ICPFW_Generate_QRCode($this->toString(), $options);
     228        $generator = new ICPFW_Generate_QRCode($this->toString(), ['s'=>null]);
    229229
    230230        /* Create bitmap image. */
  • incuca-tech-pix-for-woocommerce/trunk/includes/class-wc-pix-gateway.php

    r2478380 r2524885  
    55 *
    66 * @package Pix_For_WooCommerce/Classes/Gateway
    7  * @version 1.3.0
     7 * @version 1.3.1
    88 */
    99
     
    193193                'title'       => __('Nome do titular (obrigatório)', 'woocommerce-pix'),
    194194                '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'),
    196196                'default'     => '',
    197197                'required'    => true,
     
    203203                'title'       => __('Cidade do titular (obrigatório)', 'woocommerce-pix'),
    204204                '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'),
    206206                'default'     => '',
    207207                'required'    => true,
    208208                'custom_attributes' => [
    209                     'maxlength' => 25
     209                    'maxlength' => 15
    210210                ]
    211211            ),
     
    316316    {
    317317        $order = wc_get_order($order_id);
    318         if ($order->payment_method != 'pix_gateway') {
     318        if ($order->get_payment_method() != 'pix_gateway') {
    319319            return;
    320320        }
     
    393393        $pix = new ICPFW_QRCode();
    394394        $pix->chave($this->key);
    395         $pix->valor($order->total);
     395        $pix->valor($order->get_total());
    396396        $pix->cidade($this->city);
    397397        $pix->lojista($this->merchant);
    398398        $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);
    400400        $link = $pix->toCode();
    401401        $image = $pix->toImage();
     
    411411     * Add content to the WC emails.
    412412     */
    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)
    414414    {
    415415        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  
    66 * @package Pix_For_WooCommerce/Classes/Gateway
    77 */
    8 class ICPFW_CRC16
     8class WP_ICPFW_CRC16
    99{
    1010    /**
     
    1313     * @param string $texto The string
    1414     * @param integer $ordem Char position
    15      * @return interger
     15     * @return integer
    1616     */
    1717    public function byte($texto, $ordem)
  • incuca-tech-pix-for-woocommerce/trunk/includes/services/class-emv.php

    r2447380 r2524885  
    66 * @package Pix_For_WooCommerce/Classes/Gateway
    77 */
    8 class ICPFW_EMV
     8class WP_ICPFW_EMV
    99{
    1010    /**
     
    2323     * @param string $key
    2424     * @param mixed $value
    25      * @return ICPFW_EMV
     25     * @return WP_ICPFW_EMV
    2626     */
    2727    public function set($key, $value)
     
    7373        if (isset($this->fields[ICPFW_CRC16])) {
    7474            $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;
    7878        }
    7979        return $stream;
  • incuca-tech-pix-for-woocommerce/trunk/pix-for-woocommerce.php

    r2478380 r2524885  
    44 * Plugin Name: InCuca Tech - Pix for WooCommerce
    55 * Plugin URI: https://github.com/InCuca/woocommerce-pix
    6  * Description: Accept payments with Pix technology.
     6 * Description: Aceite pagamentos com Pix.
    77 * Author: InCuca Tech
    88 * Author URI: https://incuca.net
    9  * Version: 1.3.0
    10  * Tested up to: 5.5.6
     9 * Version: 1.3.1
     10 * Tested up to: 5.7.1
    1111 * License: GNU General Public License v3.0
    1212 *
     
    1616defined('ABSPATH') or exit;
    1717
    18 define( 'WC_PIX_VERSION', '1.3.0' );
     18define( 'WC_PIX_VERSION', '1.3.1' );
    1919define( 'WC_PIX_PLUGIN_FILE', __FILE__ );
    2020define( 'WC_PIX_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
  • incuca-tech-pix-for-woocommerce/trunk/readme.txt

    r2478380 r2524885  
    33Tags: woocommerce, payment gateway, gateway, pix
    44Requires WooCommerce at least: 2.1
    5 Tested up to: 5.6.1
     5Tested up to: 5.7.1
    66Requires PHP: 7.1
    7 Stable Tag: 1.3.0
     7Stable Tag: 1.3.1
    88License: GPLv3.0
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    9494
    9595* 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.