pagseguro / payment-magento

Módulo Oficial para Magento e Adobe Commerce
Open Software License 3.0
21 stars 6 forks source link

[Bug]: Erro ao finalizar por cartão de Crédito #39

Closed schossler closed 1 year ago

schossler commented 1 year ago

Dados de Contato

schossler@gmail.com

O que aconteceu?

Ao finalizar por Cartão de Crédito os produtos saem do estoque mas ocorre erro ao finalizar.

Método de Instalação

Via Composer

Versão da Magento/Adobe

2.4.6+ (Magento/Adobe >= 2.4.6)

Qual a versão do PHP?

PHP 8.1

Existem logs relevantes sobre o problema?

[2023-10-25T00:03:48.468986+00:00] main.CRITICAL: TypeError: Magento\Framework\Exception\LocalizedException::__construct(): Argument #1 ($phrase) must be of type Magento\Framework\Phrase, string given, called in /home/www/public_html/vendor/pagbank/payment-magento/Plugin/VaultAddtionalCommand.php on line 545 and defined in /home/www/public_html/vendor/magento/framework/Exception/LocalizedException.php:36
Stack trace:
#0 /home/www/public_html/vendor/pagbank/payment-magento/Plugin/VaultAddtionalCommand.php(545): Magento\Framework\Exception\LocalizedException->__construct('Public hash sho...')
#1 /home/www/public_html/vendor/pagbank/payment-magento/Plugin/VaultAddtionalCommand.php(741): PagBank\PaymentMagento\Plugin\VaultAddtionalCommand->attachTokenExtensionAttribute(Object(Magento\Sales\Model\Order\Payment\Interceptor))
#2 /home/www/public_html/vendor/magento/module-sales/Model/Order/Payment.php(377): PagBank\PaymentMagento\Plugin\VaultAddtionalCommand->initialize(NULL, Object(Magento\Framework\DataObject))
#3 /home/www/public_html/vendor/magento/module-sales/Model/Order.php(1002): Magento\Sales\Model\Order\Payment->place()
#4 /home/www/public_html/vendor/magento/module-sales/Model/Order.php(1228): Magento\Sales\Model\Order->_placePayment()
#5 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Sales\Model\Order->place()
#6 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Sales\Model\Order\Interceptor->___callParent('place', Array)
#7 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Model\Order\Interceptor->Magento\Framework\Interception\{closure}()
#8 /home/www/public_html/generated/code/Magento/Sales/Model/Order/Interceptor.php(32): Magento\Sales\Model\Order\Interceptor->___callPlugins('place', Array, Array)
#9 /home/www/public_html/vendor/magento/module-sales/Model/Service/OrderService.php(207): Magento\Sales\Model\Order\Interceptor->place()
#10 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Sales\Model\Service\OrderService->place(Object(Magento\Sales\Model\Order\Interceptor))
#11 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Sales\Model\Service\OrderService\Interceptor->___callParent('place', Array)
#12 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Model\Service\OrderService\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Sales\Model\Order\Interceptor))
#13 /home/www/public_html/generated/code/Magento/Sales/Model/Service/OrderService/Interceptor.php(32): Magento\Sales\Model\Service\OrderService\Interceptor->___callPlugins('place', Array, Array)
#14 /home/www/public_html/vendor/magento/module-quote/Model/QuoteManagement.php(624): Magento\Sales\Model\Service\OrderService\Interceptor->place(Object(Magento\Sales\Model\Order\Interceptor))
#15 /home/www/public_html/vendor/magento/module-quote/Model/QuoteManagement.php(500): Magento\Quote\Model\QuoteManagement->submitQuote(Object(Magento\Quote\Model\Quote\Interceptor), Array)
#16 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\QuoteManagement->submit(Object(Magento\Quote\Model\Quote\Interceptor), Array)
#17 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\QuoteManagement\Interceptor->___callParent('submit', Array)
#18 /home/www/public_html/vendor/magento/module-sales-rule/Plugin/CouponUsagesIncrement.php(54): Magento\Quote\Model\QuoteManagement\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Quote\Model\Quote\Interceptor), Array)
#19 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\SalesRule\Plugin\CouponUsagesIncrement->aroundSubmit(Object(Magento\Quote\Model\QuoteManagement\Interceptor), Object(Closure), Object(Magento\Quote\Model\Quote\Interceptor))
#20 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\QuoteManagement\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Quote\Model\Quote\Interceptor))
#21 /home/www/public_html/generated/code/Magento/Quote/Model/QuoteManagement/Interceptor.php(32): Magento\Quote\Model\QuoteManagement\Interceptor->___callPlugins('submit', Array, NULL)
#22 /home/www/public_html/vendor/magento/module-quote/Model/QuoteManagement.php(458): Magento\Quote\Model\QuoteManagement\Interceptor->submit(Object(Magento\Quote\Model\Quote\Interceptor))
#23 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\QuoteManagement->placeOrder(17566, NULL)
#24 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\QuoteManagement\Interceptor->___callParent('placeOrder', Array)
#25 /home/www/public_html/vendor/paypal/module-braintree-core/Plugin/OrderCancellation.php(64): Magento\Quote\Model\QuoteManagement\Interceptor->Magento\Framework\Interception\{closure}(17566, NULL)
#26 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(135): PayPal\Braintree\Plugin\OrderCancellation->aroundPlaceOrder(Object(Magento\Quote\Model\QuoteManagement\Interceptor), Object(Closure), 17566)
#27 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\QuoteManagement\Interceptor->Magento\Framework\Interception\{closure}(17566)
#28 /home/www/public_html/generated/code/Magento/Quote/Model/QuoteManagement/Interceptor.php(23): Magento\Quote\Model\QuoteManagement\Interceptor->___callPlugins('placeOrder', Array, NULL)
#29 /home/www/public_html/vendor/magento/module-checkout/Model/PaymentInformationManagement.php(152): Magento\Quote\Model\QuoteManagement\Interceptor->placeOrder(17566)
#30 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Checkout\Model\PaymentInformationManagement->savePaymentInformationAndPlaceOrder(17566, Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address))
#31 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Checkout\Model\PaymentInformationManagement\Interceptor->___callParent('savePaymentInfo...', Array)
#32 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Checkout\Model\PaymentInformationManagement\Interceptor->Magento\Framework\Interception\{closure}(17566, Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address))
#33 /home/www/public_html/generated/code/Magento/Checkout/Model/PaymentInformationManagement/Interceptor.php(23): Magento\Checkout\Model\PaymentInformationManagement\Interceptor->___callPlugins('savePaymentInfo...', Array, Array)
#34 [internal function]: Magento\Checkout\Model\PaymentInformationManagement\Interceptor->savePaymentInformationAndPlaceOrder(17566, Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address))
#35 /home/www/public_html/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)
#36 /home/www/public_html/vendor/magento/module-webapi/Controller/Rest.php(202): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor->process(Object(Magento\Framework\Webapi\Rest\Request\Proxy))
#37 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#38 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent('dispatch', Array)
#39 /home/www/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#40 /home/www/public_html/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array)
#41 /home/www/public_html/vendor/magento/framework/App/Http.php(116): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#42 /home/www/public_html/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()
#43 /home/www/public_html/pub/index.php(30): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#44 {main} {"exception":"[object] (TypeError(code: 0): Magento\\Framework\\Exception\\LocalizedException::__construct(): Argument #1 ($phrase) must be of type Magento\\Framework\\Phrase, string given, called in /home/www/public_html/vendor/pagbank/payment-magento/Plugin/VaultAddtionalCommand.php on line 545 at /home/www/public_html/vendor/magento/framework/Exception/LocalizedException.php:36)"} []

Meu log não contém informações confidenciais

Qual a gravidade do problema?

Um dos métodos de pagamento não está funcionando

elisei commented 1 year ago

Olá @schossler

É necessário que indique etapas para reproduzir o erro, no entanto o comportamento de retirar do estoque a partir da sinalização de venda realizada é o processo esperado.

schossler commented 1 year ago

image

o que estranhei que tive vendas em Cartão, mas em vários casos estou enfrentando esse problema ao finalizar.

elisei commented 1 year ago

Olá @schossler

Obrigado pelo reporte, módulo atualizado para 100.3.31-p1 para corrigir esse problema.

schossler commented 1 year ago

@elisei funcionando, obrigado