The POS interface to older PCEFTIPInterface
and the newer PCEFTPOS.EFTClient.IPInterface
is virtually identical. In most cases updating from the older interface to the new one should only take a few minutes.
PCEFTPOS.EFTClient.IPInterface
currently targets .NET Framework 4.5.2, and will support .NET Standard 2.0. (.NET Framework 4.5.2 will be maintained in a separate branch)
- Support for PC-EFTPOS Cloud PIN pads
- NuGet integration
- Targets a more recent .NET Framework
- Bug fixes and performance improvements
The namespace has changed.
- Change
using PCEFTIPInterface;
tousing PCEFTPOS.EFTClient.IPInterface;
- Build the
IPInterface
library and add it to your project, or add a reference to thePCEFTPOS.EFTClient.IPInterface
NuGet package.
Some request & response objects were names inconsistently in the old PCEFTIPInterface
.
- Prepend "EFT" to request and response objects. e.g.
QueryCardResponse
becomesEFTQueryCardResponse
The event signature has changed.
void OnTransaction(object sender, EFTClientIPEventArgs e)
{
string responseCode = e.EFTTransaction.SuccessResponse.ResponseCode;
string responseText = e.EFTTransaction.SuccessResponse.ResponseText;
bool success = e.EFTTransaction.SuccessResponse.Success;
string cardType = e.EFTTransaction.CardType;
string accountType = e.EFTTransaction.CardAccountType.ToString();
}
becomes
void OnTransaction(object sender, EFTEventArgs<EFTTransactionResponse> e)
{
string responseCode = e.Response.ResponseCode;
string responseText = e.Response.ResponseText;
bool success = e.Response.Success;
string cardType = e.Response.CardType;
string accountType = e.Response.CardAccountType.ToString();
}
- Move property references from EFTClientIP into the request
- bool ReceiptAutoPrint is now enum ReceiptPrintMode
- bool CutReceipt is now enum ReceiptCutMode
e.g.
// Set global properties
eftClientIP.ReceiptAutoPrint = false;
eftClientIP.CutReceipt = false;
eftClientIP.Application = TerminalApplication.EFTPOS;
// Create the request
EFTTransactionRequest request = new EFTTransactionRequest()
{
Type = TransactionType.PurchaseCash,
AmountPurchase = 1.00
}
// Send the request
bool successful = eftClientIP.DoTransaction(request);
becomes
// Create the request
EFTTransactionRequest request = new EFTTransactionRequest()
{
Type = TransactionType.PurchaseCash,
AmountPurchase = 1.00,
ReceiptPrintMode = ReceiptPrintModeType.POSPrinter,
ReceiptCutMode = ReceiptCutModeType.Cut,
Application = TerminalApplication.EFTPOS
}
// Send the request
bool successful = eftClientIP.DoTransaction(request);
This function name has changed. eftClientIP.Stop();
is now eftClientIP.Disconnect();
EFTClientIP.LogFile has been removed. The POS can now capture logs from EFTClientIP
using the EFTClientIP.OnLog
event.