mirror of
https://github.com/dotnetcore/Util.git
synced 2026-10-25 17:09:48 +08:00
33 lines
903 B
C#
33 lines
903 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using Util.Biz.Payments.Core;
|
|
using Util.Biz.Payments.Factories;
|
|
using Util.Biz.Tests.Integration.Payments.Alipay;
|
|
using Util.Tools.QrCode;
|
|
|
|
namespace Util.Samples.Webs.Controllers {
|
|
public class HomeController : Controller {
|
|
|
|
public HomeController( ) {
|
|
}
|
|
|
|
public IActionResult Index() {
|
|
var factory = new PayFactory( new TestConfigProvider() );
|
|
var service = factory.CreatePayService( PayWay.AlipayF2FPay );
|
|
var result = service.Pay( new PayParam {
|
|
Money = 10,
|
|
OrderId = "a",
|
|
Subject = "测试"
|
|
} );
|
|
return Content( result.Result , "text/html;charset=gb2312" );
|
|
}
|
|
|
|
public IActionResult Error() {
|
|
return View();
|
|
}
|
|
|
|
public IActionResult A() {
|
|
return View();
|
|
}
|
|
}
|
|
}
|