- What is ptuchik/braintree and do I need Laravel to use it?
- ptuchik/braintree is a Braintree gateway driver for Omnipay, the league/omnipay payment abstraction, published under a personal namespace. It is framework-agnostic PHP rather than a true Laravel package, so a Laravel application can consume it through Composer but should not assume a bundled service provider or facade. Verify the package contents before planning Laravel-specific wiring around it.
- How do I install and configure ptuchik/braintree in a Laravel app?
- Install it with composer require ptuchik/braintree and let Composer resolve the Omnipay dependency. You then create the gateway through Omnipay::create with the Braintree driver and pass merchantId, publicKey, privateKey, and testMode. Keep credentials in config or environment variables rather than code, and resolve the gateway from the container so it can be swapped or mocked in tests.
- Which Laravel and PHP versions does this Braintree driver support?
- There is no published CI matrix or version support table, so PHP and Laravel compatibility has to be read from the composer.json constraints and verified against your own runtime. Because this is a low-traffic fork, expect it to lag behind current PHP and Omnipay releases. Run the install and a sandbox transaction on your exact PHP version before committing to it.
- Which Omnipay version does ptuchik/braintree target, v2 or v3?
- It is a fork of the League's omnipay/braintree driver, so it targets whichever Omnipay major version upstream pinned at fork time. The v2 to v3 transition was a breaking change, and that constraint propagates directly into your upgrade path. Check the composer.json requirement and confirm it matches the Omnipay version the rest of your stack already uses.
- How is this different from the upstream omnipay/braintree driver?
- The two share an origin: this is a personal-namespace fork of omnipay/braintree, but the delta from upstream is not documented. The change could be a benign PHP 8 compatibility shim or something behavioural inside the payment path. Diff it against upstream and prefer the League-maintained driver unless the fork demonstrably closes a gap upstream does not.
- Is ptuchik/braintree safe and actively maintained for production payments?
- The signals are weak: zero stars, zero dependents, a single maintainer, and no visible test or CI evidence. Payment code is a high-consequence dependency, so adopting this makes you the first production consumer and the owner of defect discovery. If you proceed, pin the version, mirror the source, and keep a tested fallback to the official SDK.
- Does this driver support SCA, 3DS2, vaulting, and PayPal or Apple Pay?
- Omnipay's uniform interface deliberately hides gateway-specific surface area, so Braintree's vaulting tokens, 3DS2 and SCA challenge flows, and PayPal, Venmo, or Apple Pay channels either sit outside the model or leak through driver-specific parameters. Card creation and deletion are exposed through createCard and deleteCard, but the richer flows generally require the native braintree/braintree_php SDK. Confirm coverage on the sandbox before designing around it.
- Does it handle refunds, partial refunds, voids, and Braintree webhooks?
- The uniform Omnipay operations cover purchase, authorize, capture, refund, createCard, and deleteCard, which handles straightforward sale and full-refund flows. Partial refunds, voids, and webhook signature verification are gateway-specific and usually fall back to the native Braintree SDK. Webhook-driven subscription lifecycle handling is not something the abstraction provides.
- How do I test Braintree payments with this package?
- Point the gateway at Braintree sandbox credentials with testMode enabled for integration testing. For unit tests, bind your own PaymentGateway interface to Omnipay's mock or a stub HTTP client so tests never hit the network. Assert on the Omnipay response objects, such as isSuccessful, getMessage, and getTransactionReference, rather than on driver internals.
- Should I use this package, the official Braintree SDK, or Laravel Cashier?
- If Braintree is your only gateway, the official braintree/braintree_php SDK behind a thin internal adapter gives you the most control, vendor support, and the best documentation. Choose an Omnipay driver only when multi-gateway abstraction is a genuine requirement, and prefer the League-maintained omnipay/braintree over this fork. Laravel Cashier is not a current path for Braintree, so do not plan around it.