import axios from '../../utils/axios';

// 获取 AuthCode
export function getAuthCode(getAuthCodeDTO) {
    return axios.post(`/PAY-SERVER/api/airwallexPay/getAuthCode`, getAuthCodeDTO);
}

// 创建收款人
export function createBeneficiary(payloadData) {
    return axios.post(`/PAY-SERVER/api/airwallexPay/caBeneficiary`, payloadData);
}

// 新建一笔付款
export function createPayment(reqData) {
    return axios.post(`/PAY-SERVER/api/airwallexPay/caPayment`, reqData);
}

// 查询付款详情
export function getPaymentById(paymentId) {
    return axios.get(`/PAY-SERVER/api/airwallex/getPaymentById/${paymentId}`);
}

// 获取用户钱包详情
export function getWallet(id) {
    return axios.get(`/PAY-SERVER/tAirwallexWallet/getWallet?adminId=${id}`);
}