POS Proxy is a web server that redirects json requests to a POS terminal connected via USB. You can also use this example to see how to integrate the Payneteasy mPOS SDK to your java application.
- Client - a client code to start a payment
- POS Proxy - this application
- gate.payneteasy.com - Our authorisation server
- Merchant site - we can make a callback to your server with a final order status
- Run the application
- Go to the http://0.0.0.0:8081/pos-proxy/swagger-ui
Please see the video below:
- Install swagger-codegen from https://github.com/swagger-api/swagger-codegen
- Run swagger-codegen with your language
swagger-codegen generate -i http://0.0.0.0:8081/pos-proxy/swagger-ui/pos-proxy.json -l java
docker run -it -p 8081:8081/tcp payneteasy/pos-proxy:amd64
docker run -it -p 8081:8081/tcp payneteasy/pos-proxy:arm64v8
docker run -it -p 8081:8081/tcp payneteasy/pos-proxy:arm32v7
- Java 1.8 (Oracle or OpenJDK)
./mvnw clean package
cd server/target && java -jar server-1.3-SNAPSHOT-jar-with-dependencies.jar
wget https://github.com/payneteasy/pos-proxy/releases/download/1.3.0/pos-proxy-1.3.0.jar
java -jar server-1.0-1-SNAPSHOT-jar-with-dependencies.jar
You can change the listening port by pass this via -D option or via environment variable.
Via environment variable:
export HTTP_SERVER_PORT=9090
java -jar server-1.3-SNAPSHOT-jar-with-dependencies.jar
Via -D option:
java -DHTTP_SERVER_PORT=9090 -jar server-1.3-SNAPSHOT-jar-with-dependencies.jar
Run socat program to listen 27016 tcp port and redirects all tcp packets to a tty device.
socat -d -d -v -x tcp4-listen:27015,reuseaddr,fork file:/dev/ttyACM0,nonblock,echo=0,raw