From a8d6ce836af842c75b0a71dd80c76f52fff613ec Mon Sep 17 00:00:00 2001 From: Sampras Lopes Date: Fri, 17 Feb 2023 18:15:45 +0530 Subject: [PATCH] chore(release): port release bug fixes to main branch (#612) Co-authored-by: Sanchith Hegde Co-authored-by: Narayan Bhat <48803246+Narayanbhat166@users.noreply.github.com> Co-authored-by: ItsMeShashank Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com> --- CHANGELOG.md | 48 ++++++++++++++++++++++++++++++ crates/router/src/core/payments.rs | 21 ++++++++----- 2 files changed, 61 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29bb2..8dce72ec6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1,48 @@ +# 0.2.1 (2023-02-17) + +## Fixes +- fix payment_status not updated when adding payment method ([#446]) +- Decide connector only when the payment method is confirm ([10ea4919ba07d3198a6bbe3f3d4d817a23605924](https://github.com/juspay/hyperswitch/commit/10ea4919ba07d3198a6bbe3f3d4d817a23605924)) +- Fix panics caused with empty diesel updates ([448595498114cd15158b4a78fc32d8e6dc1b67ee](https://github.com/juspay/hyperswitch/commit/448595498114cd15158b4a78fc32d8e6dc1b67ee)) + + +# 0.2.0 (2023-01-23) - Initial Release + +## Supported Connectors + +- [ACI](https://www.aciworldwide.com/) +- [Adyen](https://www.adyen.com/) +- [Authorize.net](https://www.authorize.net/) +- [Braintree](https://www.braintreepayments.com/) +- [Checkout.com](https://www.checkout.com/) +- [Cybersource](https://www.cybersource.com) +- [Fiserv](https://www.fiserv.com/) +- [Global Payments](https://www.globalpayments.com) +- [Klarna](https://www.klarna.com/) +- [PayU](https://payu.in/) +- [Rapyd](https://www.rapyd.net/) +- [Shift4](https://www.shift4.com/) +- [Stripe](https://stripe.com/) +- [Wordline](https://worldline.com/) + + +## Supported Payment Methods + +- Cards No 3DS +- Cards 3DS* +- [Apple Pay](https://www.apple.com/apple-pay/)* +- [Google Pay](https://pay.google.com)* +- [Klarna](https://www.klarna.com/)* +- [PayPal](https://www.paypal.com/)* + +## Supported Payment Functionalities + +- Payments (Authorize/Sync/Capture/Cancel) +- Refunds (Execute/Sync) +- Saved Cards +- Mandates (No 3DS)* +- Customers +- Merchants +- ConnectorAccounts + +\*May not be supported on all connectors \ No newline at end of file diff --git a/crates/router/src/core/payments.rs b/crates/router/src/core/payments.rs index 18d0530bcb..5c65854ad8 100644 --- a/crates/router/src/core/payments.rs +++ b/crates/router/src/core/payments.rs @@ -109,13 +109,18 @@ where ) .await?; - let connector_details = route_connector( - state, - &merchant_account, - &mut payment_data, - connector_details, - ) - .await?; + let connector = match should_call_connector(&operation, &payment_data) { + true => Some( + route_connector( + state, + &merchant_account, + &mut payment_data, + connector_details, + ) + .await?, + ), + false => None, + }; let (operation, mut payment_data) = operation .to_update_tracker()? @@ -133,7 +138,7 @@ where .add_task_to_process_tracker(state, &payment_data.payment_attempt) .await?; - if should_call_connector(&operation, &payment_data) { + if let Some(connector_details) = connector { payment_data = match connector_details { api::ConnectorCallType::Single(connector) => { call_connector_service(