File tree Expand file tree Collapse file tree 4 files changed +28
-1
lines changed
src/CheckoutSdk/Issuing/Transactions/Responses Expand file tree Collapse file tree 4 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public class Messages
1717
1818 public IndicatorType ? Indicator { get ; set ; }
1919
20- public string DeclinedReason { get ; set ; }
20+ public string DeclineReason { get ; set ; }
2121
2222 public long ? BillingAmount { get ; set ; }
2323
Original file line number Diff line number Diff line change 4141 <None Update =" Resources\KnetResponse.json" >
4242 <CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
4343 </None >
44+ <None Update =" Resources\IssuingTransactionsDeclinedReason.json" >
45+ <CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
46+ </None >
4447 </ItemGroup >
4548 <ItemGroup >
4649 <Content Include =" Resources\AppSettingsPreviousTest.json" >
Original file line number Diff line number Diff line change 66using Checkout . Issuing . Controls ;
77using Checkout . Issuing . Controls . Requests . Create ;
88using Checkout . Issuing . Controls . Responses . Create ;
9+ using Checkout . Issuing . Transactions . Responses ;
910using Checkout . Payments . Contexts ;
1011using Checkout . Payments . Response ;
1112using Checkout . Payments . Response . Source ;
@@ -119,6 +120,17 @@ public void ShouldDeserializeDefaultCardCTypeResponse()
119120 cardDetailsResponse . Type . ShouldBe ( CardType . Physical ) ;
120121 }
121122
123+ [ Fact ]
124+ public void ShouldDeserializeIssuingTransactionsDeclinedReasonResponse ( )
125+ {
126+ var fileContent = GetJsonFileContent ( "./Resources/IssuingTransactionsDeclinedReason.json" ) ;
127+ Messages messages =
128+ ( Messages ) new JsonSerializer ( ) . Deserialize ( fileContent ,
129+ typeof ( Messages ) ) ;
130+ messages . ShouldNotBeNull ( ) ;
131+ messages . DeclineReason . ShouldBe ( "velocity_reached" ) ;
132+ }
133+
122134 [ Fact ]
123135 public void ShouldDeserializeKnetResponse ( )
124136 {
Original file line number Diff line number Diff line change 1+ {
2+ "id" : " msg_abatreternbygkaeqqter6gs4de" ,
3+ "initiator" : " cardholder" ,
4+ "type" : " authorization" ,
5+ "result" : " declined" ,
6+ "is_relayed" : false ,
7+ "indicator" : " normal_authorization" ,
8+ "decline_reason" : " velocity_reached" ,
9+ "billing_amount" : 1000056 ,
10+ "billing_currency" : " GBP" ,
11+ "created_on" : " 2025-04-07T11:48:57.0000000Z"
12+ }
You can’t perform that action at this time.
0 commit comments