
/**
 * 手太欠
 * 愿这世界都如故事里一样 美好而动人~
 */

import { request } from '../index'

// 银联9.9商务支付
const ums = (applyNo, data) =>{
	return request({
		url		: 'pay/apply/' + applyNo + '/ums',
		data
	})
}

// 银联服务包支付
const umsOrder = (applyNo, data) =>{
	return request({
		url		: 'pay/order/' + applyNo + '/ums',
		data
	})
}

// 银联补差价支付
const umsDiff = (diffPriceId, data) =>{
	return request({
		url		: 'pay/diff/' + diffPriceId + '/ums',
		data
	})
}

// 查询支付结果
const umsState = (trade_id) => {
	return request({
		url		: 'payments/query/' + trade_id,
	}, false)
}

// 斗拱支付 - 咨询单
const dgPay = (orderId, data) => {
	return request({
		url		: 'pay/order/' + orderId + '/dg',
		data
	})
}

// 斗拱支付补差价 - 咨询单
const diffDgPay = (orderId, data) => {
	return request({
		url: 'pay/diff/' + orderId + '/dg',
		data
	})
}

// 斗拱支付 - 预约单
const umsDg = (applyNo, data) => {
	return request({
		url		: 'pay/apply/' + applyNo + '/dg',
		data
	})
}


// 综法订单支付 //
// 年费单--微信支付
const servicePay = (service_order_id, data) =>{
	return request({
		url: "pay/service_order/" + service_order_id + "/wechat",
		data: data
	})
}
// 年费单--银联商务
const serviceUms = (service_order_id, data) =>{
	return request({
		url		: 'pay/service_order/' + service_order_id + '/ums',
		data: data
	})
}
// 年费单--汇付斗拱支付
const serviceDg = (service_order_id, data) =>{
	return request({
		url		: 'pay/service_order/' + service_order_id + '/dg',
		data: data
	})
}

// 拓展单--微信支付
const expandPay = (expand_order_id, data) =>{
	return request({
		url: "pay/expand_order/" + expand_order_id + "/wechat",
		data: data
	})
}

// 拓展单--银联商务
const expandUms = (expand_order_id, data) =>{
	return request({
		url		: 'pay/expand_order/' + expand_order_id + '/ums',
		data: data
	})
}
// 拓展单--汇付斗拱支付
const expandDg = (expand_order_id, data) =>{
	return request({
		url		: 'pay/expand_order/' + expand_order_id + '/dg',
		data: data
	})
}

// 委托单--微信支付
const entrustPay = (entrust_order_id, data) =>{
	return request({
		url: "pay/entrust_order/" + entrust_order_id + "/wechat",
		data: data
	})
}

// 委托单--银联商务
const entrustUms = (entrust_order_id, data) =>{
	return request({
		url		: 'pay/entrust_order/' + entrust_order_id + '/ums',
		data: data
	})
}

// 委托单--汇付斗拱支付
const entrustDg = (entrust_order_id, data) =>{
	return request({
		url		: 'pay/entrust_order/' + entrust_order_id + '/dg',
		data: data
	})
}

// 综法订单差价--微信支付
const synDiffPay = (diff_price_id, data) =>{
	return request({
		url: "pay/diff_price/" + diff_price_id + "/wechat",
		data: data
	})
}
// 综法订单差价--三方支付
const synDiffUms = (diff_price_id, data) =>{
	return request({
		url: "pay/diff_price/" + diff_price_id + "/ums",
		data: data
	})
}
// 综法订单差价--汇付斗拱
const synDiffDg = (diff_price_id, data) =>{
	return request({
		url: "pay/diff_price/" + diff_price_id + "/dg",
		data: data
	})
}

// 公共收银台支付
const payInfo = data => {
	return request({
		url		: "pay/cashier_desk/info",
		method	: 'POST',
		data
	})
}

const payWechat = data => {
	return request({
		url		: "pay/cashier_desk/wechat",
		method	: 'POST',
		data
	})
}
const payUms = data => {
	return request({
		url		: "pay/cashier_desk/ums",
		method	: 'POST',
		data
	})
}
const payDg = data => {
	return request({
		url		: "pay/cashier_desk/dg",
		method	: 'POST',
		data
	})
}

export {
	ums,
	umsOrder,
	umsDiff,
	umsState,
	dgPay,
	diffDgPay,
	umsDg,
	
	// 综法
	servicePay,
	serviceUms,
	serviceDg,
	expandPay,
	expandUms,
	expandDg,
	entrustPay,
	entrustUms,
	entrustDg,
	synDiffPay,
	synDiffUms,
	synDiffDg,
	
	// 综合收银台
	payInfo,
	payWechat,
	payUms,
	payDg
}

