mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
chore: fix typos and introduce ci check (#390)
This commit is contained in:
@ -738,7 +738,7 @@ pub struct ErrorResponse {
|
||||
// use super::*;
|
||||
|
||||
// #[test]
|
||||
// fn verify_tranform_from_router_to_adyen_req() {
|
||||
// fn verify_transform_from_router_to_adyen_req() {
|
||||
// let router_req = PaymentsRequest {
|
||||
// amount: 0.0,
|
||||
// currency: "None".to_string(),
|
||||
|
||||
@ -152,7 +152,7 @@ impl
|
||||
logger::debug!(payment_session_response_braintree=?res);
|
||||
let response: braintree::BraintreeSessionTokenResponse = res
|
||||
.response
|
||||
.parse_struct("braintree SessionTokenReponse")
|
||||
.parse_struct("braintree SessionTokenResponse")
|
||||
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
|
||||
types::RouterData::try_from(types::ResponseRouterData {
|
||||
response,
|
||||
|
||||
@ -360,7 +360,7 @@ pub struct StoredCredential {
|
||||
pub model: Option<Model>,
|
||||
/// The reason stored credentials are being used to to create a transaction.
|
||||
pub reason: Option<Reason>,
|
||||
/// Indiciates the order of this transaction in the sequence of a planned repeating
|
||||
/// Indicates the order of this transaction in the sequence of a planned repeating
|
||||
/// transaction processing model.
|
||||
pub sequence: Option<Sequence>,
|
||||
}
|
||||
@ -506,10 +506,10 @@ pub enum GlobalpayPaymentsRequestType {
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
|
||||
pub enum Initiator {
|
||||
/// The transaction was initated by the merchant, who is getting paid by the
|
||||
/// The transaction was initiated by the merchant, who is getting paid by the
|
||||
/// payer.'
|
||||
Merchant,
|
||||
/// The transaction was initated by the customer who is paying the merchant.
|
||||
/// The transaction was initiated by the customer who is paying the merchant.
|
||||
Payer,
|
||||
}
|
||||
|
||||
@ -789,7 +789,7 @@ pub enum Reason {
|
||||
Resubmission,
|
||||
}
|
||||
|
||||
/// Indiciates the order of this transaction in the sequence of a planned repeating
|
||||
/// Indicates the order of this transaction in the sequence of a planned repeating
|
||||
/// transaction processing model.
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
|
||||
|
||||
@ -162,7 +162,7 @@ pub struct Bank {
|
||||
pub iban: Option<String>,
|
||||
/// The international identifier code for the bank.
|
||||
pub identifier_code: Option<String>,
|
||||
/// The name assocaited with the bank account
|
||||
/// The name associated with the bank account
|
||||
pub name: Option<String>,
|
||||
}
|
||||
|
||||
|
||||
@ -374,7 +374,8 @@ pub struct PayuOrderResponseBuyerData {
|
||||
phone: Option<String>,
|
||||
first_name: Option<String>,
|
||||
last_name: Option<String>,
|
||||
nin: Option<String>,
|
||||
#[serde(rename = "nin")]
|
||||
national_identification_number: Option<String>,
|
||||
language: Option<String>,
|
||||
delivery: Option<String>,
|
||||
customer_id: Option<String>,
|
||||
|
||||
@ -155,7 +155,7 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for PaymentIntentRequest {
|
||||
fn try_from(item: &types::PaymentsAuthorizeRouterData) -> Result<Self, Self::Error> {
|
||||
let metadata_order_id = item.payment_id.to_string();
|
||||
let metadata_txn_id = format!("{}_{}_{}", item.merchant_id, item.payment_id, "1");
|
||||
let metadata_txn_uuid = Uuid::new_v4().to_string(); //Fetch autogenrated txn_uuid from Database.
|
||||
let metadata_txn_uuid = Uuid::new_v4().to_string(); //Fetch autogenerated txn_uuid from Database.
|
||||
// let api::PaymentMethod::Card(a) = item.payment_method_data;
|
||||
// let api::PaymentMethod::Card(a) = item.payment_method_data;
|
||||
|
||||
@ -721,7 +721,7 @@ impl TryFrom<&types::PaymentsCaptureRouterData> for CaptureRequest {
|
||||
// use super::*;
|
||||
|
||||
// #[test]
|
||||
// fn verify_tranform_from_router_to_stripe_req() {
|
||||
// fn verify_transform_from_router_to_stripe_req() {
|
||||
// let router_req = PaymentsRequest {
|
||||
// amount: 100.0,
|
||||
// currency: "USD".to_string(),
|
||||
|
||||
@ -141,10 +141,10 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
|
||||
) -> CustomResult<String, errors::ConnectorError> {
|
||||
let base_url = self.base_url(connectors);
|
||||
let auth: worldline::AuthType = worldline::AuthType::try_from(&req.connector_auth_type)?;
|
||||
let merchat_account_id = auth.merchant_account_id;
|
||||
let merchant_account_id = auth.merchant_account_id;
|
||||
let payment_id: &str = req.request.connector_transaction_id.as_ref();
|
||||
Ok(format!(
|
||||
"{base_url}v1/{merchat_account_id}/payments/{payment_id}/cancel"
|
||||
"{base_url}v1/{merchant_account_id}/payments/{payment_id}/cancel"
|
||||
))
|
||||
}
|
||||
|
||||
@ -222,9 +222,9 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
|
||||
.change_context(errors::ConnectorError::MissingConnectorTransactionID)?;
|
||||
let base_url = self.base_url(connectors);
|
||||
let auth = worldline::AuthType::try_from(&req.connector_auth_type)?;
|
||||
let merchat_account_id = auth.merchant_account_id;
|
||||
let merchant_account_id = auth.merchant_account_id;
|
||||
Ok(format!(
|
||||
"{base_url}v1/{merchat_account_id}/payments/{payment_id}"
|
||||
"{base_url}v1/{merchant_account_id}/payments/{payment_id}"
|
||||
))
|
||||
}
|
||||
|
||||
@ -329,8 +329,8 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
|
||||
) -> CustomResult<String, errors::ConnectorError> {
|
||||
let base_url = self.base_url(connectors);
|
||||
let auth = worldline::AuthType::try_from(&req.connector_auth_type)?;
|
||||
let merchat_account_id = auth.merchant_account_id;
|
||||
Ok(format!("{base_url}v1/{merchat_account_id}/payments"))
|
||||
let merchant_account_id = auth.merchant_account_id;
|
||||
Ok(format!("{base_url}v1/{merchant_account_id}/payments"))
|
||||
}
|
||||
|
||||
fn get_request_body(
|
||||
@ -436,9 +436,9 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
|
||||
let payment_id = req.request.connector_transaction_id.clone();
|
||||
let base_url = self.base_url(connectors);
|
||||
let auth = worldline::AuthType::try_from(&req.connector_auth_type)?;
|
||||
let merchat_account_id = auth.merchant_account_id;
|
||||
let merchant_account_id = auth.merchant_account_id;
|
||||
Ok(format!(
|
||||
"{base_url}v1/{merchat_account_id}/payments/{payment_id}/refund"
|
||||
"{base_url}v1/{merchant_account_id}/payments/{payment_id}/refund"
|
||||
))
|
||||
}
|
||||
|
||||
@ -532,9 +532,9 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
|
||||
.clone();
|
||||
let base_url = self.base_url(connectors);
|
||||
let auth: worldline::AuthType = worldline::AuthType::try_from(&req.connector_auth_type)?;
|
||||
let merchat_account_id = auth.merchant_account_id;
|
||||
let merchant_account_id = auth.merchant_account_id;
|
||||
Ok(format!(
|
||||
"{base_url}v1/{merchat_account_id}/refunds/{refund_id}/"
|
||||
"{base_url}v1/{merchant_account_id}/refunds/{refund_id}/"
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
@ -300,15 +300,15 @@ pub enum ProcessTrackerError {
|
||||
NotImplemented,
|
||||
#[error("Job not found")]
|
||||
JobNotFound,
|
||||
#[error("Recieved Error ApiResponseError: {0}")]
|
||||
#[error("Received Error ApiResponseError: {0}")]
|
||||
EApiErrorResponse(error_stack::Report<ApiErrorResponse>),
|
||||
#[error("Recieved Error StorageError: {0}")]
|
||||
#[error("Received Error StorageError: {0}")]
|
||||
EStorageError(error_stack::Report<StorageError>),
|
||||
#[error("Recieved Error RedisError: {0}")]
|
||||
#[error("Received Error RedisError: {0}")]
|
||||
ERedisError(error_stack::Report<RedisError>),
|
||||
#[error("Recieved Error ParsingError: {0}")]
|
||||
#[error("Received Error ParsingError: {0}")]
|
||||
EParsingError(error_stack::Report<ParsingError>),
|
||||
#[error("Validation Error Recieved: {0}")]
|
||||
#[error("Validation Error Received: {0}")]
|
||||
EValidationError(error_stack::Report<ValidationError>),
|
||||
}
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ fn create_gpay_session_token(
|
||||
.parse_value::<payment_types::GpaySessionTokenData>("GpaySessionTokenData")
|
||||
.change_context(errors::ConnectorError::NoConnectorMetaData)
|
||||
.attach_printable(format!(
|
||||
"cannnot parse gpay metadata from the given value {:?}",
|
||||
"cannot parse gpay metadata from the given value {:?}",
|
||||
connector_metadata
|
||||
))
|
||||
.change_context(errors::ApiErrorResponse::InvalidDataFormat {
|
||||
|
||||
Reference in New Issue
Block a user