Upgrading to SPI 2.8

To upgrade to this version of SPI from a lower version, you will need to make a few changes.

SPI Client 2.8 is a major release that require changes for Get Last Transaction when upgrading to 2.8 from any versions other SPI Client versions.

As part of improving the resiliency between EFTPOS Terminal and POS, we have replaced Get Last Transaction with Get Transaction which require an additional parameter posRefId.

Breaking Change:

  • Get Last Transaction InitiateGetLastTx() have now been replaced by Get Transaction **InitiateGetTx(posRefId)
  • As part of this improvement, GltMatch will no longer be required and needs to be removed
  • GetTransactionResponse() will now replace GetLastTransactionResponse()
// replace SpiClient.InitiateGetLastTx()
// posRefId is the posRefId of your last transaction
var res = SpiClient.InitateGetTx(posRefId);
// to handle the response, remove GltMatch as it is no longer required
private void HandleFinishedGetTransaction(TransactionFlowState txState)
{
  if (txState.Response != null)
  {
    var gtResponse = new GetTransactionResponse(txState.Response);

    if (gtResponse.Success)
    {
			// transaction retrieved successfully
    }
    else
    {
      // could not retrieve transaction
    }
  }
  else
  {
    // failure
  }
}