Skip to content

[ADD] pos_payment_pax_terminal_pywebdriver - #19

Open
P-H-Phuc wants to merge 1 commit into
18.0from
18.0-add-pos_payment_pax_terminal_pywebdriver
Open

[ADD] pos_payment_pax_terminal_pywebdriver#19
P-H-Phuc wants to merge 1 commit into
18.0from
18.0-add-pos_payment_pax_terminal_pywebdriver

Conversation

@P-H-Phuc

@P-H-Phuc P-H-Phuc commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Integrating with PAX Terminal via pywebdriver

PAX TERMINAL

  • A fake-pax-terminal: https://github.com/P-H-Phuc/fake-pax-terminal
Amount rules:
    < 5000 cents  →  DECLINED
    > 50000 cents  →  wait 5s → APPROVED
    5000–50000 cents  →  instant APPROVED

> Terminal info: http://127.0.0.1:10009
> UI: http://127.0.0.0:5000

PYWEBDRIVER

  • I created a pax-driver in my fork pywebdriver https://github.com/P-H-Phuc/pywebdriver/pull/1, in config.ini:
[pax_driver]
terminal_ip=127.0.0.1
terminal_port=10009
use_https=false
timeout=120

> Running on http://127.0.0.1:8069

Pax Terminal is connected
image

POS PAYMENT PAX TERMINAL

  1. Go to Point of Sale > Configuration > Payment Methods
image
  1. Go to Point of Sale > Configuration > Settings
  • Add payment method to POS
image
  • Config IOT Box
image
  • Create an order and pay with PAX Card
image

AUDIT

  • In fake-pax-terminal:
image
  • pywebdriver log:
image

@P-H-Phuc
P-H-Phuc force-pushed the 18.0-add-pos_payment_pax_terminal_pywebdriver branch from 9ef07fe to ae70449 Compare July 21, 2026 10:53
const amountFloat = line.amount;
const orderId = order.name.replace(/\s/g, "").replaceAll("-", "").toUpperCase();
const pywebdriverUrl =
this.env.services.hardware_proxy.host || "http://127.0.0.1:8069";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@P-H-Phuc I noticed there is a bug here, this.env.services.hardware_proxy.host is always empty ("") even though I set url for IoT Box

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anothingguy, thank you for you response, I updated!

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good now

@P-H-Phuc
P-H-Phuc force-pushed the 18.0-add-pos_payment_pax_terminal_pywebdriver branch from ae70449 to 57a1ff4 Compare July 24, 2026 09:32
@anothingguy

Copy link
Copy Markdown

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants