Issue:
Bug: [BUG] Fixing 3DS payment failure in headless mode



### Bug Description

3DS payments were failing in the refund test in Cypress headless mode. I added the timeout and properly configured the hooks to fetch the redirection URL correctly.

### Expected Behavior

It should pass in headless mode 

### Actual Behavior

Its failing in headless mode

### Steps To Reproduce

Provide an unambiguous set of steps to reproduce this bug. Include code or configuration to reproduce, if relevant.
1. Run the cypress test in headless using the below command
CYPRESS_CONNECTOR='connector_name' npm run cypress:ci                          


### Context For The Bug

_No response_

### Environment

In sandbox


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

- [X] I checked and didn't find a similar issue

### Have you read the Contributing Guidelines?

- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)

### Are you willing to submit a PR?

Yes, I am willing to submit a PR!

Pull request description:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [x] CI/CD

## Description
3DS payments were failing in the refund test in Cypress headless mode. I added the timeout and properly configured the hooks to fetch the redirection URL correctly.


## Motivation and Context
To ensure the test runs successfully without any failures in the CI/CD pipeline.

## How did you test it?
 Tested locally in the headless mode
 
 Stripe
 
<img width="843" alt="Screenshot 2024-05-29 at 1 41 57 PM" src="https://github.com/juspay/hyperswitch/assets/118818938/b5737099-bf5c-4408-b598-77185c257411">

Cybersource
<img width="898" alt="Screenshot 2024-05-29 at 2 45 53 PM" src="https://github.com/juspay/hyperswitch/assets/118818938/63c7be7b-9b12-4312-8b55-26aa53fde86d">

NMI
<img width="807" alt="Screenshot 2024-05-29 at 3 09 28 PM" src="https://github.com/juspay/hyperswitch/assets/118818938/496d2212-0ceb-4fd8-8584-b507907f2521">

Adyen

<img width="852" alt="Screenshot 2024-05-29 at 3 17 36 PM" src="https://github.com/juspay/hyperswitch/assets/118818938/07722a6d-b771-4585-b618-944423c8c15b">



## Checklist
<!-- Put an `x` in the boxes that apply -->

- [ ] I formatted the code `cargo +nightly fmt --all`
- [ ] I addressed lints thrown by `cargo clippy`
- [ ] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible



Testing:
 Tested locally in the headless mode
 
 Stripe
 
<img width="843" alt="Screenshot 2024-05-29 at 1 41 57 PM" src="https://github.com/juspay/hyperswitch/assets/118818938/b5737099-bf5c-4408-b598-77185c257411">

Cybersource
<img width="898" alt="Screenshot 2024-05-29 at 2 45 53 PM" src="https://github.com/juspay/hyperswitch/assets/118818938/63c7be7b-9b12-4312-8b55-26aa53fde86d">

NMI
<img width="807" alt="Screenshot 2024-05-29 at 3 09 28 PM" src="https://github.com/juspay/hyperswitch/assets/118818938/496d2212-0ceb-4fd8-8584-b507907f2521">

Adyen

<img width="852" alt="Screenshot 2024-05-29 at 3 17 36 PM" src="https://github.com/juspay/hyperswitch/assets/118818938/07722a6d-b771-4585-b618-944423c8c15b">

Patch: