diff --git a/app/Controller/UserController.php b/app/Controller/UserController.php index c98034d..2630977 100644 --- a/app/Controller/UserController.php +++ b/app/Controller/UserController.php @@ -110,8 +110,8 @@ class UserController extends AbstractController $options['out_refund_no'] = $order_inquiry['inquiry_refund_no']; $options['reason'] = "退款原因"; $options['amount'] = [ - 'refund' => 0.01 * 100, - 'total' => 0.01 * 100, + 'refund' => (int)1, + 'total' => (int)1, 'currency' => "CNY", ]; diff --git a/app/Model/OrderInquiryRefund.php b/app/Model/OrderInquiryRefund.php new file mode 100644 index 0000000..c37a99c --- /dev/null +++ b/app/Model/OrderInquiryRefund.php @@ -0,0 +1,60 @@ +first($fields); + } + + /** + * 获取信息-多条 + * @param array $params + * @param array $fields + * @return object|null + */ + public static function getList(array $params, array $fields = ['*']): object|null + { + return self::where($params)->get($fields); + } +} diff --git a/extend/Wechat/WechatPay.php b/extend/Wechat/WechatPay.php index 5765ea8..7ebd94b 100644 --- a/extend/Wechat/WechatPay.php +++ b/extend/Wechat/WechatPay.php @@ -179,7 +179,7 @@ class WechatPay $app = $this->createApp(); $options['notify_url'] = env('DOMAIN_NAME_DEV') . $this->config['refund_notify_url']; - + dump($options);die; $response = $app->getClient()->postJson("v3/refund/domestic/refunds", $options); if ($response->isFailed()) { // 出错了,处理异常