payPartner

This commit is contained in:
jiangyong27 2024-10-27 20:43:20 +08:00
parent 174050c281
commit 419f0b3579
1 changed files with 3 additions and 8 deletions

View File

@ -54,14 +54,9 @@ func (p *Pay) CreateOrder(order *CreateOrderReq) (map[string]interface{}, error)
return rsp.Data, nil return rsp.Data, nil
} }
func (p *Pay) CreatePartnerOrder(order *CreateOrderReq) (map[string]interface{}, error) { func (p *Pay) CreatePartnerOrder(params map[string]interface{}) (map[string]interface{}, error) {
if order.PayType == "" {
errors.New("payType is nil") reqBody, _ := json.Marshal(params)
}
if order.PayPrice <= 0 {
return nil, errors.New("payPrice is nil")
}
reqBody, _ := json.Marshal(order)
result, err := util.HttpPostJson(p.address+"/api/pay/partner/order", map[string]string{ result, err := util.HttpPostJson(p.address+"/api/pay/partner/order", map[string]string{
"x-token": p.token, "x-token": p.token,