import service from '@/utils/request'

export const getPaymentConfigs = () => service({ url: '/payment/configs', method: 'get' })

export const savePaymentConfig = (data) => service({
  url: '/payment/config',
  method: 'post',
  data
})

export const getPaymentOrders = (params) => service({
  url: '/payment/orders',
  method: 'get',
  params
})

export const getPaymentOrder = (data) => service({
  url: '/payment/order',
  method: 'post',
  data
})

export const queryPaymentOrder = (data) => service({
  url: '/payment/query',
  method: 'post',
  data
})

export const refundPaymentOrder = (data) => service({
  url: '/payment/refund',
  method: 'post',
  data
})
