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.02k stars 1.19k forks source link

update last used when the customer acceptance is passed in the recurring payment #5117

Closed ShankarSinghC closed 23 hours ago

ShankarSinghC commented 1 week ago

We need to update the last used for a payment method as whenever a payment is done with that particular saved payment method. Currently we if a customer is making a payment (CIT) with the payment data that is same as the one that is already saved we are not updating the last used a for the payment method in the db.

In this case the new CIT with the payment_data that is same as the one saved also needs to be tied to the saved pm and the last used for it needs to be updated.