getMessage()); } } /** * 订单支付 */ #[Route(path: "wx",methods: "post")] public function notifyWx(Request $request) { try { } catch (\Throwable $throwable) { return error($throwable->getMessage()); } } /** * 充值并支付 */ #[Route(path: "payrecharge",methods: "post")] public function notifyPayRecharge(Request $request) { try { } catch (\Throwable $throwable) { return error($throwable->getMessage()); } } /** * 会员卡充值 */ #[Route(path: "recharge",methods: "post")] public function notifyDataRecharge(Request $request) { try { } catch (\Throwable $throwable) { return error($throwable->getMessage()); } } /** * 小程序配置 * @return array */ protected function getWxConfig(): array { return [ 'token' => 'test', 'appid' => sConf("wechat.mini_appid"), 'appsecret' => sConf("wechat.mini_secret"), 'encodingaeskey' => 'BJIUzE0gqlWy0GxfPp4J1oPTBmOrNDIGPNav1YFH5Z5', // 配置商户支付参数(可选,在使用支付功能时需要) 'mch_id' => sConf("wechat.mch_id"), 'mch_key' => sConf("wechat.mch_key") ]; } }