- How do I install tomatophp/tomato-payments in a Laravel app?
- Install it with Composer using composer require tomatophp/tomato-payments. Then publish the package config and migrations with the vendor:publish command and run php artisan migrate. Check the README for the exact publish tags and any optional assets before wiring it into your checkout flow.
- Which payment gateways does Tomato Payments support?
- Tomato Payments is built around gateway drivers, so it provides a consistent API for transactions, refunds, and payment methods while letting you plug in supported providers. The README is the source of truth for the current driver list, so confirm your gateway there before assuming it is included. If your provider is not covered, you can implement a custom driver against the package API.
- Does tomato-payments work with Laravel 10, 11, or 12?
- Laravel version support is defined by the package composer.json requirements, so check those constraints against your application before installing. TomatoPHP packages generally target modern Laravel releases, but you should verify the exact Laravel and PHP versions in the repository. Testing in a staging app is the safest way to confirm compatibility.
- How do I publish and run the migrations for tomato-payments?
- The package ships with migrations so payment-related tables are ready to use. Publish them using Laravel's vendor:publish command, then run php artisan migrate. Review the migration files before deploying to production, especially if you already have transaction or payment method tables.
- How do I create a transaction or refund with the Tomato Payments API?
- Use the package payment services or facade to create transactions, charge customers, and issue refunds through the configured gateway driver. The overview highlights a clean API for transactions, refunds, and payment methods, with exact method names documented in the README. Wrap calls in try/catch and persist the gateway response so you can audit and reconcile payments later.
- How do I configure gateway credentials for tomato-payments?
- Publish the package config file and set credentials through environment variables rather than hardcoding keys. Keep sandbox and production credentials separate, and run php artisan config:cache after updating production environment values. Different gateway drivers may require their own keys, so review the driver notes in the README.
- Does Tomato Payments support payment methods and saved cards?
- Yes, the package overview includes payment methods alongside transactions and refunds, so you can manage methods through the same API. Whether saved cards or tokenization are available depends on the specific gateway driver you configure. Check your gateway driver documentation for stored payment method support.
- Can I use tomato-payments outside TomatoPHP in a standard Laravel project?
- It is a Laravel package installed via Composer, so it can be used in a standard Laravel application even though it is designed for TomatoPHP projects. If the service provider is not auto-discovered, register it manually in your application bootstrap. Review the package dependencies to make sure they fit your existing stack.
- How do I test payments without hitting a live gateway?
- Use your payment gateway sandbox or test credentials and keep them in a separate testing environment. Write feature tests around your checkout and refund services, and use Laravel HTTP fakes where the driver makes external calls. Avoid running automated tests against live gateway endpoints or real cards.
- Is tomato-payments maintained, and what are the alternatives?
- Check the GitHub repository releases, commit history, and Packagist activity to judge current maintenance before adopting it. Common alternatives include Laravel Cashier for Stripe or Paddle subscriptions, Omnipay for gateway abstraction, or direct provider SDKs. Tomato Payments is a good fit when you want a driver-based payments API that integrates with TomatoPHP.