Skip to content

[FEATURE] connector's sandbox testing via magic values #7837

@kashif-m

Description

@kashif-m

Feature Description

Connectors provide sending magic values for certain fields in their API requests. These values can be used to simulate different error scenarios. For most of the cases across all the connectors, these can be set in the already present fields.

For a few cases, extra fields are needed to be passed to the connector (eg: payment method holder name for MIT payments for Adyen). For such cases, the fields are not necessary in the real environment but necessary for simulating certain scenarios.

This feature allows the end merchants to simulate different scenarios in the sandbox environment.

Possible Implementation

There are two parts to this for the implementation

  1. Provision sending these fields by the merchant in the payments API request (structured metadata)
  2. Consume these fields on a connector to connector basis as per the requirement

Step 1

  • Expose a field in connector_metadata for Adyen
  • With below fields for now
    • holder_name: Option

Sample body in the payments request

{
   ...
    "connector_metadata": {
        "adyen": {
            "testing": {
                "holder_name": "CARD_EXPIRED"
            }
        }
    }
   ...
}

Step 2

  • In non prod environment, pass this to connector integration for below actions
    • Authorize
    • SetupMandate
    • Refund

Step 3

  • Consume these fields in connector integration as per requirement

Step 4

  • Consume holder_name in MIT requests for Adyen integration

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

  • I checked and didn't find a similar issue

Have you read the Contributing Guidelines?

Are you willing to submit a PR?

Yes, I am willing to submit a PR!

Metadata

Metadata

Assignees

Labels

C-featureCategory: Feature request or enhancementS-awaiting-triageStatus: New issues that have not been assessed yet

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions