正在显示
1 个修改的文件
包含
4 行增加
和
5 行删除
@@ -500,10 +500,9 @@ class Common extends Api | @@ -500,10 +500,9 @@ class Common extends Api | ||
500 | } | 500 | } |
501 | $res = Db::name('tuikuan')->where('OrderSn', $OrderInfo['OrderSn'])->where('seller_id', $IsSeller)->update(['status' => $params['status']]); | 501 | $res = Db::name('tuikuan')->where('OrderSn', $OrderInfo['OrderSn'])->where('seller_id', $IsSeller)->update(['status' => $params['status']]); |
502 | if ($params['type'] == 1) { | 502 | if ($params['type'] == 1) { |
503 | - //拒绝签订协议 给予用户退款 | ||
504 | - $OrderSn = Db::name('agreement')->where('id', $params['id'])->value('OrderSn'); | ||
505 | - $PayOrderInfo = Db::name('pay_order')->where('OrderSn', $OrderSn)->where('type', 1)->find(); | ||
506 | - $TuiMoney = $PayOrderInfo['UpMoney'] * $params['bili'] + $PayOrderInfo['Money']; | 503 | + $OrderSn = Db::name('agreement')->where('id', $params['id'])->find(); |
504 | + $PayOrderInfo = Db::name('pay_order')->where('OrderSn', $OrderSn['OrderSn'])->where('type', 1)->find(); | ||
505 | + $TuiMoney = $OrderSn['UpMoney'] + $OrderSn['Money']; | ||
507 | //配置 | 506 | //配置 |
508 | $config = [ | 507 | $config = [ |
509 | 'app_id' => 'wx6a9080f20326f817', | 508 | 'app_id' => 'wx6a9080f20326f817', |
@@ -519,7 +518,7 @@ class Common extends Api | @@ -519,7 +518,7 @@ class Common extends Api | ||
519 | try { | 518 | try { |
520 | $result = $payment->refundByTransactionId($PayOrderInfo['WeChatOrder'], $PayOrderInfo['PayOrder'], $PayOrderInfo['money'] * 100, $TuiMoney * 100); // 总金额 100, 退款 80,操作员:商户号 | 519 | $result = $payment->refundByTransactionId($PayOrderInfo['WeChatOrder'], $PayOrderInfo['PayOrder'], $PayOrderInfo['money'] * 100, $TuiMoney * 100); // 总金额 100, 退款 80,操作员:商户号 |
521 | //更改订单状态为已退款 | 520 | //更改订单状态为已退款 |
522 | - Db::name('pay_order')->where('OrderSn', $OrderSn)->where('PayOrder', $PayOrderInfo['PayOrder'])->update(['type' => 0]); | 521 | + Db::name('pay_order')->where('OrderSn', $OrderSn['OrderSn'])->where('PayOrder', $PayOrderInfo['PayOrder'])->update(['type' => 0]); |
523 | } catch (Exception $e) { | 522 | } catch (Exception $e) { |
524 | $e->getMessage(); | 523 | $e->getMessage(); |
525 | } | 524 | } |
-
请 注册 或 登录 后发表评论