Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

Installation & Testing

  1. Build and Run the Backend Wavelet POS Software.

  2. Install Postman from this link

    image-20241217-065332.png
  3. Create HTTP requests for each endpoint.

    1. Click on New > HTTP

      image-20241217-065627.pngimage-20241217-065641.png
    2. Select the appropriate request method and enter the specific endpoint prefixed with http://localhost:8085

      image-20241217-065826.png
  4. Connect POS Terminal to the SAME Wi-Fi Network as the device running the Backend Wavelet POS Software. Note down the IP Address of the Wi-Fi Network.

  5. From the POS Terminal, go to Management > Config. Input the password as ‘88888888’. Go to EDC. Then scroll down to TCP/IP and note down the TCP/IP Port (which is going to be 8080).

  6. For each of the HTTP requests created in Postman, do the following:

    1. Set the terminalIp parameter to the IP Address of the Wi-Fi Network

    2. Set the terminalPort parameter to the TCP/IP Port (which is going to be 8080)

    3. Set the terminalId Parameter to the unique identifier for each POS Terminal

    4. If there are any additional parameters for that specific HTTP request, add them.

  7. Send the respective HTTP request.

API Documentation

GET /ping

/revenue-terminals/ping

Pings the terminal to establish a WebSocket connection.

Parameters should be passed as query parameters.

terminalIp

The IP address of the terminal

terminalPort

The port number of the terminal for the connection

terminalId

An identifier for the terminal

POST /card-sale

/revenue-terminals/card-sale

Processes a card sale transaction.

Parameters should be passed as query parameters.

terminalIp

The IP address of the terminal

terminalPort

The port number of the terminal for the connection

payAmount

The monetary amount of the card sale transaction (in decimal format)

terminalId

An identifier for the terminal

POST /my-debit-sale

/revenue-terminals/my-debit-sale

Processes a debit sale transaction.

Parameters should be passed as query parameters.

terminalIp

The IP address of the terminal

terminalPort

The port number of the terminal for the connection

payAmount

The monetary amount of the my debit sale transaction (in decimal format)

payAddAmount

The monetary amount of the my debit sale transaction (in decimal format) to be added

terminalId

An identifier for the terminal

POST /cancel-sale

/revenue-terminals/cancel-sale

Cancels the current sale transaction.

Parameters should be passed as query parameters.

terminalIp

The IP address of the terminal

terminalPort

The port number of the terminal for the connection

terminalId

An identifier for the terminal

POST /void-sale

/revenue-terminals/void-card-sale

Voids the current sale transaction.

Parameters should be passed as query parameters.

terminalIp

The IP address of the terminal

terminalPort

The port number of the terminal for the connection

traceNo

The trace number of the transaction to be voided

payAmount

The monetary amount of the sale transaction to be voided (in decimal format)

terminalId

An identifier for the terminal

POST /settlement

/revenue-terminals/settlement

Processes a settlement request.

Parameters should be passed as query parameters.

terminalIp

The IP address of the terminal

terminalPort

The port number of the terminal for the connection

terminalId

An identifier for the terminal

POST /qr-sale

/revenue-terminals/qr-sale

Processes a QR sale transaction.

Parameters should be passed as query parameters.

terminalIp

The IP address of the terminal

terminalPort

The port number of the terminal for the connection

payAmount

The monetary amount of the QR sale transaction (in decimal format)

terminalId

An identifier for the terminal

...