簡體   English   中英

Prestashop 1.6無法通過購物車ID查找訂單

[英]Prestashop 1.6 unable to find Order via Cart ID

我在Prestashop 1.6中使用了付款模塊,一切正常,直到發生升級為止。 付款服務器將驗證數據返回到類似“ http://..../validation.php ”的URL。

該文件嘗試使用服務器返回的購物車ID來獲取訂單,顯然找不到該訂單,因此未清空購物車,也未創建訂單。

我將日志添加到該文件中以查看收到了什么。 CartID(data ['reference'])是正確的。

writeMessage("Trying to get the order id using the cart:".$data['reference']);
        writeMessage(Order::getOrderByCartId((int)($data['reference'])));
        if ($id_order = intval(Order::getOrderByCartId((int)($data['reference']))))
        {
                writeMessage("Got the order by cart id.");
                writeMessage("Got the order by cart id:".$id_order);
                $order = new Order($id_order);
...

我想知道對Order :: getOrderByCartId的調用是否正確。 這是調用此函數的正確方法嗎?

任何想法?

我可以回答我的問題。 調用getOrderByCartId時沒有問題,因為目前還沒有創建訂單,這很正常。 問題實際上出在模塊的驗證功能上,即if的第二部分。

$module->validateOrder(intval($data['reference']), $orderStatus, $amount, $module->displayName, $orderMessage, NULL, $id_currency, true, $customer->secure_key);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM