Skip to content

Commit

Permalink
change function name from validate_if_surcharge_supported to validate…
Browse files Browse the repository at this point in the history
…_if_surcharge_implemeted
  • Loading branch information
hrithikesh026 committed Oct 17, 2023
1 parent d589755 commit f753560
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crates/router/src/connector/paypal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ impl ConnectorValidation for Paypal {
}
}

fn validate_if_surcharge_supported(&self) -> CustomResult<(), errors::ConnectorError> {
fn validate_if_surcharge_implemeted(&self) -> CustomResult<(), errors::ConnectorError> {

Check warning on line 215 in crates/router/src/connector/paypal.rs

View workflow job for this annotation

GitHub Actions / Spell check

"implemeted" should be "implemented".
Ok(())
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/trustpay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl ConnectorCommon for Trustpay {
}

impl ConnectorValidation for Trustpay {
fn validate_if_surcharge_supported(&self) -> CustomResult<(), errors::ConnectorError> {
fn validate_if_surcharge_implemeted(&self) -> CustomResult<(), errors::ConnectorError> {

Check warning on line 152 in crates/router/src/connector/trustpay.rs

View workflow job for this annotation

GitHub Actions / Spell check

"implemeted" should be "implemented".
Ok(())
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/core/payments/flows/authorize_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl Feature<api::Authorize, types::PaymentsAuthorizeData> for types::PaymentsAu
if self.request.surcharge_details.is_some() {
connector
.connector
.validate_if_surcharge_supported()
.validate_if_surcharge_implemeted()

Check warning on line 79 in crates/router/src/core/payments/flows/authorize_flow.rs

View workflow job for this annotation

GitHub Actions / Spell check

"implemeted" should be "implemented".
.to_payment_failed_response()?;
}

Expand Down
10 changes: 4 additions & 6 deletions crates/router/src/services/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,10 @@ pub trait ConnectorValidation: ConnectorCommon {
false
}

fn validate_if_surcharge_supported(&self) -> CustomResult<(), errors::ConnectorError> {
Err(errors::ConnectorError::NotSupported {
message: "Surcharge".to_string(),
connector: self.id(),
}
.into())
fn validate_if_surcharge_implemeted(&self) -> CustomResult<(), errors::ConnectorError> {

Check warning on line 96 in crates/router/src/services/api.rs

View workflow job for this annotation

GitHub Actions / Spell check

"implemeted" should be "implemented".
Err(errors::ConnectorError::NotImplemented(
format!("Surcharge not implemented for {}", self.id()).into(),
))
}
}

Expand Down

0 comments on commit f753560

Please sign in to comment.