- How do I install sebdesign/laravel-viva-payments in a Laravel app?
- Install it with Composer using composer require sebdesign/laravel-viva-payments. The package ships a configuration file and a facade, so publish or define the config keys for your Viva Wallet merchant credentials and environment (demo or live) as described in the README. You then create payment orders through the facade or the underlying service classes; no custom service provider is required beyond Laravel's package auto-discovery.
- Does this package support Viva Wallet Smart Checkout?
- Yes. The package is built around the Viva Wallet Smart Checkout flow: you create a payment order, receive the payment URL or order code, and redirect the customer to complete the transaction. It wraps the Viva Payments HTTP API behind a facade and service classes so you do not have to hand-roll Guzzle calls.
- How do I configure Viva Payments credentials in Laravel?
- The package provides a configuration file where you set your Viva Wallet client credentials, merchant identifiers, and the target environment. Keep these values in your .env file and reference them from config so they are not committed to source control. Check the README for the exact key names and whether the config is publishable or read directly from the package.
- How do I create a payment order with the Viva facade?
- Create an order through the facade or the service class, passing the amount, currency, and order details required by the Smart Checkout flow. The returned response includes the identifiers you need to redirect the customer or check the transaction status later. For special cases you can pass per-request options to individual service methods, and those options take precedence over any global defaults.
- Is laravel-viva-payments safe to use with Laravel Octane or queue workers?
- Version 6.5.0 adds Viva::withRequestOptions() to seed Guzzle options for every outbound call, including the OAuth token request. That introduces process-wide mutable state on an otherwise stateless facade, so if the defaults are stored on a container singleton they could leak between requests or jobs in an Octane or long-lived worker context. Re-apply the options per request or at the start of each job rather than relying on a one-time boot-time call until you have confirmed the semantics with a test.
- How do I route Viva Payments requests through a proxy or custom CA bundle?
- Use Viva::withRequestOptions() with Guzzle options such as proxy, timeout, or verify pointing at your CA bundle. Call it in a service provider's boot() method so the defaults apply to every outbound call, including the access-token request that previously did not receive per-call options. Per-request options still override the defaults when you need to special-case a call.
- Which Laravel, PHP, and Guzzle versions does version 6.5.0 support?
- Version 6.5.0 is a minor, additive release, so a ^6.5 constraint is appropriate if you are already on 6.4.x. It runs on Guzzle 7 under the hood, but the exact Laravel and PHP version matrix should be confirmed against the package's composer.json and README before upgrading. Check that your Laravel and PHP versions satisfy those constraints in staging first.
- How can I test Viva Payments integration without hitting the live gateway?
- The package does not advertise a dedicated fake, so the usual approach is to mock the facade or swap the underlying HTTP client in your test suite. For end-to-end confidence, use the Viva Wallet demo environment with test credentials, and add a test that asserts your proxy or CA options reach the token request. That last test is the cheapest way to confirm the 6.5.0 behaviour in your environment.
- How do I handle Viva Payments webhooks and callbacks in Laravel?
- The package covers the Smart Checkout redirect and order flow, but callback and webhook verification are typically implemented in your own controller where you validate the payload before marking an order paid. Whether the new withRequestOptions() defaults apply to webhook handling is not explicitly documented in the 6.5.0 notes, so verify that path if you rely on a proxy or custom CA for all egress.
- Are there alternatives to sebdesign/laravel-viva-payments for Viva Wallet?
- You can use Viva Wallet's official SDKs or call the REST API directly with Guzzle, but you would then own the OAuth token handling, order creation, and error mapping yourself. This package is a thin Laravel wrapper providing a facade, configuration, and Smart Checkout helpers, which is a reasonable trade-off if you want less boilerplate. Evaluate whether its maintenance cadence and version support match your project before committing.