Skip to content

Erro no processamento de cartão após atualizar para versão mais recente. #390

@redati

Description

@redati

Erro ocorreu após atualização para versão mais recente. Não aconteceu com todos os pedidos.
"moduleVersion": "2.7.0",
"coreVersion": "2.8.0",
"platformVersion": "Magento Community 2.4.7-p6",
"saveOnSuccess": "false"
php8.3

Cliente tentou fazer um pagamento e na pagar.me deu erro desconhecido e não aprovou a compra. No magento esta configurado para salvar apenas se o pedido for aprovado, no entanto o pedido foi salvo como "pendente". Nos logs deu o seguinte erro:

Stack trace:
#0 /vendor/magento/framework/Webapi/ErrorProcessor.php(153): Magento\Framework\Webapi\ErrorProcessor->_critical()
#1 /vendor/magento/module-webapi/Controller/Rest.php(203): Magento\Framework\Webapi\ErrorProcessor->maskException()
#2 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch()
#3 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent()
#4 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception{closure}()
#5 /generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins()
#6 /vendor/magento/framework/App/Http.php(116): Magento\Webapi\Controller\Rest\Interceptor->dispatch()
#7 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Http->launch()
#8 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\Http\Interceptor->___callParent()
#9 /vendor/magento/module-application-performance-monitor/Plugin/ApplicationPerformanceMonitor.php(38): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception{closure}()
#10 /vendor/magento/framework/Interception/Interceptor.php(135): Magento\ApplicationPerformanceMonitor\Plugin\ApplicationPerformanceMonitor->aroundLaunch()
#11 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception{closure}()
#12 /generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http\Interceptor->___callPlugins()
#13 /vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#14 /pub/index.php(30): Magento\Framework\App\Bootstrap->run()
#15 {main} {"exception":"[object] (Exception(code: 42000): Report ID: webapi-6864855ea879e; Message: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',
,
'0',
'0',
'0' at line 25, query was:
INSERT INTO
pagarme_module_core_transaction
(
pagarme_id,
charge_id,
amount,
paid_amount,
acquirer_nsu,
acquirer_tid,
acquirer_auth_code,
acquirer_name,
acquirer_message,
type,
status,
created_at,
boleto_url,
card_data,
transaction_data
)
VALUES

        (
            'xx',
            'xx',                
            ,
            ,
            '0',
            '0',
            '0',
            '',
            '',
            'credit_card',
            'failed',
            '2025-07-02 00:53:51',
            '',
            'xxxx',
            'xxxx'
        );
     at /vendor/magento/framework/Webapi/ErrorProcessor.php:208)

[previous exception] [object] (Zend_Db_Statement_Exception(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',
,
'0',
'0',
'0' at line 25, query was:
INSERT INTO
pagarme_module_core_transaction
(
pagarme_id,
charge_id,
amount,
paid_amount,
acquirer_nsu,
acquirer_tid,
acquirer_auth_code,
acquirer_name,
acquirer_message,
type,
status,
created_at,
boleto_url,
card_data,
transaction_data
)
VALUES

        (
            'xx',
            'xx',                
            ,
            ,
            '0',
            '0',
            '0',
            '',
            '',
            'credit_card',
            'failed',
            '2025-07-02 00:53:51',
            '',
            'xxxxx',
            'xxxxx'
        );
     at /vendor/magento/framework/DB/Statement/Pdo/Mysql.php:109)

[previous exception] [object] (PDOException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',
,
'0',
'0',
'0' at line 25 at /vendor/magento/framework/DB/Statement/Pdo/Mysql.php:90)"} []

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions