我意识到ASP.NET Core不再具有HttpResponseMessage并且我需要返回类似
的内容 public IActionResult Blah()
{
return Ok(
myservice.function()
);
}
但是我正在尝试整合Braintree付款和我拥有以下代码:
var request = new TransactionRequest
{
Amount = model.ChargeAmount,
PaymentMethodNonce = model.Nonce,
Options = new TransactionOptionsRequest
{
SubmitForSettlement = true
}
};
Result<Transaction> result = gateway.Transaction.Sale(request);
HttpResponseMessage response = Request.CreateResponse(result);
return response;
如何将此转换为可与.net core 2.0一起使用的内容?