...
|
...
|
@@ -658,7 +658,7 @@ class Order extends Api |
|
|
$order = $model->where('id',$order_id)->find();
|
|
|
empty($order) && $this->error('订单不存在');
|
|
|
|
|
|
$res = $this->cancelOrderAction($order);
|
|
|
$res = self::cancelOrderAction($order);
|
|
|
$res['code'] == 0 && $this->error($res['msg']);
|
|
|
|
|
|
$this->success('取消成功');
|
...
|
...
|
@@ -668,7 +668,7 @@ class Order extends Api |
|
|
* 取消订单操作
|
|
|
* @ApiInternal
|
|
|
*/
|
|
|
public function cancelOrderAction($order)
|
|
|
public static function cancelOrderAction($order)
|
|
|
{
|
|
|
\think\Log::write('订单数据:'.json_encode($order));
|
|
|
if($order['freight_status'] == '20'){
|
...
|
...
|
@@ -691,7 +691,7 @@ class Order extends Api |
|
|
if($order['pay_status'] == '20'){
|
|
|
$config = Service::getConfig('wechat');
|
|
|
$config['app_id'] = $config['miniapp_id'];
|
|
|
$config['notify_url'] = $this->request->domain().'api/notify/refund/type/wechat';
|
|
|
$config['notify_url'] = request()->domain().'api/notify/refund/type/wechat';
|
|
|
$config['return_url'] = '';
|
|
|
$wechat = Pay::wechat($config);
|
|
|
$refund_no = 'LQ-'.time().mt_rand(10000,99999);
|
...
|
...
|
|