hyperswitch
hyperswitch copied to clipboard
refactor(payment_methods): remove `payment_method_id` being used as a fallback for `locker_id`
Type of Change
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
Description
Currently, if locker_id
was not found in the payment_methods entry, we used to assume payment_method_id
as locker_id. But since all the migrations have been taken care of, it is safe to remove this fallback logic. locker_id
itself is an optional field in the application. So, if it is not found in case of card
and bank_transfer
, we should throw an error.
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?
Checklist
- [x] I formatted the code
cargo +nightly fmt --all
- [x] I addressed lints thrown by
cargo clippy
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a CHANGELOG entry if applicable