juspay / juspay/hyperswitch

fix(router): Remove un-needed validation in finish-redirection (v2)

Open
#8,352 0 comments 0 reactions 1 assignee Claimed by @AnuthaDev View on GitHub
api-v2 C-bug
Dominant language
Rust
Stars
43.7k
Forks
5.1k
Avg merge
2d 20h
Merged PRs (30d)
205

Description

`finish-redirection` is intermittently failing with this error:

```json
{
"error": {
"type": "invalid_request",
"message": "This Payment could not be PaymentRedirectSync because it has a status of succeeded. The expected state is requires_customer_action",
"code": "IR_14"
}
}
```

Seemingly due to a race condition with webhooks. Need to remove status validation in `PaymentRedirectSync` `call_payment_flow` as webhooks can mark payment as succeeded before `finish-redirection` is called

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.