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]);