feat: 完成支付宝接入
This commit is contained in:
@@ -85,27 +85,6 @@ namespace Yi.Framework.AiHub.Domain
|
||||
|
||||
public override async Task OnApplicationInitializationAsync(ApplicationInitializationContext context)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 2. 发起API调用(以创建当面付收款二维码为例)
|
||||
var response = Factory.Payment.Page()
|
||||
.Pay("YiXin Ai Vip", "2234567234891", "0.01","https://ccnetcore.com/pay/Alipay/test");
|
||||
// 3. 处理响应或异常
|
||||
if (ResponseChecker.Success(response))
|
||||
{
|
||||
Console.WriteLine("调用成功");
|
||||
Console.WriteLine(response.Body);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("调用失败,原因:" + response.Body);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("调用遭遇异常,原因:" + ex.Message);
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user