dsjk3214 2015-11-12 09:28
浏览 53

Prestashop 1.6支付模块订单状态

I created payment module for Prestashop 1.6.1.1.

The problem is with updating order state after customer returns from banks website. I can not get cart from context as shown on examples.

For example, this is controller, which is executed, when customer presses cancel button on bank:

class MyModulePaymentCancelModuleFrontController extends ModuleFrontController{
    public function initContent(){
        $cart = $this->context->cart;
    }
}

The cart value is null. It seems like the cart has been deleted / discarded prior to the controller.

In the contrary, I get proper cart from context in MyModulePaymentModuleFrontController (creating order) and MyModulePaymentReturnModuleFrontController (payment completed successfully).

Could anyone please point me in the right direction.

  • 写回答

1条回答 默认 最新

  • duan6301 2015-11-12 11:36
    关注

    Looks like cart is destroyed as soon as order is created. I sent order id to the bank, which I expected to be returned and then used that as reference point for updating orders.

    评论

报告相同问题?

悬赏问题

  • ¥15 关于smbclient 库的使用
  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画