File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
src/NoFrixion.MoneyMoov/Extensions
test/MoneyMoov.UnitTests/Models Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -243,6 +243,10 @@ PaymentRequestEventTypesEnum.pisp_callback or
243243 var settleFailedEvent = attempt . First ( x => x . EventType is PaymentRequestEventTypesEnum . pisp_settle_failure ) ;
244244
245245 paymentAttempt . SettleFailedAt = settleFailedEvent . Inserted ;
246+
247+ //Set authorised amount to zero when there is settlement failure for this attempt.
248+ paymentAttempt . AuthorisedAmount = 0 ;
249+
246250 }
247251
248252 pispPaymentAttempts . Add ( paymentAttempt ) ;
Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ public void GetPispPaymentAttempts_Failed_Test()
222222 Assert . Single ( pispAttempts ) ;
223223 Assert . Equal ( PaymentResultEnum . None , pispAttempts . First ( ) . Status ) ;
224224 Assert . Equal ( 0 , pispAttempts . First ( ) . SettledAmount ) ;
225- Assert . Equal ( amount , pispAttempts . First ( ) . AuthorisedAmount ) ;
225+ Assert . Equal ( 0 , pispAttempts . First ( ) . AuthorisedAmount ) ;
226226 Assert . Equal ( CurrencyTypeEnum . EUR , pispAttempts . First ( ) . Currency ) ;
227227 Assert . Equal ( PaymentProcessorsEnum . Yapily , pispAttempts . First ( ) . PaymentProcessor ) ;
228228 Assert . Equal ( PaymentMethodTypeEnum . pisp , pispAttempts . First ( ) . PaymentMethod ) ;
You can’t perform that action at this time.
0 commit comments