0

我只想从控制器调用简单的方法,但在调用时,我得到 ERR_CONNECTION_RESET。因为我现在这个错误是针对服务的,但我没有针对这个控制器或方法的任何服务!我这样称呼类:

http://localhost:44302/ReturnBank/Verify?trans_id=b53e8b82-a849-4188-951a-bc7f060422cd&order_id=22&amount=5000&np_status=Unsuccess

类的示例代码是:

public class ReturnBankController : TimeSheetControllerBase
{
    private readonly SazPayPaymentGatewayConfiguration _SazPayConfiguration;
    
    public ReturnBankController(
        SazPayPaymentGatewayConfiguration SazPayConfiguration)
    {
        _SazPayConfiguration = SazPayConfiguration;
    }

    public async Task<ActionResult> Verify(string trans_id, int order_id, int amount, string np_status)
    {
        if(np_status == "Unsuccess")
        {
            return View("../SazPay/PaymentCancel");
        }
        var SuccessUrl = _webUrlService.GetSiteRootAddress().EnsureEndsWith('/') + "Payment/paymentcompleted";
        var ErrorUrl = _webUrlService.GetSiteRootAddress().EnsureEndsWith('/') + "Payment/PaymentFailed";

        var inp = new SazPayConfirmPaymentInput
        {
            Order_id = order_id,
            Amount = amount,
            Trans_id = trans_id
        };

        var confirmTuple = await _SazPayPaymentAppService.ConfirmPayment(inp);


        if (confirmTuple.Item1)
        {
            Response.Redirect(SuccessUrl);
        }
        else
        {
            Response.Redirect(ErrorUrl);
        }
        return null;
    }

PS:我认为 abp 或 aspnetzero 神奇地将我的控制器/动作转换为服务!!!我想为一个控制器或操作停止此操作。

4

1 回答 1

0

对于期货:我找到了答案!经过一天的努力,我发现错误的 URL 是问题所在。我调用了 HTTP,但正确的是 HTTPS。

那是问题:(

于 2021-11-12T06:14:52.853 回答