hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

added find all support for pm kv

Open akshay-97 opened this issue 10 months ago • 0 comments

Type of Change

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

Description

We are now taking union of rows in kv and db for payment method list by customer, merchant

Additional Changes

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

Motivation and Context

list payment method by customer and merchant was eventually consistent when payment method followed kv path, change here is to combine values from db and redis

How did you test it?

  1. create payment method and drain data to db (can skip this step if payment method entries are already present in db but not kv for the customer <> merchant)
  2. create another payment method through kv
  3. list payment methods should reflect pm created through kv as well curl --location 'http://localhost:8080/customers/<cust_id>/payment_methods' \ --header 'Accept: application/json' \ --header 'api-key:***'

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

akshay-97 avatar Apr 13 '24 22:04 akshay-97