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(router): add attempt_count field in attempt update record of payment_intent #1725

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

sai-harsha-vardhan
Copy link
Contributor

Type of Change

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

Description

While updating the payment_intent's active attempt id in automatic retries we need to update attempt_count too. To support that have added attempt_count field in attempt update record of payment_intent

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?

Compiler guided

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-core Area: Core flows C-feature Category: Feature request or enhancement S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Jul 17, 2023
@sai-harsha-vardhan sai-harsha-vardhan added this to the July 2023 Release milestone Jul 17, 2023
@sai-harsha-vardhan sai-harsha-vardhan requested a review from a team as a code owner July 17, 2023 07:49
@sai-harsha-vardhan sai-harsha-vardhan self-assigned this Jul 17, 2023
@@ -134,8 +134,9 @@ pub enum PaymentIntentUpdate {
order_details: Option<Vec<pii::SecretSerdeValue>>,
metadata: Option<pii::SecretSerdeValue>,
},
PaymentAttemptUpdate {
PaymentAttemptAndAttemptCountUpdate {
Copy link
Contributor

@Abhicodes-crypto Abhicodes-crypto Jul 17, 2023

Choose a reason for hiding this comment

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

Should we rename this as AutoRetryAttemptUpdate and below variant as ManualRetryAttemptUpdate ? I guess these structs are not used in other cases

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But these names imply what are we updating, so this would be better even if it's used anywhere else in future right!

@SanchithHegde SanchithHegde added this pull request to the merge queue Jul 17, 2023
Merged via the queue into main with commit 95de3a5 Jul 17, 2023
@SanchithHegde SanchithHegde deleted the attempt_count_in_attempt_update branch July 17, 2023 10:09
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows C-feature Category: Feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants