shaoguo 3 weeks ago
parent
commit
2927eaa13f
1 changed files with 21 additions and 2 deletions
  1. 21 2
      services/payments/h5/models.go

+ 21 - 2
services/payments/h5/models.go

@@ -181,7 +181,7 @@ func (o Detail) MarshalJSON() ([]byte, error) {
 	}
 
 	if o.ReceiptId != nil {
-		toSerialize["invoice_id"] = o.ReceiptId
+		toSerialize["receipt_id"] = o.ReceiptId
 	}
 
 	if o.GoodsDetail != nil {
@@ -252,7 +252,7 @@ func (o GoodsDetail) MarshalJSON() ([]byte, error) {
 	if o.GoodsId == nil {
 		return nil, fmt.Errorf("field `MerchantGoodsId` is required and must be specified in GoodsDetail")
 	}
-	toSerialize["merchant_goods_id"] = o.GoodsId
+	toSerialize["goods_id"] = o.GoodsId
 
 	if o.WechatpayGoodsId != nil {
 		toSerialize["wechatpay_goods_id"] = o.WechatpayGoodsId
@@ -541,6 +541,10 @@ func (o PrepayRequest) MarshalJSON() ([]byte, error) {
 		return nil, fmt.Errorf("field `SceneInfo` is required and must be specified in PrepayRequest")
 	}
 	toSerialize["scene_info"] = o.SceneInfo
+	if o.MerchantCategoryCode==nil{
+		return nil, fmt.Errorf("field `MerchantCategoryCode` is required and must be specified in PrepayRequest")
+	}
+	toSerialize["merchant_category_code"] = o.MerchantCategoryCode
 
 	return json.Marshal(toSerialize)
 }
@@ -603,12 +607,18 @@ func (o PrepayRequest) String() string {
 		ret += fmt.Sprintf("SupportFapiao:%v, ", *o.SupportFapiao)
 	}
 
+	if o.MerchantCategoryCode  == nil {
+		ret += "MerchantCategoryCode:<nil>, "
+	} else {
+		ret += fmt.Sprintf("MerchantCategoryCode:%v, ", *o.MerchantCategoryCode)
+	}
 	ret += fmt.Sprintf("Amount:%v, ", o.Amount)
 
 	ret += fmt.Sprintf("Detail:%v, ", o.Detail)
 
 	ret += fmt.Sprintf("SceneInfo:%v, ", o.SceneInfo)
 
+
 	return fmt.Sprintf("PrepayRequest{%s}", ret)
 }
 
@@ -679,6 +689,11 @@ func (o PrepayRequest) Clone() *PrepayRequest {
 		ret.SceneInfo = o.SceneInfo.Clone()
 	}
 
+	if o.MerchantCategoryCode != nil {
+		ret.MerchantCategoryCode = new(string)
+		*ret.MerchantCategoryCode = *o.MerchantCategoryCode
+	}
+
 
 	return &ret
 }
@@ -854,6 +869,10 @@ func (o SceneInfo) MarshalJSON() ([]byte, error) {
 		toSerialize["device_id"] = o.DeviceId
 	}
 
+	if o.DeviceIp != nil {
+		toSerialize["device_ip"] = o.DeviceIp
+	}
+
 	if o.StoreInfo != nil {
 		toSerialize["store_info"] = o.StoreInfo
 	}