-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat(connector): [Hipay] Add Card Payments Flow #7475
base: main
Are you sure you want to change the base?
Conversation
_connectors: &Connectors, | ||
) -> CustomResult<RequestContent, errors::ConnectorError> { | ||
let connector_req = transformers::HiPayTokenRequest::try_from(req)?; | ||
router_env::logger::info!(raw_connector_request=?connector_req); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this logger as it contains sensitive card info
@@ -194,7 +307,10 @@ impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData | |||
|
|||
let connector_router_data = hipay::HipayRouterData::from((amount, req)); | |||
let connector_req = hipay::HipayPaymentsRequest::try_from(&connector_router_data)?; | |||
Ok(RequestContent::Json(Box::new(connector_req))) | |||
router_env::logger::info!(raw_connector_request=?connector_req); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this logger
|
||
let connector_router_data = hipay::HipayRouterData::from((capture_amount, req)); | ||
let connector_req = hipay::HipayMaintenanceRequest::try_from(&connector_router_data)?; | ||
router_env::logger::info!(raw_connector_request=?connector_req); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this logger if not needed
_connectors: &Connectors, | ||
) -> CustomResult<RequestContent, errors::ConnectorError> { | ||
let connector_req = hipay::HipayMaintenanceRequest::try_from(req)?; | ||
router_env::logger::info!(raw_connector_request=?connector_req); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this logger if not needed
let connector_req = hipay::HipayRefundRequest::try_from(&connector_router_data)?; | ||
Ok(RequestContent::Json(Box::new(connector_req))) | ||
let connector_req = hipay::HipayMaintenanceRequest::try_from(&connector_router_data)?; | ||
router_env::logger::info!(raw_connector_request=?connector_req); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this logger if not needed
| HipayPaymentStatus::Refused | ||
| HipayPaymentStatus::Expired | ||
| HipayPaymentStatus::Denied => Self::Failure, | ||
HipayPaymentStatus::AuthorizedAndPending => Self::Authorizing, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When do we get AuthorizedAndPending status?
HipayPaymentStatus::AwaitingTerminal => Self::Pending, | ||
HipayPaymentStatus::AuthorizationCancellationRequested => Self::VoidInitiated, | ||
HipayPaymentStatus::ChallengeRequested => Self::AuthenticationPending, | ||
HipayPaymentStatus::SoftDeclined => Self::AuthorizationFailed, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mark this as Failure
HipayPaymentStatus::Authenticated => Self::AuthenticationSuccessful, | ||
HipayPaymentStatus::AcquirerNotFound => Self::Failure, | ||
HipayPaymentStatus::RiskAccepted => Self::Pending, | ||
HipayPaymentStatus::AuthorizationRefused => Self::AuthorizationFailed, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mark this as Failure
#[derive(Debug, Deserialize, Serialize, PartialEq, Eq, Clone)] | ||
#[serde(rename_all = "lowercase")] | ||
pub enum HipaySyncState { | ||
Completed, | ||
Waiting, | ||
Pending, | ||
Declined, | ||
Forwarding, | ||
Error, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this being used?
Ok(Self { | ||
response, | ||
..item.data | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should mark status as Failure
here
Type of Change
Description
Added 3DS /No-3ds Card flows
Mandates Not added
Additional Changes
Motivation and Context
How did you test it?
Added Cypress Tests





Checklist
cargo +nightly fmt --all
cargo clippy