Open Closed

Error from ABP commercial payments module stripe webhook callback handling bug #4386


User avatar
0
kirotech created
  • ABP Framework version: v7.0.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
`2023-01-19 18:38:22.315 +02:00 [INF] Executing endpoint 'Volo.Payment.Requests.PaymentRequestController.HandleWebhookAsync (Volo.Payment.HttpApi)'
2023-01-19 18:38:22.320 +02:00 [INF] Route matched with {area = "payment", action = "HandleWebhook", controller = "PaymentRequest", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[System.Boolean] HandleWebhookAsync(System.String, System.String, System.Collections.Generic.Dictionary`2[System.String,System.String]) on controller Volo.Payment.Requests.PaymentRequestController (Volo.Payment.HttpApi).
2023-01-19 18:38:22.362 +02:00 [ERR] ---------- RemoteServiceErrorInfo ----------
{
  "code": null,
  "message": "An internal error occurred during your request!",
  "details": null,
  "data": {},
  "validationErrors": null
}

2023-01-19 18:38:22.363 +02:00 [ERR] The signature for the webhook is not present in the Stripe-Signature header.
Stripe.StripeException: The signature for the webhook is not present in the Stripe-Signature header.
   at Stripe.EventUtility.ValidateSignature(String json, String stripeSignatureHeader, String secret, Int64 tolerance, Int64 utcNow)
   at Stripe.EventUtility.ConstructEvent(String json, String stripeSignatureHeader, String secret, Int64 tolerance, Int64 utcNow, Boolean throwOnApiVersionMismatch)
   at Stripe.EventUtility.ConstructEvent(String json, String stripeSignatureHeader, String secret, Int64 tolerance, Boolean throwOnApiVersionMismatch)
   at Volo.Payment.Stripe.StripePaymentGateway.HandleWebhookAsync(String payload, Dictionary`2 headers)
   at Volo.Payment.Requests.PaymentRequestAppService.HandleWebhookAsync(String paymentGateway, String payload, Dictionary`2 headers)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
   at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
   at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)
   at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
   at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
   at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at lambda_method5116(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
2023-01-19 18:38:22.372 +02:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'.
2023-01-19 18:38:22.376 +02:00 [INF] Executed action Volo.Payment.Requests.PaymentRequestController.HandleWebhookAsync (Volo.Payment.HttpApi) in 56.2772ms
2023-01-19 18:38:22.376 +02:00 [INF] Executed endpoint 'Volo.Payment.Requests.PaymentRequestController.HandleWebhookAsync (Volo.Payment.HttpApi)'
2023-01-19 18:38:22.389 +02:00 [DBG] Added 0 entity changes to the current audit log
2023-01-19 18:38:22.390 +02:00 [DBG] Added 0 entity changes to the current audit log
2023-01-19 18:38:22.391 +02:00 [INF] Request finished HTTP/1.1 POST https://localhost:44339/api/payment/stripe/webhook application/json;+charset=utf-8 2759 - 500 - application/json;+charset=utf-8 78.1126ms
2023-01-19 18:38:22.544 +02:00 [DBG] Executing HealthCheck collector HostedService.`
  • Steps to reproduce the issue:"
  • generate new mvc solution using suite
  • install payments module
  • add stripe settings
  • run stripe cli events listen " ./stripe.exe listen --forward-to https://localhost:44339/api/payment/stripe/webhook --events checkout.session.completed --skip-verify --log-level=debug"
  • make a payment and wait for webhook call forward
  • ABP commercial payment webhook api responds with 500 error
    • 2023-01-19 18:38:22.363 +02:00 [ERR] The signature for the webhook is not present in the Stripe-Signature header. Stripe.StripeException: The signature for the webhook is not present in the Stripe-Signature header.

Question Is this a bug or stripe testing cli doesn't work with payments module? Or we do something wrong? Or we have work around for this? We need solution to move forward with stripe payments and this blocks us from progress.


10 Answer(s)
  • User Avatar
    0
    kirotech created

    Any update?

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, sorry for the late response. Can you check some points mentioned in this issue comment? Because it seems like a configuration issue to me.

    If the issue comment doesn't help you, please check the stripe cli's secret same within the stripe dashboard or not.

  • User Avatar
    0
    kirotech created

    We already checked that same comment before posting this support request. It is not relevant. It does not look like configuration issue for us.

    Could you please check it and fix bug or provide the solution?

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    We already checked that same comment before posting this support request. It is not relevant. It does not look like configuration issue for us.

    Could you please check it and fix bug or provide the solution?

    Sure, I'll try to reproduce the problem and if it's a bug will create an issue and fix it. I'll inform you during the day.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    I reproduced and fixed the problem. It will be available in the next patch version.

    I've also refunded your ticket. Best regards.

  • User Avatar
    0
    kirotech created

    Thank you very much. Do you know when this fix is available in some stable release?

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Thank you very much. Do you know when this fix is available in some stable release?

    Hi, sorry I can't give you an exact date (as you know deadlines are pretty changeable :)) but I can say we are planning to release a stable version soon.

  • User Avatar
    0
    kirotech created

  • User Avatar
    0
    kirotech created

    Hello one more question. Do you know which release version this will get in?

    https://github.com/abpframework/abp/milestones

    As I understand this fix will come with 7.1 release?

    You now going to release 7.0.2 sooner?

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hello one more question. Do you know which release version this will get in?

    https://github.com/abpframework/abp/milestones

    As I understand this fix will come with 7.1 release?

    You now going to release 7.0.2 sooner?

    We are considering releasing both 7.1 and 7.0.2 versions. This fix will be included in them both. (we will probably release 7.1, next week)

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