import request from '@/sheep/request';

const PayOrderApi = {
  // 获得支付订单
  getOrder: (id) => {
    return request({
      url: '/pay/order/get',
      method: 'GET',
      params: { id }
    });
  },
  // 获得支付后的订单条件
  getByStatus: (id) => {
    return request({
      url: '/pay/order/getByStatus',
      method: 'GET',
      params: { id }
    });
  },
  getPayOrder: (tradeOrderId) => {
    return request({
      url: '/trade/order/getPayOrder',
      method: 'GET',
      params: { tradeOrderId }
    });
  },
  // 提交支付订单
  submitOrder: (data) => {
    return request({
      url: '/pay/order/submit',
      method: 'POST',
      data
    });
  }
};

export default PayOrderApi;
