From 419f0b35798d453e0f167135a97098aec7d88812 Mon Sep 17 00:00:00 2001 From: jiangyong27 Date: Sun, 27 Oct 2024 20:43:20 +0800 Subject: [PATCH] payPartner --- unify/pay.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/unify/pay.go b/unify/pay.go index bc909a4..0817a1f 100644 --- a/unify/pay.go +++ b/unify/pay.go @@ -54,14 +54,9 @@ func (p *Pay) CreateOrder(order *CreateOrderReq) (map[string]interface{}, error) return rsp.Data, nil } -func (p *Pay) CreatePartnerOrder(order *CreateOrderReq) (map[string]interface{}, error) { - if order.PayType == "" { - errors.New("payType is nil") - } - if order.PayPrice <= 0 { - return nil, errors.New("payPrice is nil") - } - reqBody, _ := json.Marshal(order) +func (p *Pay) CreatePartnerOrder(params map[string]interface{}) (map[string]interface{}, error) { + + reqBody, _ := json.Marshal(params) result, err := util.HttpPostJson(p.address+"/api/pay/partner/order", map[string]string{ "x-token": p.token,