feat(connector): [Datatrans] Accept connector_intent_metadata in authorize and capture flow and pass it to the connector - #2093
feat(connector): [Datatrans] Accept connector_intent_metadata in authorize and capture flow and pass it to the connector#2093Vani-1107 wants to merge 6 commits into
Conversation
|
💡 💡 💡 New proto field numbers ( |
| authentication_data, | ||
| metadata: item.metadata.clone(), | ||
| connector_feature_data, | ||
| connector_intent_metadata: None, |
There was a problem hiding this comment.
don't keep this None, add the same field in composite proto and map the field.
| /// The targeted currency. | ||
| pub currency: Currency, | ||
| /// The amount in the targeted currency. | ||
| pub amount: i64, |
There was a problem hiding this comment.
changed it to MinorUnit
| pub struct ConnectorIntentMetadata { | ||
| #[serde(skip_serializing_if = "Option::is_none")] | ||
| pub datatrans: Option<DatatransConnectorMetadataData>, | ||
| } | ||
|
|
||
| #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
| pub struct DatatransConnectorMetadataData { |
There was a problem hiding this comment.
if the type of ConnectorIntentMetadata in proto is generic and we are avoiding connector specific then we can do the same in domain as well, we can have this connector specific structs in their own connector file. Or is there any case where DatatransConnectorMetadataData can be used by other connector ?
| optional SplitPaymentsDetails split_payments = 14; | ||
|
|
||
| // Connector-specific intent metadata for the transaction. | ||
| optional SecretString connector_intent_metadata = 15; |
There was a problem hiding this comment.
why we need intent metadata in capture request?
There was a problem hiding this comment.
We need this information, which is provided by the merchant during the auth flow, to be sent to the connector in the capture flow as well.
3bb4b57 to
1958908
Compare
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Description
This PR adds support for accepting and propagating connector_intent_metadata for the Datatrans connector across the payment authorize and capture flows.
Motivation and Context
Additional Changes
How did you test it?
Refer to juspay/hyperswitch#13638 for test case