Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,30 @@ public async Task<ProcessLogonTransactionResponse> ProcessLogonTransaction(Guid
{
TypeNameHandling = TypeNameHandling.All
});
ProcessLogonTransactionResponse response = new ProcessLogonTransactionResponse();

SerialisedMessage responseSerialisedMessage = await this.TransactionProcessorClient.PerformTransaction(accessToken.AccessToken, requestSerialisedMessage, cancellationToken);
try
{
SerialisedMessage responseSerialisedMessage =
await this.TransactionProcessorClient.PerformTransaction(accessToken.AccessToken, requestSerialisedMessage, cancellationToken);

LogonTransactionResponse logonTransactionResponse = JsonConvert.DeserializeObject<LogonTransactionResponse>(responseSerialisedMessage.SerialisedData);
LogonTransactionResponse logonTransactionResponse = JsonConvert.DeserializeObject<LogonTransactionResponse>(responseSerialisedMessage.SerialisedData);

ProcessLogonTransactionResponse response = new ProcessLogonTransactionResponse
{
ResponseCode = logonTransactionResponse.ResponseCode,
ResponseMessage = logonTransactionResponse.ResponseMessage
};
response = new ProcessLogonTransactionResponse
{
ResponseCode = logonTransactionResponse.ResponseCode,
ResponseMessage = logonTransactionResponse.ResponseMessage
};
}
catch(Exception ex)
{
if (ex.InnerException is InvalidOperationException)
{
// This means there is an error in the request
response.ResponseCode = "0001"; // Request Message error
response.ResponseMessage = ex.InnerException.Message;
}
}

return response;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ Scenario: Logon Transaction
| DateTime | TransactionNumber | TransactionType | MerchantName | IMEINumber | EstateName |
| Today | 3 | Logon | Test Merchant 3 | 123456789 | Test Estate 2 |

# TODO: Add in once the logon flow is implemented
Then transaction response should contain the following information
| EstateName | MerchantName | TransactionNumber | TransactionType | ResponseCode | ResponseMessage |
| Test Estate 1 | Test Merchant 1 | 1 | Logon | 0000 | SUCCESS |
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.