【发布时间】:2019-04-07 07:21:31
【问题描述】:
我正在将此库用于孟加拉国支付网关。https://github.com/Rahim373/Arts.SslCommerze .但是控制器中的代码等待iis无限时间。如果响应正确地从服务器到达我的机器,我检查了提琴手。它正在到达。但是异步函数没有执行。 我的代码是:
public ActionResult About()
{
string customerName = "Fahim Abrar";
string customerEmail = "fahimabrar13@gmail.com";
string customerPhone = "+8801853912845";
string transactionId = "45c2ffc4d";
string successUrl = "http://fahimabrar.com";
string failUrl = "http://fahimabrar.com";
string cancelUrl = "cancelUrl";
decimal amount = 50;
Customer customer = new Customer(customerName, customerEmail,
customerPhone);
EmiTransaction emiTransaction = new
EmiTransaction(isEmiEnabled: false);
Trasnaction trasnaction = new Trasnaction(amount,
transactionId, successUrl, failUrl,
cancelUrl, emiTransaction, customer);
SslRequest.GetSessionAsync(trasnaction).ConfigureAwait(continueOnCapturedContext: false);
var session = SslRequest.GetSessionAsync(trasnaction).Result;
string s = session.FailedReason;
ViewBag.Message = s;
//"Your application description page.";
return View();
}
这里 var session = SslRequest.GetSessionAsync(trasnaction).Result; 此行导致死锁。
【问题讨论】:
标签: asp.net asp.net-mvc async-await payment-gateway