init($params); (new OrderCallbackService($this->shop_id, $this->mall_id, $this->customer_num))->create($this->data); } /** * { * "ToUserName": "gh_*", * "FromUserName": "OPENID", * "CreateTime": 1662480000, * "MsgType": "event", * "Event": "channels_ec_order_cancel", * "order_info": { * "order_id": 3705115058471208928, * "cancel_type": 1 * } * } * 订单取消 * @return void * @throws \Exception */ public function channels_ec_order_cancel(array $params) { $this->init($params); (new OrderCallbackService($this->shop_id, $this->mall_id))->cancel($this->data); } /** * { * "ToUserName": "gh_*", * "FromUserName": "OPENID", * "CreateTime": 1662480000, * "MsgType": "event", * "Event": "channels_ec_order_pay", * "order_info": { * "order_id": 3705115058471208928, * "pay_time": 1658509200 * } * } * 订单支付 * @return void * @throws \Exception */ public function channels_ec_order_pay(array $params) { $this->init($params); (new OrderCallbackService($this->shop_id, $this->mall_id))->paid($this->data); } /** * { * "ToUserName": "gh_*", * "FromUserName": "OPENID", * "CreateTime": 1662480000, * "MsgType": "event", * "Event": "channels_ec_order_deliver", * "order_info": { * "order_id": 3705115058471208928, * "finish_delivery": 1 * } * } * 订单发货 * @return void * @throws \Exception */ public function channels_ec_order_deliver(array $params) { $this->init($params); (new OrderCallbackService($this->shop_id, $this->mall_id))->ship($this->data); } /** * { * "ToUserName": "gh_*", * "FromUserName": "OPENID", * "CreateTime": 1662480000, * "MsgType": "event", * "Event": "channels_ec_order_confirm", * "order_info": { * "order_id": 3705115058471208928, * "confirm_type": 1 * } * } * 订单收货 * @return void * @throws \Exception */ public function channels_ec_order_confirm(array $params) { $this->init($params); (new OrderCallbackService($this->shop_id, $this->mall_id))->sing($this->data); } /** * { * "ToUserName": "gh_*", * "FromUserName": "OPENID", * "CreateTime": 1662480000, * "MsgType": "event", * "Event": "channels_ec_order_settle", * "order_info": { * "order_id": 3705115058471208928, * "settle_time": 1662480000 * } * } * 订单结算 * @return void * @throws \Exception */ public function channels_ec_order_settle(array $params) { $this->init($params); (new OrderCallbackService($this->shop_id, $this->mall_id))->settlement($this->data); } /** * { * "ToUserName": "gh_*", * "FromUserName": "OPENID", * "CreateTime": 1662480000, * "MsgType": "event", * "Event": "channels_ec_order_ext_info_update", * "order_info": { * "order_id": 3705115058471208928, * "type": 1 * } * } * 订单其他信息更新 * @return void * @throws \Exception */ public function channels_ec_order_ext_info_update(array $params) { $this->init($params); (new OrderCallbackService($this->shop_id, $this->mall_id))->update($this->data); } /** * @return void * @throws \Exception */ public function product_order_status_update(array $params) { $this->init($params); // $key = 'ProductOrderStatusUpdate'; // switch ($this->data[$key]['status']) { // case 10: // 待付款 // (new OrderCallbackService($this->shop_id, $this->mall_id))->create($this->data, $key); // break; // case 20: // 已支付 // (new OrderCallbackService($this->shop_id, $this->mall_id))->paid($this->data, $key); // break; // case 21: // 部分发货 // break; // case 30: // 待收货 // (new OrderCallbackService($this->shop_id, $this->mall_id))->ship($this->data, $key); // break; // case 100: // 订单完成 // (new OrderCallbackService($this->shop_id, $this->mall_id))->sing($this->data, $key); // break; // case 200: // 全部商品售后之后,订单取消 // (new OrderCallbackService($this->shop_id, $this->mall_id))->cancel($this->data, $key); // break; // case 250: // 未付款用户主动取消或超时未付款订单自动取消 // (new OrderCallbackService($this->shop_id, $this->mall_id))->cancel($this->data, $key); // break; // } } }