QuickPay / magento-v2

Open Software License 3.0
5 stars 20 forks source link

explode requires a string, incase payment TransactionId is null the p… #39

Open WebKenth opened 1 year ago

WebKenth commented 1 year ago

Payment should fail based on payment criteria, not php standard.

Added new method to reduce code repitition and ensured fallback to string incase getTransactionId returns a non string

[2023-05-22T04:59:18.063860+00:00] main.CRITICAL: Exception: Deprecated Functionality: explode(): Passing null to parameter #2 ($string) of type string is deprecated in {webapp}/vendor/quickpay/magento2/Model/Payment.php on line 108 in {webapp}/vendor/magento/framework/App/ErrorHandler.php:62
Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler()
#1 {webapp}/vendor/quickpay/magento2/Model/Payment.php(108): explode()
#2 {webapp}/vendor/magento/module-sales/Model/Order/Payment/Operations/ProcessInvoiceOperation.php(83): QuickPay\Gateway\Model\Payment->capture()
#3 {webapp}/vendor/magento/module-sales/Model/Order/Payment/Operations/CaptureOperation.php(73): Magento\Sales\Model\Order\Payment\Operations\ProcessInvoiceOperation->execute()