Skip to content

Commit

Permalink
[WeChatPay.V3] 修正H5支付 缺失 h5_info(H5场景信息)
Browse files Browse the repository at this point in the history
  • Loading branch information
Roc committed Jun 7, 2021
1 parent f215ab1 commit a7b4f1c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public async Task<IActionResult> H5Pay(WeChatPayH5PayV3ViewModel viewModel)
Description = viewModel.Description,
NotifyUrl = viewModel.NotifyUrl,
OutTradeNo = viewModel.OutTradeNo,
SceneInfo = new SceneInfo { PayerClientIp = "127.0.0.1" }
SceneInfo = new SceneInfo { PayerClientIp = "127.0.0.1", H5Info = new H5Info { Type = "Wap" } }
};

var request = new WeChatPayTransactionsH5Request();
Expand Down
2 changes: 1 addition & 1 deletion src/Essensoft.Paylink.WeChatPay/V3/Domain/H5Info.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class H5Info : WeChatPayObject
/// <para>示例值:iOS</para>
/// </remarks>
[JsonPropertyName("type")]
public int Type { get; set; }
public string Type { get; set; }

/// <summary>
/// 应用名称
Expand Down
9 changes: 9 additions & 0 deletions src/Essensoft.Paylink.WeChatPay/V3/Domain/SceneInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,14 @@ public class SceneInfo : WeChatPayObject
/// </remarks>
[JsonPropertyName("store_info")]
public StoreInfo StoreInfo { get; set; }

/// <summary>
/// H5场景信息
/// </summary>
/// <remarks>
/// H5场景信息
/// </remarks>
[JsonPropertyName("h5_info")]
public H5Info H5Info { get; set; }
}
}

0 comments on commit a7b4f1c

Please sign in to comment.