Issue:
[FEATURE] Mandates for alternate payment methods via Stripe

### Feature Description

**Scope:**
Implementation of 
- [ ] Applepay recurring payments via Stripe connector
- [ ] Googlepay recurring payments via Stripe connector

### Possible Implementation

Recurring payments for Applepay and Googlepay needs to be built in a processor agnostic manner.
This means that if the first recurring payment is processed via processor A, the second recurring payment could be processed via processor B.

### Have you spent some time to check if this feature request has been raised before?

- [X] I checked and didn't find 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?

None

Resolution:
<think>
PR Context:
- Title: feat(connector): Mandates for alternate payment methods via Stripe
- Merged: 2023-05-08T14:03:55Z
- Files changed: 30 files
- Commits: 30 commits

Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [ ] New feature
- [X] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->
Closes #940  

### 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 co
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** feat(connector): Mandates for alternate payment methods via Stripe (#1041)
Co-authored-by: Manoj Gho
Files to modify:


**crates/api_models/src/payments.rs**
  Add:
    - struct: pub::ConnectorMandateReferenceId

**crates/router/src/configs/settings.rs**
  Add:
    - function: private::pm_type_deser
    - enum: pub::PaymentMethodTypeTokenFilter

**crates/router/src/connector/adyen/transformers.rs**
  Modify existing code

**crates/router/src/connector/globalpay/transformers.rs**
  Modify existing code

**crates/router/src/connector/multisafepay/transformers.rs**
  Modify existing code

**crates/router/src/connector/nexinets/transformers.rs**
  Modify existing code

**crates/router/src/connector/nuvei/transformers.rs**
  Modify existing code

**crates/router/src/connector/payeezy/transformers.rs**
  Modify existing code

**crates/router/src/connector/stripe.rs**
  Modify existing code

**crates/router/src/connector/stripe/transformers.rs**
  Add:
    - function: private::try_from
    - function: private::foreign_from
    - function: private::foreign_from
    - struct: pub::GooglePayToken
    - struct: pub::GooglepayPayment
    - struct: pub::LatestPaymentAttempt
    - enum: pub::LatestAttempt
    - impl: impl TryFrom<&payments::GooglePayWalletData> for StripePaymentMethodData
    - impl: impl ForeignFrom<(Option<StripePaymentMethodOptions>, String)> for types::MandateReference
    - impl: impl ForeignFrom<Option<LatestAttempt>> for Option<String>

**crates/router/src/connector/utils.rs**
  Add:
    - function: private::get_connector_mandate_id
    - trait: pub::MandateReferenceData
    - impl: impl MandateReferenceData for api_models::payments::ConnectorMandateReferenceId

**crates/router/src/core/errors/utils.rs**
  Modify existing code

**crates/router/src/core/mandate.rs**
  Modify existing code

**crates/router/src/core/payments.rs**
  Add:
    - function: private::is_payment_method_type_allowed_for_connector
    - mod: pub::customers
    - mod: pub::tokenization

**crates/router/src/core/payments/customers.rs**
  Add:
    - function: pub::create_connector_customer
    - function: pub::should_call_connector_create_customer
    - function: pub::update_connector_customer_in_customers

**crates/router/src/core/payments/flows/authorize_flow.rs**
  Remove:
    - function: private::save_in_locker
    - function: pub::create_payment_method_metadata
    - function: private::set_mandate_id
    - function: pub::update_connector_customer_in_customers
    - function: pub::should_call_connector_create_customer
    - function: pub::add_payment_method_token

**crates/router/src/core/payments/flows/verfiy_flow.rs**
  Add:
    - function: private::add_payment_method_token
    - function: private::create_connector_customer
    - function: private::try_from
    - function: private::try_from
    - impl: impl TryFrom<types::VerifyRequestData> for types::PaymentMethodTokenizationData

**crates/router/src/core/payments/helpers.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_create.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_update.rs**
  Modify existing code

**crates/router/src/core/payments/tokenization.rs**
  Add:
    - function: pub::save_payment_method
    - function: pub::save_in_locker
    - function: pub::create_payment_method_metadata
    - function: pub::add_payment_method_token

**crates/router/src/core/payments/transformers.rs**
  Modify existing code

**crates/router/src/types.rs**
  Add:
    - struct: pub::MandateReference

**crates/router/tests/connectors/main.rs**
  Add:
    - mod: private::stripe_ui

**crates/router/tests/connectors/nuvei_ui.rs**
  Modify existing code

**crates/router/tests/connectors/selenium.rs**
  Remove:
    - function: private::process_payment
  Add:
    - function: pub::get_browser

**crates/router/tests/connectors/stripe_ui.rs**
  Add:
    - function: private::should_make_stripe_3ds_payment
    - function: private::should_make_stripe_3ds_mandate_payment
    - function: private::should_fail_recurring_payment_due_to_authentication
    - function: private::should_make_stripe_3ds_mandate_with_zero_dollar_payment
    - function: private::should_make_stripe_gpay_payment
    - function: private::should_make_stripe_gpay_mandate_payment
    - function: private::should_make_stripe_3ds_payment_test
    - function: private::should_make_stripe_3ds_mandate_payment_test
    - function: private::should_fail_recurring_payment_due_to_authentication_test
    - function: private::should_make_stripe_3ds_mandate_with_zero_dollar_payment_test
    - function: private::should_make_stripe_gpay_payment_test
    - function: private::should_make_stripe_gpay_mandate_payment_test
    - struct: private::StripeSeleniumTest
    - impl: impl SeleniumTest for StripeSeleniumTest

**crates/storage_models/src/mandate.rs**
  Modify existing code

**crates/storage_models/src/schema.rs**
  Modify existing code