Integrate POS with RS232

You can integrate POS with RS232 solution to initiate transactions from your Window/Linux computer.

Configure your OS

Perform the following steps to configure your Windows/Linux OS:

  1. Install Newland driver provided with the SDK kit.
  2. Connect N910 to windows/Linux machine.
  3. In app>settings, use the serial communication button to open/close the port.
  4. Create the transaction request data in JSON format as shown in the sample code snippet below.
{“amount”:”1000”,” paymentType”:”Sale”,”merchantRefNo”:”1234567890”} 

Initiate the transaction from OS

  • Read the sent data from the Windows/Linux OS by using the readData() function as shown in the code snippet below.
PaymentInitialization paymentInitialization = new PaymentInitialization(MainActivity.this, 
serialHandler); paymentInitialization.readData(DeviceCommunicationMode.SERIALCOMMUNICATION);
  • After reading the data successfully, PayU POS SDK will prompt to insert/swipe/tap the card and enter the pin (if required), and completes the transaction.
  • Once the transaction is completed, the response will be sent in JSON format.

Request parameters

String The transaction amount.2500
String The type of the transaction.
Supported payment modes are as follows:

Sale- For a sale transaction.

EMI- For a EMI transaction.

Void- For a void transaction.

PreAuth- For a preAuth transaction.

SaleComplete- For a preAuthComplete transaction.
String Merchant Invoice Reference Number or pass current date time stamp. [Max upto 40 characters ]123456


Watch Out!

Make sure you select the correct communication port else, the SDK will throw error, such as, Data read failed.

See shared response payload to learn about the relevant RESPONSE PARAMETERS.