View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007790 | module Amazon Pay | main | public | 2025-04-30 11:56 | 2025-05-02 10:56 |
Reporter | dspeckhardt | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | random |
Status | acknowledged | Resolution | open | ||
Product Version | 2.1.6 | ||||
Summary | 0007790: TypeError Constants::isAmazonPayment(): Argument #1 ($paymentId) must be of type string, null given | ||||
Description | OxidSolutionCatalysts\AmazonPay\Core\Constants::isAmazonPayment(): Argument #1 ($paymentId) must be of type string, null given, called in .../vendor/oxid-esales/amazon-pay-module/src/Controller/OrderController.php on line 131 In there OrderController on one place you have a fallback to empty string, which is probably necessary. See: https://github.com/OXID-eSales/amazon-pay-module/blob/v2.1.6/src/Controller/OrderController.php#L49 But in other places in the OrderController you are not applying the fallback. For example in the line 131, where the type error occurs. https://github.com/OXID-eSales/amazon-pay-module/blob/v2.1.6/src/Controller/OrderController.php#L131 You should make sure, that the parameter is never null by applying the fallback OR change the method to accest also NULL, which is probably the best solution, because the method Constants::isAmazonPayment() is also called from other classes then the OrderController... | ||||
Steps To Reproduce | It happens, when $basket->getPaymentId() is null, which is allowed by the OXID Framework. | ||||
Additional Information | This Exception leads to failing order execution in the frontend, so it is critical. | ||||
Tags | No tags attached. | ||||