@@ -130,21 +130,21 @@ impl<T: DatabaseStore> PaymentIntentInterface for KVRouterStore<T> {
130
130
async fn update_payment_intent (
131
131
& self ,
132
132
this : PaymentIntent ,
133
- payment_intent : PaymentIntentUpdate ,
133
+ payment_intent_update : PaymentIntentUpdate ,
134
134
storage_scheme : MerchantStorageScheme ,
135
135
) -> error_stack:: Result < PaymentIntent , StorageError > {
136
136
match storage_scheme {
137
137
MerchantStorageScheme :: PostgresOnly => {
138
138
self . router_store
139
- . update_payment_intent ( this, payment_intent , storage_scheme)
139
+ . update_payment_intent ( this, payment_intent_update , storage_scheme)
140
140
. await
141
141
}
142
142
MerchantStorageScheme :: RedisKv => {
143
143
let key = format ! ( "mid_{}_pid_{}" , this. merchant_id, this. payment_id) ;
144
144
let field = format ! ( "pi_{}" , this. payment_id) ;
145
145
146
- let updated_intent = payment_intent . clone ( ) . apply_changeset ( this. clone ( ) ) ;
147
- let diesel_intent = payment_intent . to_storage_model ( ) ;
146
+ let updated_intent = payment_intent_update . clone ( ) . apply_changeset ( this. clone ( ) ) ;
147
+ let diesel_intent = updated_intent . clone ( ) . to_storage_model ( ) ;
148
148
// Check for database presence as well Maybe use a read replica here ?
149
149
150
150
let redis_value =
@@ -156,7 +156,7 @@ impl<T: DatabaseStore> PaymentIntentInterface for KVRouterStore<T> {
156
156
updatable : kv:: Updateable :: PaymentIntentUpdate (
157
157
kv:: PaymentIntentUpdateMems {
158
158
orig : this. to_storage_model ( ) ,
159
- update_data : diesel_intent ,
159
+ update_data : payment_intent_update . to_storage_model ( ) ,
160
160
} ,
161
161
) ,
162
162
} ,
0 commit comments