Bug: [BUG] Give higher precedence to connector mandate id over network txn id for mandates



### Bug Description

Recurring mandate payments with Adyen fail with a payment method not found error.


### Expected Behavior

When doing recurring mandate payments with Adyen, the core should make the payment with the connector mandate id stored in the mandate object in DB.

### Actual Behavior

Currently, if a mandate has both an associated network transaction id and connector mandate id, the core picks the network transaction id for recurring mandate transactions. This is the case for Adyen.

### Steps To Reproduce

1. Create a Merchant Account and an Adyen MCA
2. Create a mandate payment
3. Try to do a recurring mandate payment

### Context For The Bug

_No response_

### Environment

Are you using hyperswitch hosted version? No

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?

- [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!
diff --git a/crates/router/src/connector/cybersource/transformers.rs b/crates/router/src/connector/cybersource/transformers.rs
index 2fd559680ea..fb80c0a1c48 100644
--- a/crates/router/src/connector/cybersource/transformers.rs
+++ b/crates/router/src/connector/cybersource/transformers.rs
@@ -508,8 +508,15 @@ impl
             .map_or(false, |future_usage| {
                 matches!(future_usage, FutureUsage::OffSession)
             })
-            && item.router_data.request.customer_acceptance.is_some()
-        {
+            && (item.router_data.request.customer_acceptance.is_some()
+                || item
+                    .router_data
+                    .request
+                    .setup_mandate_details
+                    .clone()
+                    .map_or(false, |mandate_details| {
+                        mandate_details.customer_acceptance.is_some()
+                    })) {
             (
                 Some(vec![CybersourceActionsList::TokenCreate]),
                 Some(vec![CybersourceActionsTokenType::PaymentInstrument]),
diff --git a/crates/router/src/core/payments/operations/payment_create.rs b/crates/router/src/core/payments/operations/payment_create.rs
index 6e185ea66d8..5efbee0bc6b 100644
--- a/crates/router/src/core/payments/operations/payment_create.rs
+++ b/crates/router/src/core/payments/operations/payment_create.rs
@@ -301,14 +301,6 @@ impl<F: Send + Clone, Ctx: PaymentMethodRetrieve>
                         mandate_obj.network_transaction_id,
                         mandate_obj.connector_mandate_ids,
                     ) {
-                        (Some(network_tx_id), _) => Ok(api_models::payments::MandateIds {
-                            mandate_id: Some(mandate_obj.mandate_id),
-                            mandate_reference_id: Some(
-                                api_models::payments::MandateReferenceId::NetworkMandateId(
-                                    network_tx_id,
-                                ),
-                            ),
-                        }),
                         (_, Some(connector_mandate_id)) => connector_mandate_id
                         .parse_value("ConnectorMandateId")
                         .change_context(errors::ApiErrorResponse::MandateNotFound)
@@ -324,6 +316,14 @@ impl<F: Send + Clone, Ctx: PaymentMethodRetrieve>
                                 ))
                             }
                          }),
+                        (Some(network_tx_id), _) => Ok(api_models::payments::MandateIds {
+                            mandate_id: Some(mandate_obj.mandate_id),
+                            mandate_reference_id: Some(
+                                api_models::payments::MandateReferenceId::NetworkMandateId(
+                                    network_tx_id,
+                                ),
+                            ),
+                        }),
                         (_, _) => Ok(api_models::payments::MandateIds {
                             mandate_id: Some(mandate_obj.mandate_id),
                             mandate_reference_id: None,

## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->
Currently in the core, for a recurring mandate payment, if the mandate has both a network transaction ID and a connector mandate ID associated with it, the core picks the network transaction ID for making the recurring payment. This causes mandate payments to fail since we don't yet have support for making recurring mandate payments using a network transaction ID.

### Additional Changes

- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables

<!--
Provide links to the files with corresponding changes.

Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->


## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.

If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->


## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
Recurring Mandate payment with Adyen

Initial Mandate Payment:
<img width="546" alt="image" src="https://github.com/juspay/hyperswitch/assets/47862918/c9701cef-ca32-4428-bc6a-b91feb026e7c">


Recurring Mandate payment (Succeeding):
<img width="546" alt="image" src="https://github.com/juspay/hyperswitch/assets/47862918/6b75a147-7074-4ab0-b339-a11c66e64f68">


## Checklist
<!-- Put an `x` in the boxes that apply -->

- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
