chore(tenpayv3): 新增基于 .NET Framework 4.7 的示例项目

This commit is contained in:
Fu Diwei
2021-12-28 14:05:39 +08:00
parent b2ce287136
commit 2dcfcab262
58 changed files with 1114 additions and 204 deletions

View File

@@ -1,19 +1,16 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using SKIT.FlurlHttpClient.Wechat.TenpayV3;
using SKIT.FlurlHttpClient.Wechat.TenpayV3.Models;
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Sample_Net5.Controllers
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Sample.Controllers
{
using SKIT.FlurlHttpClient.Wechat.TenpayV3;
using SKIT.FlurlHttpClient.Wechat.TenpayV3.Models;
[ApiController]
[Route("order")]
[Route("api/order")]
public class TenpayOrderController : ControllerBase
{
private readonly ILogger _logger;
@@ -34,9 +31,6 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Sample_Net5.Controllers
[Route("jsapi")]
public async Task<IActionResult> CreateOrderByJsapi([FromBody] Models.CreateOrderByJsapiRequest requestModel)
{
// JSAPI 下单
// 文档https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_1.shtml
var client = _tenpayHttpClientFactory.Create(requestModel.MerchantId);
var request = new CreatePayTransactionJsapiRequest()
{