import http from './index.js';

// 分页查询支付方式
export const pagePayment = (params) => http.get('/shop/payment/page', {params})

// 查询支付方式
export const getPayment = (paymentId) => http.get('/shop/payment/' + paymentId)

// 余额支付
export const balance = (orderId) => http.get('/shop/payment/balance/' + orderId)

// 支付宝支付
export const alipay = (orderId) => http.get('/shop/payment/mp-alipay/' + orderId)

export const alipayReLet = (data) => http.post('/shop/payment/mp-alipay-relet/', data)

export const test = (data) => http.post('/shop/payment/mp-alipay/test', data)

export const payQuery = (orderId) => http.get('/shop/payment/mp-alipay/query/' + orderId)

export const payQueryByRelet = (orderId) => http.get('/shop/payment/mp-alipay/query-relet/' + orderId)

export default {
	pagePayment,
	getPayment,
	alipay,
	alipayReLet,
	payQuery,
	payQueryByRelet,
	balance,
	test
}
