juspay / hyperswitch

An open source payments switch written in Rust to make payments fast, reliable and affordable
https://hyperswitch.io/
Apache License 2.0
12.62k stars 1.36k forks source link

[BUG] Default fallback picks disabled stripe connector #6149

Open RaghavRox opened 1 month ago

RaghavRox commented 1 month ago

Bug Description

Default fallback picks disabled stripe connector even though there is another enabled stripe connector available in 2nd position.

We get the error {"error":{"type":"invalid_request","message":"The selected merchant connector account is disabled","code":"HE_03"}}

Expected Behavior

It should fall back to the stripe connector available in 2nd position, If first stripe connector is disabled

Actual Behavior

It picks the first stripe connector and complains that its disabled

Steps To Reproduce

Provide an unambiguous set of steps to reproduce this bug. Include code or configuration to reproduce, if relevant.

  1. Add 2 stripe connectors
  2. Disable the connector that is in 1st position in the default fallback list

Context For The Bug

No response

Environment

Are you using hyperswitch hosted version? Yes (Sandbox) If yes, please provide the value of the x-request-id response header to help us debug your issue. 019233a6-5df0-74b3-9892-5dc232ca1ae0

If not (or if building/running locally), please provide the following details:

  1. Operating System or Linux distribution:
  2. Rust version (output of rustc --version): ``
  3. App version (output of cargo r --features vergen -- --version): ``

Have you spent some time checking if this bug has been raised before?

Have you read the Contributing Guidelines?

Are you willing to submit a PR?

Yes, I am willing to submit a PR!

Narayanbhat166 commented 1 month ago

Hey @RaghavRox, I see that you have shown interest in submitting a fix for this. Let me know if you need any help with this. You can get any of your doubts related to default fallback clarified with @Aprabhat19