Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: [CYBERSOURCE, BANKOFAMERICA, WELLSFARGO] Move code to crate hyperswitch_connectors #6908

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

awasthi21
Copy link
Contributor

Type of Change

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

Description

Move cybersource, bankofamerica, wellsfargo code to crate hyperswitch_connectors.

Additional Changes

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

Motivation and Context

How did you test it?

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

@awasthi21 awasthi21 requested review from a team as code owners December 20, 2024 10:56
@awasthi21 awasthi21 self-assigned this Dec 20, 2024
@awasthi21 awasthi21 added A-connector-integration Area: Connector integration C-refactor Category: Refactor labels Dec 20, 2024
@awasthi21 awasthi21 force-pushed the connector-crate-move branch from 37ec9b0 to deb2edb Compare December 23, 2024 09:48
@awasthi21 awasthi21 force-pushed the connector-crate-move branch from 1e0ba96 to 1ec7b93 Compare December 23, 2024 11:40
fn is_auto_capture(&self) -> Result<bool, Error>;
fn get_order_details(&self) -> Result<Vec<OrderDetailsWithAmount>, Error>;
fn get_webhook_url(&self) -> Result<String, Error>;
fn get_return_url(&self) -> Result<String, Error>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Rename function to get_router_return_url

@awasthi21 awasthi21 force-pushed the connector-crate-move branch from 6a5c99d to 616296f Compare December 27, 2024 05:22
@awasthi21 awasthi21 force-pushed the connector-crate-move branch from 616296f to 15d646b Compare December 27, 2024 05:36
Comment on lines +46 to +50
/// Error message for Authentication Error from the connector
pub const CONNECTOR_UNAUTHORIZED_ERROR: &str = "Authentication Error from the connector";

/// Error message when Refund request has been voided.
pub const REFUND_VOIDED: &str = "Refund request has been voided.";
Copy link
Member

Choose a reason for hiding this comment

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

Can we move these 2 consts to the hyperswitch_connectors crate itself?

@@ -41,7 +41,6 @@ pub const DEFAULT_LIST_API_LIMIT: u16 = 10;
pub(crate) const UNSUPPORTED_ERROR_MESSAGE: &str = "Unsupported response type";
pub(crate) const LOW_BALANCE_ERROR_MESSAGE: &str = "Insufficient balance in the payment method";
pub(crate) const CONNECTOR_UNAUTHORIZED_ERROR: &str = "Authentication Error from the connector";
Copy link
Member

Choose a reason for hiding this comment

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

Aren't we removing the const from here, since it would be moved to the hyperswitch_connectors crate?

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 C-refactor Category: Refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REFACTOR] Move cybersource, bankofamerica, wellsfargo to crate hyperswitch_connectors
3 participants