Skip to content

Check if requiredParams is string before passing to json_decode#14

Open
barryvdh wants to merge 1 commit into
bluepayment-plugin:masterfrom
barryvdh:patch-1
Open

Check if requiredParams is string before passing to json_decode#14
barryvdh wants to merge 1 commit into
bluepayment-plugin:masterfrom
barryvdh:patch-1

Conversation

@barryvdh
Copy link
Copy Markdown

@barryvdh barryvdh commented May 2, 2025

Gave errors with Autopay

[2025-05-01T12:14:22.247245+00:00] main.CRITICAL: TypeError: json_decode(): Argument #1 ($json) must be of type string, null given in /data/web/magento_pl_staging/releases/28/vendor/bluepayment-plugin/module-bluepayment/Model/Gateway.php:493
Stack trace:
#0 /data/web/magento_pl_staging/releases/28/vendor/bluepayment-plugin/module-bluepayment/Model/Gateway.php(493): json_decode()
#1 /data/web/magento_pl_staging/releases/28/vendor/bluepayment-plugin/module-bluepayment/Model/CustomFieldResolver.php(31): BlueMedia\BluePayment\Model\Gateway->getRequiredParams()
#2 /data/web/magento_pl_staging/releases/28/vendor/bluepayment-plugin/module-bluepayment/Model/Payment.php(480): BlueMedia\BluePayment\Model\CustomFieldResolver->resolve()
#3 /data/web/magento_pl_staging/releases/28/vendor/bluepayment-plugin/module-bluepayment/Controller/Processing/Create.php(213): BlueMedia\BluePayment\Model\Payment->getFormRedirectFields()
#4 /data/web/magento_pl_staging/releases/28/vendor/magento/framework/Interception/Interceptor.php(58): BlueMedia\BluePayment\Controller\Processing\Create->execute()
#5 /data/web/magento_pl_staging/releases/28/vendor/magento/framework/Interception/Interceptor.php(138): BlueMedia\BluePayment\Controller\Processing\Create\Interceptor->___callParent()
#6 /data/web/magento_pl_staging/releases/28/vendor/magento/framework/Interception/Interceptor.php(153): BlueMedia\BluePayment\Controller\Processing\Create\Interceptor->Magento\Framework\Interception\{closure}()
#7 /data/web/magento_pl_staging/releases/28/generated/code/BlueMedia/BluePayment/Controller/Processing/Create/Interceptor.php(23): BlueMedia\BluePayment\Controller\Processing\Create\Interceptor->___callPlugins()
#8 /data/web/magento_pl_staging/releases/28/vendor/magento/framework/App/Action/Action.php(111): BlueMedia\BluePayment\Controller\Processing\Create\Interceptor->execute()
#9 /data/web/magento_pl_staging/releases/28/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch()
#10 /data/web/magento_pl_staging/releases/28/vendor/magento/framework/Interception/Interceptor.php(138): BlueMedia\BluePayment\Controller\Processing\Create\Interceptor->___callParent()
#11 /data/web/magento_pl_staging/releases/28/vendor/tinxit/b2bpricing-magento2/Plugin/App/Action/Context.php(101): BlueMedia\BluePayment\Controller\Processing\Create\Interceptor->Magento\Framework\Interception\{closure}()
#12 /data/web/magento_pl_staging/releases/28/vendor/magento/framework/Interception/Interceptor.php(135): TinxIT\B2BPricing\Plugin\App\Action\Context->aroundDispatch()
#13 /data/web/magento_pl_staging/releases/28/app/code/Anowave/Ec/Plugin/App/Action/Context.php(148): BlueMedia\BluePayment\Controller\Processing\Create\Interceptor->Magento\Framework\Interception\{closure}()
#14 /data/web/magento_pl_staging/releases/28/vendor/magento/framework/Interception/Interceptor.php(135): Anowave\Ec\Plugin\App\Action\Context->aroundDispatch()
#15 /data/web/magento_pl_staging/releases/28/vendor/magento/framework/Interception/Interceptor.php(153): BlueMedia\BluePayment\Controller\Processing\Create\Interceptor->Magento\Framework\Interception\{closure}()
#16 /data/web/magento_pl_staging/releases/28/generated/code/BlueMedia/BluePayment/Controller/Processing/Create/Interceptor.php(32): BlueMedia\BluePayment\Controller\Processing\Create\Interceptor->___callPlugins()
#17 /data/web/magento_pl_staging/releases/28/vendor/magento/framework/App/FrontController.php(245): BlueMedia\BluePayment\Controller\Processing\Create\Interceptor->dispatch()
#18 /data/web/magento_pl_staging/releases/28/vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse()
#19 /data/web/magento_pl_staging/releases/28/vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest()
#20 /data/web/magento_pl_staging/releases/28/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch()
#21 /data/web/magento_pl_staging/releases/28/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent()
#22 /data/web/magento_pl_staging/releases/28/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(99): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#23 /data/web/magento_pl_staging/releases/28/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch()
#24 /data/web/magento_pl_staging/releases/28/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(71): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#25 /data/web/magento_pl_staging/releases/28/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch()
#26 /data/web/magento_pl_staging/releases/28/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#27 /data/web/magento_pl_staging/releases/28/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins()
#28 /data/web/magento_pl_staging/releases/28/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch()
#29 /data/web/magento_pl_staging/releases/28/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()
#30 /data/web/magento_pl_staging/releases/28/pub/index.php(30): Magento\Framework\App\Bootstrap->run()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant