-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat(core): Added Reward PaymentMethod & CurrencyAuthKey for Hyperswitch <> UCS Integration #8767
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(core): Added Reward PaymentMethod & CurrencyAuthKey for Hyperswitch <> UCS Integration #8767
Conversation
Changed Files
|
…ward_paymentmethod
…ward_paymentmethod
PaymentMethodType::ClassicReward => 1, | ||
PaymentMethodType::Evoucher => 2, | ||
_ => { | ||
return Err(UnifiedConnectorServiceError::NotImplemented(format!( |
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.
Avoid return use ? instead
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.
removed return
@@ -378,6 +384,14 @@ pub fn build_unified_connector_service_grpc_headers( | |||
parse("api_secret", api_secret.peek())?, | |||
); | |||
} | |||
if let Some(auth_key_map) = meta.auth_key_map { | |||
let auth_key_map_str = serde_json::to_string(&auth_key_map) | |||
.map_err(|_| UnifiedConnectorServiceError::ParsingFailed)?; |
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.
Why the error is discarded here? do change context
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.
now I have logged the error.
change_context cannot be used here because the function returns Result<MetadataMap, UnifiedConnectorServiceError> (std::result::Result), not error_stack::Result
Type of Change
Description
This PR implements the following
Additional Changes
Motivation and Context
How did you test it?
Create Payment Evoucher
Response
Create Payment Classicreward
Response
Enable payments in HS via UCS

Tests via HS
Create Payment
Response
Sync Payment
ResponseSetup Mandate with 0 amount
Response
Make a mandate payment manual capture
Response
Make a mandate payment auto capture
Response
Checklist
cargo +nightly fmt --all
cargo clippy