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,