niucloud-admin/niucloud/app/service/api/pay/TransferService.php
全栈小学生 a12b495d74 up
2025-09-20 09:09:51 +08:00

55 lines
1.8 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\service\api\pay;
use app\dict\common\ChannelDict;
use app\service\core\member\CoreMemberService;
use app\service\core\pay\CorePayService;
use core\base\BaseApiService;
/**
* 支付业务
*/
class TransferService extends BaseApiService
{
public $core_pay_service;
public function __construct()
{
parent::__construct();
$this->core_pay_service = new CorePayService();
}
/**
* 去支付
* @param string $transfer_no
* @param array $data
* @return void
*/
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);
}
}