dongyou6768 2016-04-13 07:37
浏览 142

订单确认后更新订单状态

I face a problem with my Prestashop module. I'm developing a module for payment. It works but I have a problem with the order status. I close the order before the payment (because I have to send the reference to bank which is generated after the order confirmation). Then when the payment is accepted my bank returns to me a php file that I want to edit in order to change the order status from "Awaiting payment" to "Payment accepted", how can I achieve that?

I'm using Prestashop 1.6.1.4

Thank you for every suggestion or information you can provide.

Regards

  • 写回答

1条回答 默认 最新

  • dongshie8450 2016-04-13 08:57
    关注

    If you look at the PaymentModule.php class you can find how the order status is set after the order is created

    $new_history = new OrderHistory();
    $new_history->id_order = (int) $order->id;
    $new_history->changeIdOrderState((int) $id_order_state, $order, true);
    

    Do you absolutely need to send the order reference to the bank though? My shops just send the order id which you can get with Order::getNextOrderId() before you actually create it.

    评论

报告相同问题?

悬赏问题

  • ¥15 公交车和无人机协同运输
  • ¥15 stm32代码移植没反应
  • ¥15 matlab基于pde算法图像修复,为什么只能对示例图像有效
  • ¥100 连续两帧图像高速减法
  • ¥15 如何绘制动力学系统的相图
  • ¥15 对接wps接口实现获取元数据
  • ¥20 给自己本科IT专业毕业的妹m找个实习工作
  • ¥15 用友U8:向一个无法连接的网络尝试了一个套接字操作,如何解决?
  • ¥30 我的代码按理说完成了模型的搭建、训练、验证测试等工作(标签-网络|关键词-变化检测)
  • ¥50 mac mini外接显示器 画质字体模糊