-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(core): google pay decrypt flow #6991
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
Conversation
0106c38 to
bdc45bc
Compare
ShankarSinghC
left a comment
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.
Add some debug logs in the google decryption flow.
ShankarSinghC
left a comment
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.
LGTM
Add some debug logs in the google decryption flow.
ShankarSinghC
left a comment
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.
LGTM
Add some debug logs in the google decryption flow.
crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs
Show resolved
Hide resolved
| pub struct GooglePayDecryptedData { | ||
| pub message_expiration: String, | ||
| pub message_id: String, | ||
| pub payment_method: String, |
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.
| pub payment_method: String, | |
| pub payment_method_type: String, |
crates/router/src/core/payments.rs
Outdated
| .attach_printable("failed to decrypt google pay token")?, | ||
| ) | ||
| } | ||
| _ => None, |
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.
Add logs, add context about the variants.
crates/router/src/core/payments.rs
Outdated
| google_pay_predecrypt, | ||
| )))) | ||
| } | ||
| _ => Ok(None), |
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.
Add logs, add context about the variants.
|
|
||
| // derive 64 bytes for the output key (symmetric encryption + MAC key) | ||
| let mut output_key = vec![0u8; 64]; | ||
| hkdf.expand(SENDER_ID, &mut output_key).map_err(|_| { |
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.
Lift the error or log the error here
2dfd837
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Gnanasundari24 <[email protected]>
Type of Change
Description
Decryption flow for google pays
Decrypts the token using public and private key of merchant
API contract change for MCA, includes credentials for decryption collection using connector_wallets_details
Note: This PR also bumps the msrv version from
1.78.0to1.80.0Additional Changes
Following Documentation contains the API Contract changes
Motivation and Context
How did you test it?
Tested through Postman:
Cybersource:succeedstatusChecklist
cargo +nightly fmt --allcargo clippy