【发布时间】:2021-10-05 06:54:01
【问题描述】:
- 万磁王 2.3.3
- 基于文件的会话
- 无清漆
在迁移到大约 1/3 订单成功(可以在后端看到它们)的新主机后,我们遇到了问题,点击订单成功页面但被重定向回他们的购物车而没有错误。显然,对于客户来说,这似乎表明他们的订单可能失败了。
由于/vendor/magento/module-checkout/Controller/Onepage/Success.php@execute:23,它们被重定向
if (!$this->_objectManager->get(\Magento\Checkout\Model\Session\SuccessValidator::class)->isValid()) {
return $this->resultRedirectFactory->create()->setPath('checkout/cart');
}
\Magento\Checkout\Model\Session\SuccessValidator@isValid:
public function isValid()
{
if (!$this->checkoutSession->getLastSuccessQuoteId()) {
return false;
}
if (!$this->checkoutSession->getLastQuoteId() || !$this->checkoutSession->getLastOrderId()) {
return false;
}
return true;
}
我正在记录所有订单成功 checkoutSession 数据,在客户被重定向的情况下,last_success_quote_id、last_quote_id 和 last_order_id 都是 NULL。
查看所有订单,似乎没有区分成功与重定向的模式。使用了多种支付网关(paypal、sagepay),因此假设支付网关不是这里的问题。
我已经尝试过基于文件和 redis 的会话存储,但都没有解决问题。
【问题讨论】:
标签: php magento magento2 magento-2.3