From 695420b2fedf155f906067199c1eb32681fdea25 Mon Sep 17 00:00:00 2001
From: liu <1873441552@qq.com>
Date: Thu, 6 Jun 2024 09:41:58 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E9=80=80=E6=AC=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 app/api/controller/IndexController.php | 29 ++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/app/api/controller/IndexController.php b/app/api/controller/IndexController.php
index 2cb6a7358..3fcdb6237 100644
--- a/app/api/controller/IndexController.php
+++ b/app/api/controller/IndexController.php
@@ -21,6 +21,35 @@ class IndexController extends BaseApiController
 
     public function index()
     {
+
+        $wechat = new PayService(1);
+        $order = [
+            'out_trade_no' => 'PF1717558027664507',
+            'out_refund_no' => time(),
+            'amount' => [
+                'refund' => 1,
+                'total' => 1,
+                'currency' => 'CNY',
+            ],
+            // '_action' => 'jsapi', // jsapi 退款,默认
+            // '_action' => 'app', // app 退款
+            // '_action' => 'combine', // 合单退款
+            // '_action' => 'h5', // h5 退款
+            // '_action' => 'miniapp', // 小程序退款
+            // '_action' => 'native', // native 退款
+
+        ];
+
+        $res =  $wechat->wechat->refund($order);
+        d($res);
+
+
+
+
+
+
+
+
         try{
             $a=new WechatTemplate();
          $a->NewQuotationNotification(['openid'=>'ocqhF6UfFQXE-SbzbP5YVQJlQAh0','data1'=>'阿萨','data2'=>date('Y-m-d H:i:s'),'data3'=>'占山','data3'=>18982406440]);