Reversal Request

Examples of ReversalRequest can be seen below.

PosClientService _posClientService = new PosTcpClientService(ipAddress: "127.0.0.1", port: 5002);

//Optional: TransactionConfig can also be set via configuration files, see "Configuration files" documentation for more information.
_posClientService.TransactionConfig = new Credential
{
    CustomerCode = "ABF",
    Site = "PXP000000001",
    Workstation = "001",
    Merchant = "1234567890",
    Username = "PXPUser",
    Password = "Testing",
    Culture = "en"
};

//Optional: PedConfig can also be set via configuration files, see "Configuration files" documentation for more information.
_posClientService.PedConfig = new PedEndpointAddress
{
    EndpointAddressType = PedEndpointAddressType.Serial,
    SerialEndpointAddress = new SerialEndpointAddress
    {
        ComPort = "com9"
    }
};

var reversalRequest = new ReversalRequest() {
	Workstation = "001",
	Currency = "GBP",
	Amount = 10.50M,
	OriginalTransactionReference = "OriginalTransactionReference",
	TokenisedCardNumber = "9919000000000150011",	
};

var reversalResponse = await _posClientService.ProcessAsync(reversalRequest);

Console.WriteLine(reversalResponse.ResponseCode);
Console.WriteLine(reversalResponse.ResponseMessage);
Console.WriteLine(reversalResponse.FaultResponseCode);
Console.WriteLine(reversalResponse.CaptureMethod);
Console.WriteLine(reversalResponse.AuthorityCode);
Console.WriteLine(reversalResponse.AuthorityMethod);
Console.WriteLine(reversalResponse.OriginalTransactionReference);
Console.WriteLine(reversalResponse.PEDSerialNumber);
Console.WriteLine(reversalResponse.Token);
Console.WriteLine(reversalResponse.TokenisedCardNumber);
Console.WriteLine(reversalResponse.ReceiptXML);
PosClientService _posClientService = new PosTcpClientService();

var reversalRequest = new ReversalRequest() {
	Workstation = "001",
	Currency = "GBP",
	Amount = 10.50M,
	Token = "31cb1b89-a082-4d0d-8724-68b19e26ef94"
};

varreversalResponse = _posClientService.ProcessAsync(reversalRequest).Result;

Console.WriteLine(reversalResponse.ResponseCode);
Console.WriteLine(reversalResponse.ResponseMessage);
Console.WriteLine(reversalResponse.FaultResponseCode);
Console.WriteLine(reversalResponse.CaptureMethod);
Console.WriteLine(reversalResponse.AuthorityCode);
Console.WriteLine(reversalResponse.AuthorityMethod);
Console.WriteLine(reversalResponse.OriginalTransactionReference);
Console.WriteLine(reversalResponse.PEDSerialNumber);
Console.WriteLine(reversalResponse.Token);
Console.WriteLine(reversalResponse.TokenisedCardNumber);

The following tables contain ReversalRequest objects and their detailed definitions. The field definitions are divided into request fields and response fields.

ReversalRequest

Field Name Type (C#) Mandatory Description
Workstation string Yes This is the workstation number, a unique workstation ID allocated to a workstation when the service is set up
Currency string Yes This is the currency of the transaction. This is the currency code. A three character code in accordance with ISO 4217
Amount decimal Yes This is the monetary value of the transaction in minor units
OriginalTransactionReference  string Yes This is the original reference of the preauthorisation transaction that top up amount will be added up to
TokenisedCardNumber string Yes This is the tokenised card number returned from PXP from a previous transaction
Token string Yes This is the token generated by ANYpay to uniquely identify a transaction

ReversalResponse

Field Name Type (C#) Mandatory Description
ResponseCode string Yes This is the response code indicating the result of the processing operation
ResponseMessage  string Yes This is the human readable message from either the acquirer or the ANYpay service that describes the Response Code
FaultResponseCode  int Yes This is the code indicating the reason when the response code is an "Error"
CaptureMethod Enum Yes The card data capture method
AuthorityCode string  Yes This is the authorization code provided by the acquirer, card issuer or ANYpay
AuthorityMethod Enum  Yes This is the method used to authorize the transaction
OriginalTransactionReference string Yes This is the original reference of the preauthorisation transaction that top up amount will be added up to
PEDSerialNumber string Yes This is the serial number of the Pin Entry Device
Token  string  Yes This is the token generated by ANYpay to uniquely identify a transaction
TokenisedCardNumber string Yes This is the tokenised card number returned from PXP from a previous transaction
ReceiptXML string Yes This is an XML receipt which complies EMV receipt requirement. This following page lists objects and their detailed definitions of each XML parameter.