Skip to content

feat(gateway): add Tpay (Poland) payment gateway - #13

Merged
Panelica merged 3 commits into
Panelica:mainfrom
hedon77:feat/tpay-gateway
Sep 1, 2026
Merged

feat(gateway): add Tpay (Poland) payment gateway#13
Panelica merged 3 commits into
Panelica:mainfrom
hedon77:feat/tpay-gateway

Conversation

@hedon77

@hedon77 hedon77 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Adds a Tpay payment gateway module (Poland) using the Tpay Open API.

What's included

  • \modules/Gateways/Tpay/TpayModule.php\ — redirect-based integration (BLIK, quick transfers, cards):
    • OAuth2 client-credentials token (/oauth/auth, \scope=write)
    • create transaction (\POST /transactions) + redirect to Tpay panel
    • refund (\POST /transactions/{id}/refunds)
    • webhook processing with mandatory JWS signature verification (RFC 7515, x5u cert + Tpay root CA) and md5sum check
    • gateway activity written to the panel's system log (\gateway_logs)
  • Routes: \gateway/tpay/webhook\ and \gateway/tpay/capture/{invoice}\
  • Controller methods \ pay()\ / \ payCapture()\
  • Registration in \ModuleServiceProvider\ and \payment_method.tpay\ labels (en/pl)
  • Auth coverage for the new capture endpoint in \GatewayCaptureAuthTest\

Config fields

  • \client_id\ / \client_secret\ (Open API keys)
  • \confirmation_code\ (security code for md5sum)
  • \sandbox\ (live/sandbox toggle)

@Panelica

Copy link
Copy Markdown
Owner

Excellent, self-contained module that follows the existing gateway pattern and even extends the capture-auth test. One note: the webhook requires the md5sum, which is derived from the security code, so confirmation_code is effectively required despite being marked optional — worth documenting or validating. Great work.

@hedon77

hedon77 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

Good catch — marked confirmation_code as required in the config fields, since the webhook md5sum derives from it.

@Panelica
Panelica merged commit f02f450 into Panelica:main Sep 1, 2026
1 check passed
Panelica pushed a commit that referenced this pull request Sep 1, 2026
Add a CHANGELOG entry for the merged billing/extensibility work (#14 tax
model, #22 addon settings framework, #13 Tpay gateway, #16 client-delete
security fix, #24 invoice number display) and list Tpay in the modules
table and gateway overview.
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