core_pay_service = new CorePayService(); } /** * 去支付 * @param string $type * @param string $trade_type * @param int $trade_id * @param string $return_url * @param string $quit_url * @param string $buyer_id * @return mixed * @throws DataNotFoundException * @throws DbException * @throws ModelNotFoundException */ public function confirm(string $transfer_no, array $data = []){ // $member = (new CoreMemberService())->getInfoByMemberId($this->member_id); // switch ($this->channel) { // case ChannelDict::WECHAT://公众号 // $openid = $openid ? $openid : $member['wx_openid'] ?? ''; // break; // case ChannelDict::WEAPP://微信小程序 // $openid = $openid ? $openid : $member['weapp_openid'] ?? ''; // break; // } // /**/return $this->core_pay_service->pay($trade_type, $trade_id, $type, $this->channel, $openid, $return_url, $quit_url, $buyer_id, $voucher, $this->member_id); } }