Skip to content

Commit

Permalink
解决部分API签名出错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Roc committed Aug 6, 2018
1 parent 582d169 commit 1f3bcc3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Essensoft.AspNetCore.Payment.Alipay/AlipayClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -479,10 +479,13 @@ private AlipayDictionary BuildRequestParams<T>(IAlipayRequest<T> request, string
#endregion

#region Model Serialize

static readonly JsonSerializerSettings jsonSerializerSettings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
private string Serialize(AlipayObject bizModel)
{
return JsonConvert.SerializeObject(bizModel, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore });
return bizModel == null ? string.Empty : JsonConvert.SerializeObject(bizModel, jsonSerializerSettings);
}

#endregion
}
}

0 comments on commit 1f3bcc3

Please sign in to comment.