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 connector mit related columns to the payment methods table #3764

Merged
merged 3 commits into from
Feb 27, 2024

Conversation

vspecky
Copy link
Member

@vspecky vspecky commented Feb 22, 2024

Type of Change

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

Description

This PR adds 3 columns to the payment_methods table, with the purpose of enabling MIT Transaction Orchestration in the near future.

  • connector_mandate_details: Intended to store Connector MIT details such as the mandate ID
  • customer_acceptance: Intended to store customer consent and acceptance details
  • status: The status of the payment method (Can be processing initially for connector MITs that rely on asynchronous flows and/or time-based factors for setup)

Flows Affected

  • List Payment Methods for Customer: This was updated such that only payment methods with status active are listed for the customer. To make this backwards compatible, the default status for new saved cards is set to active.

Additional Changes

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

Motivation and Context

This change is important for setting up MIT orchestration in the future.

How did you test it?

Local testing, postman tests. The saved card payments flow needs to work as usual which is covered by Postman tests.

When saving a card, the values of the added columns are set to default for now. This is NULL for connector_mandate_details and customer_acceptance, and active for status.
image

Since the default for the status column is set to active, the List Payment Methods for Customer flow works as intended for saved payment methods.
image

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
  • I added a CHANGELOG entry if applicable

@vspecky vspecky added C-feature Category: Feature request or enhancement S-waiting-on-review Status: This PR has been implemented and needs to be reviewed M-database-changes Metadata: This PR involves database schema changes A-payment-methods Area: Payment Methods R-waiting-on-L1 Review: Waiting on L1 reviewer labels Feb 22, 2024
@vspecky vspecky added this to the February 2024 Release milestone Feb 22, 2024
@vspecky vspecky self-assigned this Feb 22, 2024
@vspecky vspecky requested review from a team as code owners February 22, 2024 07:25
@vspecky vspecky linked an issue Feb 22, 2024 that may be closed by this pull request
@vspecky vspecky requested a review from Chethan-rao February 23, 2024 06:46
crates/common_enums/src/enums.rs Outdated Show resolved Hide resolved
crates/diesel_models/src/payment_method.rs Outdated Show resolved Hide resolved
crates/common_enums/src/enums.rs Outdated Show resolved Hide resolved
crates/router/src/db/payment_method.rs Show resolved Hide resolved
Chethan-rao
Chethan-rao previously approved these changes Feb 27, 2024
@vspecky vspecky requested a review from a team February 27, 2024 09:38
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Feb 27, 2024
Merged via the queue into main with commit 5b8c261 Feb 27, 2024
19 of 21 checks passed
@Gnanasundari24 Gnanasundari24 deleted the add-payment-method-columns branch February 27, 2024 11:35
pixincreate added a commit that referenced this pull request Feb 28, 2024
…stman-runner

* 'main' of github.com:juspay/hyperswitch: (22 commits)
  chore(version): 2024.02.28.0
  chore(postman): update Postman collection files
  fix(connector): [AUTHORIZEDOTNET] Fix status mapping (#3845)
  refactor(router): added logs health and deep health (#3780)
  feat(roles): Change list roles, get role and authorization info api to respond with groups (#3837)
  fix(core): validate amount_to_capture in payment update (#3830)
  refactor(connector): [Square] change error message from NotSupported to NotImplemented (#2875)
  feat(router): add connector mit related columns to the payment methods table (#3764)
  ci(postman): refactor NMI postman collection (#3805)
  refactor(connector): [Braintree] Mask PII data (#3759)
  refactor(connector): [Forte] Mask PII data (#3824)
  refactor(compatibility): added compatibility layer request logs (#3774)
  refactor(payment_methods): introduce `locker_id` column in `payment_methods` table (#3760)
  feat(connector): mask pii information in connector request and response for stripe, aci, adyen, airwallex  and authorizedotnet (#3678)
  chore(version): 2024.02.27.0
  fix(core): do not construct request if it is already available (#3826)
  refactor: incorporate `hyperswitch_interface` into router (#3669)
  feat: add unique constraint restriction for KV (#3723)
  feat(connector): [Payme] Add Void flow to Payme (#3817)
  refactor(connector): [Cybersource] Mask PII data  (#3786)
  ...
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Mar 3, 2024
@SanchithHegde SanchithHegde removed the R-waiting-on-L1 Review: Waiting on L1 reviewer label Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-payment-methods Area: Payment Methods C-feature Category: Feature request or enhancement M-database-changes Metadata: This PR involves database schema changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DB Updates for Payment Methods Table
5 participants