hyperswitch
hyperswitch copied to clipboard
added find all support for pm kv
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?
- 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)
- create another payment method through kv
- 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