-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat(nexinets): Use connector_request_reference_id as reference to the connector - Work In Progress #2515
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(nexinets): Use connector_request_reference_id as reference to the connector - Work In Progress #2515
Conversation
da0725d
to
beecccd
Compare
@@ -179,6 +180,7 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for NexinetsPaymentsRequest { | |||
product, | |||
payment, | |||
nexinets_async, | |||
merchant_order_id: Some(item.connector_request_reference_id.clone()), |
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.
Hi @frazar ,
as per api docs of nexinets merchant_order_id can only be sent in case of cards . So this should only be populated incase of card payments .
let merchant_order_id = match item.payment_method {
// Merchant order id is sent only in case of card payment
enums::PaymentMethod::Card => Some(item.connector_request_reference_id.clone()),
_ => 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.
Thank you! I applied the suggested changes.
Please make the suggested changes , Other than that looks good to me |
fe72903
to
e01173c
Compare
The reference is passed as the "merchantOrderId" attribute, as described in NexiNets documentation: https://developer.nexigroup.com/payengine/en-EU/api/payengine-api-v1/#orders-debit-post
e01173c
to
eff5605
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.
Looks good to me!
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.
Looks good to me!
Thanks for the PR, @frazar!
Thank you all for your guidance and support! |
Type of Change
Description
For all payment methods, Hyperswitch should transmit a reference to the connector, enabling merchants to subsequently locate the payment within the connector dashboard.
In this PR, such reference is obtained by calling
connector_request_reference_id()
inRouterData
. The result is then passed as the "merchantOrderId" parameter to the NexiNets API, as per the official documentation.Additional Changes
Motivation and Context
Fixes #2307
How did you test it?
Checklist
cargo +nightly fmt --all
cargo clippy