tastyigniter/ti-ext-payregister
PayRegister is a TastyIgniter payment extension supporting Cash On Delivery, Authorize Net AIM, PayPal Express, Stripe, Mollie, and Square, with saved payment profiles, refunds, seamless checkout, and easy gateway extensibility.
The ti-ext-payregister package (v4.4.0) retains its strong alignment with Laravel's service provider pattern, event-driven workflows, and queue-based async processing. The v4.1.2 Stripe webhook hardening (mandatory signing secret) remains in force and is now joined by a breaking Square SDK migration that shifts the integration from a builder-based pattern to sub-client instantiation—this is architecturally cleaner long-term but requires code-level adapter changes on the consuming side.
Key Strengths (Updated):
~47.0 SDK replaces legacy SquareClientBuilder with a sub-client structure (payments, customers, cards, refunds) — closer to idiomatic Laravel DI and easier to mock in tests.float before number_format, eliminating deprecation warnings and type errors on string inputs — reduces silent failures in invoice/refund flows.Updated Misalignment:
SquareClientBuilder will fail on upgrade. Must refactor to the new sub-client API.ti-ext-* module system; vanilla Laravel still needs adapter layers.~47.0 now required — verify composer.json lockstep with the package constraint.STRIPE_WEBHOOK_SECRET (unchanged from v4.1.2).Square\Client or SquareClientBuilder in custom code must migrate to SquareClient with sub-clients.$client->refunds->refund(...), $client->payments->create(...), etc.Feasibility Risks (Updated):
| Risk | Mitigation | Update (v4.4.0) |
|---|---|---|
| Square SDK Migration | Refactor all custom Square code to sub-client API. | High: Silent runtime failures if old builders remain. |
| Webhook Signature Validation (Stripe) | Use Stripe\Webhook::constructEvent() in middleware. |
Unchanged from v4.1.2. |
| Offsite Redirect UX | Ensure return_url routes handle ?session_id params. |
Unchanged. |
| Mollie Session Migration | Update queries to use payment_logs. |
Unchanged. |
| Queue Overload | Monitor queue:work; scale workers. |
Unchanged — Square refunds now flow through same pipeline. |
| Secret Management | Rotate secrets via Stripe Dashboard; use Laravel Envoy. | Unchanged. |
| New: Square Type Coercion | Verify float casting matches accounting expectations for refund/tip math. | Medium: May alter rounding in edge cases. |
| Risk Category | Description | Mitigation Strategy | Update (v4.4.0) |
|---|---|---|---|
| Square SDK Breakage | Legacy SquareClientBuilder and individual API classes removed in v47. |
Refactor to SquareClient sub-clients (payments, customers, cards, refunds). |
Critical: Breaking for custom code. |
| Webhook Reliability | Failed Stripe validations still crash (from v4.1.2). | Circuit breaker (spatie/laravel-circuitbreaker) on webhook routes. |
Unchanged. |
| PCI Compliance | Hardened secrets reduce scope; misconfigurations risk violations. | AWS Secrets Manager / Hashicorp Vault for dynamic secrets. | Unchanged. |
| Amount Type Coercion | Float casts for refund/order/tip amounts may change rounding on string inputs. | Regression-test refund math in staging with representative currencies. | Medium: New in v4.4.0. |
| Gateway-Specific Bugs | Square v47 and Stripe API changes may break validation. | Subscribe to Square + Stripe changelogs; test against sandboxes. | Unchanged. |
| Performance | Async processing may introduce latency; Square sub-clients add a small object-graph cost. | Optimize queue workers; reuse SquareClient instance across calls. |
Low: Negligible but monitor. |
| Customization Constraints | Extending gateways may require deep knowledge of new SDK. | Document extension points (PayRegister::extend()) and new Square sub-client usage. |
Unchanged. |
| Secret Rotation (Stripe) | Rotate every 6 months. | Automate with Laravel Horizon + Envoy. | Unchanged. |
Square Migration (NEW):
SquareClientBuilder or individual Square API classes directly? If yes, it must be refactored before upgrading.Security & Compliance (Stripe):
.env edits? Version-controlled?)Infrastructure:
Provider Strategy:
Migration Impact:
Operational Impact:
The package remains optimized for Laravel, but v4.4.0 adds a second breaking surface (Square) to the previously introduced Stripe constraint:
SquareClient instance; verify scoping (singleton vs. transient) to avoid re-instantiating per request.Compatibility Matrix (Updated):
| Laravel Feature | Package Support | Notes | Update (v4.4.0) |
|---|---|---|---|
| Service Container | ✅ Full | Gateways injected via app() or DI; SquareClient now DI-friendly. |
Improved: Sub-client structure better for DI. |
| Queues | ✅ (Stripe/Mollie/Square) | Requires queue:work for webhooks and Square async calls. |
Unchanged, but expect transient Square failures during cutover. |
| Events | ⚠️ Breaking | Stripe secret validation and Square sub-client refactor both required. | Critical: Two breaking surfaces now. |
| Middleware | ✅ Required | StripeWebhookMiddleware still mandatory. |
Unchanged. |
| Blade Templates | ✅ Partial | Offsite mode requires custom return_url templates. |
Unchanged. |
| Database | ⚠️ Optional | Payment logs table needed for Mollie; other gateways use sessions. | Unchanged. |
| Square SDK | ⚠️ Breaking | ~47.0 sub-client API required; legacy builders removed. |
New: Must audit and refactor. |
STRIPE_WEBHOOK_SECRET, config/payregister.php update, Envoy automation).StripeWebhookMiddleware remains required.SquareClientBuilder, Square\Apis\, Square\Api\.
grep -rn "SquareClientBuilder\|Square\\\\Apis\|Square\\\\Api\\\\" app/ packages/
$client->refunds->refund(...), etc.).new SquareClientBuilder()->build(new Configuration(...)).new SquareClient(getenv('SQUARE_ACCESS_TOKEN'), ['environment' => ...]).$client->payments, $client->customers, $client->cards, $client->refunds.composer.json pin to revert to prior version if v4.4.0 breaks production.Maintenance
~47.0 now has its own changelog cadence and deprecation cycle. TPM should subscribe the platform team to Square SDK release notes in addition to Stripe.Support
Scaling
SquareClient should be bound as a singleton in the service provider to avoid per-request instantiation cost across many small API calls.Failure Modes
SquareClientBuilder calls in custom code that compile but throw at runtime → refunds fail without obvious alerting. Mitigate with exception monitoring on Square gateway class.Ramp-Up
How can I help you explore Laravel packages today?