douzhicui2209 2014-08-07 23:06
浏览 30

如何在prestashop中创建挂单

Most of the Prestashop payment modules I have come across or any viable tutorial seem to follow the trend of creating and "validating" the order after payment has been ascertained i.e. after the return from a remote payment gateway like PayPal.

We have an architecture that requires we create a traditional "pending" order before payment is even attempted, and then this order's status (history) is changed to "payment accepted" and validated after the payment is completed or otherwise.

Is there a less than complicated way of doing something like this with prestashop?

I have tried calling "validateOrder" with a "pending" order status, and I noticed that would fire an order confirmation mail, and empty the contents of the cart irrespective of the payment status.

  • 写回答

1条回答 默认 最新

  • douguxun6866 2015-04-29 09:47
    关注

    You can pass the needed order state to validateOrder method called by the payment gateway module.

    validateOrder($id_cart, $id_order_state, $amount_paid, $payment_method = 'Unknown', $message = null, $extra_vars = array(), $currency_special = null, $dont_touch_amount = false,   $secure_key = false, Shop $shop = null);
    
    评论

报告相同问题?

悬赏问题

  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法