Skip to content

feat(connector): [SILVERFLOW] Integrate cards non 3ds payments#8591

Merged
Gnanasundari24 merged 7 commits intomainfrom
silverflow
Jul 24, 2025
Merged

feat(connector): [SILVERFLOW] Integrate cards non 3ds payments#8591
Gnanasundari24 merged 7 commits intomainfrom
silverflow

Conversation

@iemyashasvi
Copy link
Contributor

@iemyashasvi iemyashasvi commented Jul 9, 2025

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Cards Non-3DS payments added for silverflow (Alpha Integration).
Ref: https://www.silverflow.com/

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

#8592

How did you test it?

Compilation and Clippy checks by cargo build and cargo clippy
No cypress due to Alpha integration.

Checklist

  • 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

@iemyashasvi iemyashasvi self-assigned this Jul 9, 2025
@iemyashasvi iemyashasvi requested a review from a team as a code owner July 9, 2025 14:05
@iemyashasvi iemyashasvi added A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement labels Jul 9, 2025
@semanticdiff-com
Copy link

semanticdiff-com bot commented Jul 9, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/connectors/silverflow/transformers.rs  9% smaller
  crates/hyperswitch_connectors/src/connectors/silverflow.rs  9% smaller
  crates/connector_configs/toml/development.toml Unsupported file format
  crates/connector_configs/toml/production.toml Unsupported file format
  crates/connector_configs/toml/sandbox.toml Unsupported file format
  crates/test_utils/src/connector_auth.rs  0% smaller

@iemyashasvi iemyashasvi changed the title feat(connector):[SILVERFLOW] Integrate cards non 3ds payments feat(connector): [SILVERFLOW] Integrate cards non 3ds payments Jul 9, 2025
@iemyashasvi iemyashasvi linked an issue Jul 9, 2025 that may be closed by this pull request
2 tasks
#[derive(Default, Debug, Serialize, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct MerchantAcceptorResolver {
merchant_acceptor_key: String,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the merchant acceptor key used for?
Should we fetch it from connector auth keys instead of metadata?

// Basic structures for Silverflow API
#[derive(Default, Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct Amount {
value: i64,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amount.value should be of the type of MinorUnit here

.into()),
PaymentMethodData::Card(req_card) => {
// Convert MinorUnit to i64 for amount value
let amount_value = item.amount.get_amount_as_i64();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make amount_value field of type MinorUnit and then this conversion wont be needed

pub struct SilverflowRefundRequest {
pub amount: StringMinorUnit,
#[serde(rename = "refundAmount")]
pub refund_amount: i64,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make refund_amount field as MinorUnit

Comment on lines +518 to +521
let refund_amount_value = item.amount.get_amount_as_i64();

Ok(Self {
amount: item.amount.to_owned(),
refund_amount: refund_amount_value,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This conversion wont be needed when you make refund_amount field as MinorUnit

@iemyashasvi iemyashasvi requested a review from a team as a code owner July 11, 2025 14:59
@manideepk90 manideepk90 added the Grace PR raised using GRACE AI label Jul 17, 2025
@iemyashasvi iemyashasvi added the Alpha This is an Alpha integration , code generated and tested by mock server , not on sandbox API's label Jul 23, 2025
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Jul 24, 2025
Merged via the queue into main with commit b521951 Jul 24, 2025
19 of 29 checks passed
@Gnanasundari24 Gnanasundari24 deleted the silverflow branch July 24, 2025 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-connector-integration Area: Connector integration Alpha This is an Alpha integration , code generated and tested by mock server , not on sandbox API's C-feature Category: Feature request or enhancement Grace PR raised using GRACE AI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] [CONNECTOR : SILVERFLOW] Cards No 3ds Alpha integration

5 participants