Open Closed

Error when retrieving payment request in GatewaySelection #2368


User avatar
0
Spospisil created

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v4.4.4
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): Tiered/MVC with Identity Server Separated

My company purchased the commercial license giving us access to pro modules and their source code. In my MVC solution I have added the payment module (with solution source) and created a screen allowing me to enter a payment subscription details. The logic to create the payment request is working as expected however when I execute the 'LocalRedirectPreserveMethod("/Payment/GatewaySelection?paymentRequestId=" + paymentRequest.Id);' code (as instructed by ABP documentation) the 2nd line of code (the retrieval of the payment request created) gives the below error.

For some reason the Volo.Payment.Web project is not finding the PaymentRequestAppService application service and returns the error below. Calls to the GatewayAppService work though, so I'm not sure why the call to PaymentRequestAppService is failing.

One thing I noticed though is in the Volo.Payment.HttpApi project there is a controller class for Gateways and Plans but not for PaymentRequest (as shown below).

Please advise

2022-01-04 14:20:36.832 -05:00 [ERR] An unhandled exception has occurred while executing the request.
Volo.Abp.AbpException: Could not found remote action for method: System.Threading.Tasks.Task`1[Volo.Payment.Requests.PaymentRequestWithDetailsDto] GetAsync(System.Guid) on the URL: https://localhost:44300/ at Volo.Abp.Http.Client.DynamicProxying.ApiDescriptionFinder.FindActionAsync(HttpClient client, String baseUrl, Type serviceType, MethodInfo method) in C:\Src\StructureWeb\ABP\framework\src\Volo.Abp.Http.Client\Volo\Abp\Http\Client\DynamicProxying\ApiDescriptionFinder.cs:line 81 at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.MakeRequestAsync(IAbpMethodInvocation invocation) in C:\Src\StructureWeb\ABP\framework\src\Volo.Abp.Http.Client\Volo\Abp\Http\Client\DynamicProxying\DynamicHttpProxyInterceptor.cs:line 145
at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.MakeRequestAndGetResultAsync[T](IAbpMethodInvocation invocation) in C:\Src\StructureWeb\ABP\framework\src\Volo.Abp.Http.Client\Volo\Abp\Http\Client\DynamicProxying\DynamicHttpProxyInterceptor.cs:line 108 at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.GetResultAsync(Task task, Type resultType) in C:\Src\StructureWeb\ABP\framework\src\Volo.Abp.Http.Client\Volo\Abp\Http\Client\DynamicProxying\DynamicHttpProxyInterceptor.cs:line 99
at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.InterceptAsync(IAbpMethodInvocation invocation) in C:\Src\StructureWeb\ABP\framework\src\Volo.Abp.Http.Client\Volo\Abp\Http\Client\DynamicProxying\DynamicHttpProxyInterceptor.cs:line 90 at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) in C:\Src\StructureWeb\ABP\framework\src\Volo.Abp.Castle.Core\Volo\Abp\Castle\DynamicProxy\CastleAsyncAbpInterceptorAdapter.cs:line 29 at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() in C:\Src\StructureWeb\ABP\framework\src\Volo.Abp.Castle.Core\Volo\Abp\Castle\DynamicProxy\CastleAbpMethodInvocationAdapterWithReturnValue.cs:line 24
at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) in C:\Src\StructureWeb\ABP\framework\src\Volo.Abp.Validation\Volo\Abp\Validation\ValidationInterceptor.cs:line 19
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) in C:\Src\StructureWeb\ABP\framework\src\Volo.Abp.Castle.Core\Volo\Abp\Castle\DynamicProxy\CastleAsyncAbpInterceptorAdapter.cs:line 29
at Volo.Payment.Pages.Payment.GatewaySelectionModel.OnPostAsync() in C:\Src\StructureWeb\ABP-Pro-Modules\payment\src\Volo.Payment.Web\Pages\Payment\GatewaySelection.cshtml.cs:line 43
at Microsoft\.AspNetCore\.Mvc\.RazorPages\.Infrastructure\.ExecutorFactory\.GenericTaskHandlerMethod\.Convert\[T\]\(Object taskAsObject\)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync()
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync()
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync()
at Microsoft\.AspNetCore\.Mvc\.Infrastructure\.ResourceInvoker\.g\_\_Awaited\|25\_0\(ResourceInvoker invoker\, Task lastTask\, State next\, Scope scope\, Object state\, Boolean isCompleted\)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ExceptionContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeNextResourceFilter()
\-\-\- End of stack trace from previous location \-\-\-
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
\-\-\- End of stack trace from previous location \-\-\-
at Microsoft\.AspNetCore\.Mvc\.Infrastructure\.ResourceInvoker\.g\_\_Logged\|17\_1\(ResourceInvoker invoker\)
at Microsoft\.AspNetCore\.Routing\.EndpointMiddleware\.g\_\_AwaitRequestTask\|6\_0\(Endpoint endpoint\, Task requestTask\, ILogger logger\)
at Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) in C:\Src\StructureWeb\ABP\framework\src\Volo.Abp.AspNetCore.Serilog\Volo\Abp\AspNetCore\Serilog\AbpSerilogMiddleware.cs:line 65
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c\_\_DisplayClass6\_1.<b\_\_1>d.MoveNext()
\-\-\- End of stack trace from previous location \-\-\-
at Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) in C:\Src\StructureWeb\ABP\framework\src\Volo.Abp.AspNetCore\Volo\Abp\AspNetCore\Auditing\AbpAuditingMiddleware.cs:line 52
at Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) in C:\Src\StructureWeb\ABP\framework\src\Volo.Abp.AspNetCore\Volo\Abp\AspNetCore\Auditing\AbpAuditingMiddleware.cs:line 81
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c\_\_DisplayClass6\_1.<b\_\_1>d.MoveNext()
\-\-\- End of stack trace from previous location \-\-\-
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) in C:\Src\StructureWeb\ABP\framework\src\Volo.Abp.AspNetCore.MultiTenancy\Volo\Abp\AspNetCore\MultiTenancy\MultiTenancyMiddleware.cs:line 75
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c\_\_DisplayClass6\_1.<b\_\_1>d.MoveNext()
\-\-\- End of stack trace from previous location \-\-\-
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) in C:\Src\StructureWeb\ABP\framework\src\Volo.Abp.AspNetCore\Microsoft\AspNetCore\RequestLocalization\AbpRequestLocalizationMiddleware.cs:line 51
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c\_\_DisplayClass6\_1.<b\_\_1>d.MoveNext()
\-\-\- End of stack trace from previous location \-\-\-
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
2022-01-04 14:20:36.878 -05:00 [INF] Request finished HTTP/2 POST [https://localhost:44302/Payment/GatewaySelection?paymentRequestId=3a0138b5-a9c5-df43-ba8b-98a7d26f13d1](https://localhost:44302/Payment/GatewaySelection?paymentRequestId=3a0138b5-a9c5-df43-ba8b-98a7d26f13d1) application/x-[www-form-urlencoded 225](http://www-form-urlencoded 225) \- 500 \- text/html;\+charset=utf\-8 18864\.4439ms

16 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Could not found remote action for method: System.Threading.Tasks.Task`1[Volo.Payment.Requests.PaymentRequestWithDetailsDto] GetAsync(System.Guid) on the URL: https://localhost:44300/

    Are you reference the Volo.Payment.HttpApi to your HttpApi project(https://localhost:44300/)? Because you are using the TIERED project.

  • User Avatar
    0
    Spospisil created

    Hi,

    You're answer was misleading since the HttpApi project in my solution is not the https://localhost:44300 project but rather is the 'HttpApi.Host' project.

    However, to answer your question, yes, I have a reference to Volo.Payment.HttpApiin my HttpApi project as shown below.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    I have a reference to Volo.Payment.HttpApiin my HttpApi project as shown below.

    Have you depended on the module?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Also, check out this endpoint.

    HttpApi.Host https://localhost/api/abp/api-definition

    It should have the Payment module APIs.

  • User Avatar
    0
    Spospisil created

    I have a reference to Volo.Payment.HttpApiin my HttpApi project as shown below.

    Have you depended on the module?

    Yes, I do. See below

  • User Avatar
    0
    Spospisil created

    Also, check out this endpoint.

    HttpApi.Host https://localhost/api/abp/api-definition

    It should have the Payment module APIs.

    The only payment modules this api-definition endpoint details out are the Payment.Admin API's

  • User Avatar
    0
    Spospisil created

    Here are the Payment API's listed from using the api-definition endpoint

  • User Avatar
    0
    Spospisil created

    I'll also remind you that there is no 'controller' defined in the Volo.Payment.HttpApi project for the payment requests as there are for the Gateway and Plans as I mentioned above.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can I check it remotely?

    https://zoom.us/j/98618053695?pwd=THZyM1NTdkoxME1HWGx1L05sTEJaUT09

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The IPaymentRequestAdminAppService is added in payment module v5.0 and your ABP Framework version is v4.4.4.

  • User Avatar
    0
    Spospisil created

    So your suggestion is to upgrade to v5.0 in order to fix this issue? Let me remind you that it's the IPaymentRequestAppService not the IPaymentRequestAdminAppService that seems to be the issue.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The 5.0 is using the static proxy. The structure of the project has also changed. It may not be compatible with the old version. You can consider to download the source code of 4.4.4 or upgrade to 5.0.

    https://github.com/abpframework/abp/pull/9905

  • User Avatar
    0
    Spospisil created

    Hi,

    Well to test out if ABP 5.0.1 would solve my problem, I tried generating a MVC/Tiered solution using ABP suite and then adding the Payment Module (as a package) to the generated solution and then tried creating a recurring payment and get essentially the same issue with the injection of the IPaymentRequestAppService interface. See link below.

    At this point the Payment Module does not work with a tiered solution either with ABP 4.4.4 and 5.0.1, so I'll need this resolved pretty quickly.

    Please advise.

    https://support.abp.io/QA/Questions/2373/Payment-ModuleRecurring-Payment-Not-Working

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    We will check the new question.

  • User Avatar
    0
    Spospisil created

    hi

    The 5.0 is using the static proxy. The structure of the project has also changed. It may not be compatible with the old version. You can consider to download the source code of 4.4.4 or upgrade to 5.0.

    https://github.com/abpframework/abp/pull/9905

    My main solution is all version ABP 4.4.4. I do not want to upgrade to 5.0 (at this point) to resolve this issue. Are you saying the ABP 4.4.4 Payment Module does not work for an MVC/Tiered application?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I sent the latest source code of the payment module, It can be worked in v5.0. for package reference, we will release the 5.0.2.

    My main solution is all version ABP 4.4.4.

    in this way, You can't use the payment module that version 5.0.

    Are you saying the ABP 4.4.4 Payment Module does not work for an MVC/Tiered application?

    You can download v4.4.4 source code the payment module and add it to your solution.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11