Skip to content

Commit 2e5b482

Browse files
Merge pull request #1769 from TransactionProcessing/bug/#1768_seriasation_bug_in_prepayproxy
Use camelCase for MeterResponse deserialization
2 parents 25666e1 + 2b592d1 commit 2e5b482

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

TransactionProcessor.BusinessLogic.Tests/OperatorInterfaces/PataPawaPrePayProxyTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public async Task PataPawaPrePayProxy_ProcessSaleMessage_MeterTransaction_Failed
134134

135135
MeterResponse meterResponse = new MeterResponse { Status = -1, Code = "1", CustomerName = "Customer", Msg = "msg" };
136136

137-
this.MockHttpMessageHandler.When("http://localhost").Respond("application/json", StringSerialiser.Serialise(meterResponse));
137+
this.MockHttpMessageHandler.When("http://localhost").Respond("application/json", StringSerialiser.Serialise(meterResponse, new SerialiserOptions(SerialiserPropertyFormat.CamelCase)));
138138

139139
var result = await this.PataPawaPrePayProxy.ProcessSaleMessage(TestData.TransactionId,
140140
TestData.OperatorId, TestData.Merchant, TestData.TransactionDateTime, TestData.TransactionReference,

TransactionProcessor.BusinessLogic/OperatorInterfaces/PataPawaPrePay/PataPawaPrePayProxy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ private Result<OperatorResponse> CreateFromLogon(String responseContent){
183183

184184
private Result<OperatorResponse> CreateFromMeter(String responseContent)
185185
{
186-
MeterResponse meterResponse = StringSerialiser.Deserialise<MeterResponse>(responseContent);
186+
MeterResponse meterResponse = StringSerialiser.Deserialise<MeterResponse>(responseContent, new SerialiserOptions(SerialiserPropertyFormat.CamelCase));
187187

188188
if (meterResponse.Status != 0)
189189
{

0 commit comments

Comments
 (0)