Browse Source

支付宝退款

Gorden 5 months ago
parent
commit
6a61fd4cfe
1 changed files with 4 additions and 0 deletions
  1. 4 0
      app/admin/controller/order/RefundController.php

+ 4 - 0
app/admin/controller/order/RefundController.php

@@ -356,6 +356,7 @@ class RefundController extends Curd
                     $response = $this->refundToWx($payDetail0, $returnId, $amount);
                 } elseif ($payWay[0] == 'ALIPAY') {
                     $prepayid = 'ALIPAY';
+                    $payDetail0['order_id'] = $order->order_id;
                     $response = $this->refundToAlipay($payDetail0, $amount);
                 } elseif ($payWay[0] == 'MONEY') {
                     $prepayid = 'MONEY';
@@ -538,7 +539,10 @@ class RefundController extends Curd
         $data = [
             'out_trade_no' => $params['join_pay_order_id'],
             'refund_amount' => $amount,
+            'out_request_no' => $params['order_id']
         ];
+
+        Log::error("支付宝退款参数", $data);
         try {
             $res = Pay::alipay(config('payment.alipay'))->refund($data);
             $resArray = json_decode($res, true);