The Transmit service is responsible for forwarding the message information generated by the ECR (Electronic Cash Register) to the payment application.
Through this service, the ECR can seamlessly transmit payment requests, transaction data, and other information to the payment system, ensuring a smooth and efficient payment process.
The service ensures stable forwarding of the messages while supporting compatibility across different payment applications, ensuring data accuracy and consistency during the transaction process.
Transport address.
Maximum time in seconds of transmission.
Message to send.
Defines the timeout to receive an answer.
Unique identification of the partner that is the recipient of the message exchange.
For example, the POS SN
Result of the requested transaction.
Detail of the response.
Additional information to be logged for further examination.
When you receive the terminal result through the SDK callback interface and TransmissionResult.response = SUCC, you can obtain additional received message.
Content of a message received from another party, system, or process.
TransmissionParam param = TransmissionParam.newBuilder()
.destinationAddress("192.168.1.2")
.maximumWaitingTime(60L)
.messageToSend(new byte[1])
.build();
RetailerManager.provideDeviceService()
.newTransmissionExchange(param)
.startAsyncExchange(new Exchange.RetailerSDKCallback<TransmissionResult>() {
@Override
public void onError(int code, String msg) {
Logger.e(TAG, "Transmission failed: " + code + ", " + msg);
}
@Override
public void onResult(TransmissionResult result) {
Logger.i(TAG, "Transmission result: " + GsonUtils.toJson(result));
}
});using System;
using PayExplorerConnect;
public void HandleTransmissionError(int code, string message)
{
Console.WriteLine($"Error: {code}, Message: {message}");
}
public void HandleTransmissionResult(TransmissionResult result)
{
Console.WriteLine($"Response: {result.Response}");
}
public string StartTransmission()
{
// Set the address, payload, and timeout for your target service.
TransmissionParam param = new TransmissionParam.Builder()
.DestinationAddress("192.168.1.2")
.MaximumWaitingTime(60)
.MessageToSend(new byte[1])
.Build();
string exchangeId = RetailerManager
.ProvideDeviceService()
.NewTransmissionExchange(param)
.StartAsyncExchange(
HandleTransmissionResult,
HandleTransmissionError);
return exchangeId;
}#import <PayExplorerConnect/RetailerManager.h>
#import <PayExplorerConnect/TransmissionParam.h>
// Replace the address and payload with the receiving application's values.
TransmissionParam *params = [[TransmissionParam alloc] init];
params.destinationAddress = @"192.168.1.2";
params.maximumTransmissionTime = @"60";
params.maximumWaitingTime = @"60";
params.messageToSend = @"PING";
[[RetailerManager sharedManager] transmission:params block:^(NSString *exchangeId) {
// Save the exchange ID to track this request.
} result:^(id result, NSInteger errcode, NSString *msg) {
if (errcode != 0 && result == nil) {
// Handle request error.
return;
}
TransmissionResult *transmissionResult = (TransmissionResult *)result;
// Handle transmission result.
}];