juspay / hyperswitch

An open source payments switch written in Rust to make payments fast, reliable and affordable
https://hyperswitch.io/
Apache License 2.0
11.04k stars 1.19k forks source link

[FIX] use existing field value of nick_name in db if not sent during request #5104

Closed Chethan-rao closed 1 week ago

Chethan-rao commented 1 week ago

When a card is saved with nick_name during 1st time, if the same card is being saved next time with no nick_name, the nick_name field is being null. This is because we are only relying on request's nick_name field. We should first infer the value from the request. If not present/sent in request, we fallback to the existing field value in db.