Plugin Directory

Changeset 2715496


Ignore:
Timestamp:
04/27/2022 02:24:09 PM (4 years ago)
Author:
appmaxplataforma
Message:

Alteração de mensagem exibida em caso de problemas com pagamento.

Location:
appmax-woocommerce/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • appmax-woocommerce/trunk/appmax-woocommerce.php

    r2613863 r2715496  
    33 * Plugin Name: AppMax WooCommerce
    44 * Description: Gateway de pagamento AppMax para WooCommerce.
    5  * Version: 2.0.45
     5 * Version: 2.0.46
    66 * License: GPLv2 or later
    77 * Author: AppMax Plataforma de Vendas Ltda
     
    2424    class AppMax_WC
    2525    {
    26         const VERSION = '2.0.45';
     26        const VERSION = '2.0.46';
    2727
    2828        /**
  • appmax-woocommerce/trunk/includes/class-awc-process-payment.php

    r2613863 r2715496  
    522522            $this->awc_add_log( $log_content );
    523523
    524             $message_exception = sprintf( "%s", AWC_Errors_Api::AWC_MESSAGE_ERROR_PAYMENT );
    525             throw new \Exception( $message_exception );
    526         }
    527        
     524            $message_exception = sprintf( "%s", AWC_Errors_Api::AWC_MESSAGE_005 );
     525            throw new \Exception( $message_exception );
     526        }
    528527
    529528        $response_body = AWC_Helper::awc_decode_object( wp_remote_retrieve_body( $response ) );
    530529
    531 
    532530        $this->awc_verify_access_token( $response_body );
    533531
    534532        if ( ! $response_body->success and $response_body->text == AWC_Errors_Api::AWC_VALIDATE_REQUEST ) {
    535             $message_exception = sprintf( "%s", AWC_Errors_Api::AWC_MESSAGE_ERROR_PAYMENT );
     533
     534            $message_exception = sprintf( "%s", AWC_Errors_Api::AWC_MESSAGE_005 );
    536535
    537536            if ($response_body->data) {
     
    548547        if ( ! $response_body->success ) {
    549548
    550             $order->update_status( AWC_Order_Status::AWC_FAILED, $response_body->text );
     549            if ($order->status == AWC_Order_Status::AWC_FAILED) {
     550                $order->add_order_note( $response_body->text );
     551            }
     552
     553            if ($order->status != AWC_Order_Status::AWC_FAILED) {
     554                $order->update_status( AWC_Order_Status::AWC_FAILED, $response_body->text );
     555            }
    551556
    552557            if ( $this->awc_enable_debug() ) {
     
    556561            }
    557562
    558             $message_exception = sprintf( "%s - %s", AWC_Errors_Api::AWC_MESSAGE_ERROR_PAYMENT, $response_body->text );
     563            $message_exception = sprintf( "%s", AWC_Errors_Api::AWC_MESSAGE_005 );
    559564            throw new \Exception( $message_exception );
    560565        }
  • appmax-woocommerce/trunk/includes/domain/class-awc-errors-api.php

    r2533054 r2715496  
    1111    const AWC_MESSAGE_003 = "Há um problema de conexão com o gateway de pagamento. Desculpe pela inconveniência.";
    1212    const AWC_MESSAGE_004 = "Chave de API inválida. Contate o gateway de pagamento.";
     13    const AWC_MESSAGE_005 = "Houve um erro ao processar seu pagamento. Verifique mais detalhes nas informações do seu pedido.";
    1314
    1415    const AWC_MESSAGE_ERROR_CUSTOMER = "Erro no processamento de informações do cliente.";
  • appmax-woocommerce/trunk/readme.txt

    r2613863 r2715496  
    44Requires at least: 4.0
    55Tested up to: 5.1
    6 Stable tag: 2.0.45
     6Stable tag: 2.0.46
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    138138== Changelog ==
    139139
     140= 2.0.46 =
     141
     142* Alteração de mensagem exibida em caso de problemas com pagamento.
     143
    140144= 2.0.45 =
    141145
Note: See TracChangeset for help on using the changeset viewer.