Skip to content
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

refactor(connector): airwallex convert init payment to preprocessing #4842

Merged

Conversation

hrithikesh026
Copy link
Contributor

@hrithikesh026 hrithikesh026 commented May 31, 2024

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Removed fn execute_pretasks() from Authorize ConnectorIntegration implementation on Airwallex.

fn execute_pretasks() was calling an api to retrieve a reference_id and populate router_data. I've moved this logic to core. So that this operation will be done in preprocessing flow.

Also updated Airwallex postman collection.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Manual.
Ran the airwallex postman collection to test sanity.

Screenshot 2024-06-03 at 2 55 07 PM Screenshot 2024-06-03 at 2 53 01 PM

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@hrithikesh026 hrithikesh026 self-assigned this May 31, 2024
@hrithikesh026 hrithikesh026 requested review from a team as code owners May 31, 2024 13:49
@hrithikesh026 hrithikesh026 added A-core Area: Core flows S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Jun 1, 2024
@hrithikesh026 hrithikesh026 added this to the May 2024 Release milestone Jun 1, 2024
@likhinbopanna likhinbopanna added this pull request to the merge queue Jun 3, 2024
Merged via the queue into main with commit e5da133 Jun 3, 2024
13 checks passed
@likhinbopanna likhinbopanna deleted the convert-init-payment-flow-to-preprocessing-airwallex branch June 3, 2024 11:06
@@ -1885,6 +1885,14 @@ where
dyn api::Connector:
services::api::ConnectorIntegration<F, Req, router_types::PaymentsResponseData>,
{
if !is_operation_complete_authorize(&operation)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we checking for the operation here?
can you use

pub async fn authorize_preprocessing_steps<F: Clone>(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fn preprocessing_steps is overridden for Both Authorize and CompleteAuthorize flows.
But I want to call preprocessing_steps only during Authorize flow for Airwallex.

Within fn preprocessing_steps implementation of Authorize Flow, we are calling fn authorize_preprocessing_steps

authorize_preprocessing_steps(state, &self, true, connector).await

pixincreate added a commit that referenced this pull request Jun 4, 2024
…atus_pt

* 'main' of github.com:juspay/hyperswitch:
  chore(version): 2024.06.04.0
  fix: include client_version and client_source in retried payments (#4826)
  refactor(users): Changes for Home and Signout APIs for TOTP Redis flows (#4851)
  feat(users): Create config for TOTP Issuer (#4776)
  feat(multitenancy): add support for multitenancy and handle the same in router, producer, consumer, drainer and analytics (#4630)
  feat(connector): [AUTHORIZEDOTNET] Support payment_method_id in recurring mandate payment (#4841)
  refactor(connector): airwallex convert init payment to preprocessing (#4842)
  feat(router): send `three_ds_requestor_url` in authentication_response for external 3ds flow (#4828)
  feat(consolidated-kafka-events): add consolidated kafka payment events (#4798)
  refactor(connector): [Klarna] Add shipping Address in Klarna Session and Payment Request (#4836)
  fix(connector): make few fields optional in struct NetceteraErrorDetails (#4827)
  chore(cypress): remove logs that expose `globalState` (#4844)
@pixincreate pixincreate removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Jun 4, 2024
pixincreate added a commit that referenced this pull request Jun 4, 2024
* 'main' of github.com:juspay/hyperswitch:
  feat(cypress): Add service level testing for Payouts (#4744)
  feat(auth): Create and use `SinglePurposeOrLoginTokenAuth` (#4830)
  refactor(connector): [Adyen] handle redirection error response (#4862)
  refactor(api_models): rename Card struct for payouts to avoid overrides in auto generated open API spec (#4861)
  chore(version): 2024.06.04.1
  fix(connector): [Adyen]add required fields for afterpay clearpay (#4858)
  chore(version): 2024.06.04.0
  fix: include client_version and client_source in retried payments (#4826)
  refactor(users): Changes for Home and Signout APIs for TOTP Redis flows (#4851)
  feat(users): Create config for TOTP Issuer (#4776)
  feat(multitenancy): add support for multitenancy and handle the same in router, producer, consumer, drainer and analytics (#4630)
  feat(connector): [AUTHORIZEDOTNET] Support payment_method_id in recurring mandate payment (#4841)
  refactor(connector): airwallex convert init payment to preprocessing (#4842)
  feat(router): send `three_ds_requestor_url` in authentication_response for external 3ds flow (#4828)
  feat(consolidated-kafka-events): add consolidated kafka payment events (#4798)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants