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

feat(connector): [Stripe, Adyen, Checkout] Add reference ID support for retries #1735

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

sai-harsha-vardhan
Copy link
Contributor

Type of Change

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

Description

To enable retries for connector, we need to add support of connector_request_reference_id and connector_response_reference_id

Add connector_request_reference_id, connector_response_reference_id support for stripe, adyen and checkout connectors

reference for connector_request_reference_id -> #1627
reference for connector_response_reference_id -> #1664

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?

Unit tests

  1. Stripe
    image

  2. Adyen
    image

  3. Checkout
    image

Manual Testing

  1. Without config set
    image
    image

  2. With config set
    image
    image

Checklist

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

@sai-harsha-vardhan sai-harsha-vardhan added A-connector-integration Area: Connector integration S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Jul 18, 2023
@sai-harsha-vardhan sai-harsha-vardhan added this to the July 2023 Release milestone Jul 18, 2023
@sai-harsha-vardhan sai-harsha-vardhan self-assigned this Jul 18, 2023
@sai-harsha-vardhan sai-harsha-vardhan requested a review from a team as a code owner July 18, 2023 14:01
@SanchithHegde SanchithHegde changed the title feat(connector): [STRIPE, ADYEN, CHECKOUT] add reference id support for retries feat(connector): [Stripe, Adyen, Checkout] Add reference ID support for retries Jul 19, 2023
Copy link
Contributor

@Abhicodes-crypto Abhicodes-crypto left a comment

Choose a reason for hiding this comment

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

Apart from that, LGTM.

redirection_data,
mandate_reference: None,
connector_metadata: None,
network_txn_id: None,
connector_response_reference_id: None,
connector_response_reference_id: Some(
item.response.reference.unwrap_or(item.response.id),
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be an error ? Because it might break logic.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We'll try to find our reference id, if it's not available we'll send connector's id. This shouldn't break the flow anyway because we are not using it anywhere except sending the value in payments response.

@Narayanbhat166 Narayanbhat166 added this pull request to the merge queue Jul 25, 2023
Merged via the queue into main with commit 9ba8ec3 Jul 25, 2023
@Narayanbhat166 Narayanbhat166 deleted the add-reference-id-support-for-top-connectors branch July 25, 2023 13:50
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Jul 26, 2023
This was referenced Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-connector-integration Area: Connector integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants