-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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): [Noon] Currency Unit Conversion #2786
base: main
Are you sure you want to change the base?
Conversation
eb52ec1
to
95a61a6
Compare
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.
@SagarDevAchar, please resolve the conflicts and implement currency conversion for payments capture flow
ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::PaymentsResponseData>
amount: conn_utils::to_currency_base_unit( | ||
item.request.refund_amount, | ||
item.request.currency, | ||
item.router_data.request.refund_amount, | ||
item.router_data.request.currency, |
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.
Use item.amount
, in place of to_currency_base_unit()
.
As in noon.rs we already call the tryfrom for currency conversion incase of Refund
amount: conn_utils::to_currency_base_unit( | ||
item.router_data.request.amount, | ||
item.router_data.request.currency, | ||
)?, |
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.
amount: conn_utils::to_currency_base_unit( | |
item.router_data.request.amount, | |
item.router_data.request.currency, | |
)?, | |
amount: item.amount.clone(), |
Hello @SagarDevAchar, |
Type of Change
Description
hyperswitch/crates/router/src/connector/
noon.rs
get_currency_unit
functionConnectorIntegration
implementations forNoon
noon/transformers.rs
NoonRouterData<T>
structure and functionalityNoonPaymentsRequest
Additional Changes
Motivation and Context
How did you test it?
Checklist
cargo +nightly fmt --all
cargo clippy