payPartner
This commit is contained in:
		
							parent
							
								
									174050c281
								
							
						
					
					
						commit
						419f0b3579
					
				
							
								
								
									
										11
									
								
								unify/pay.go
								
								
								
								
							
							
						
						
									
										11
									
								
								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,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue