plusinfolab/dodo-cashier

Laravel Package for Dodo Payments

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 1

pkg:composer/plusinfolab/dodo-cashier

v0.1 2025-11-15 04:19 UTC

This package is auto-updated.

Last update: 2025-11-27 11:40:01 UTC


README

  1. add the Billable trait to your billable model definition.
use Laravel\Cashier\Billable;
 
class User extends Authenticatable
{
    use Billable;
}
  1. API Keys
DODO_PAYMENT=YOUR_API_KEY
DODO_SANDBOX=true
DODO_WEBHOOK_SECRET=YOUR_WEBHOOK_KEY
  1. You can create check using below code
 $user->newSubscription('default', 'prod_id')
            ->setBilling($billing)
            ->setReturnUrl(route('user.dashboard'))
            ->create();
  1. Exclude dodo/* from CSRF protection bootstrap/app.php file for Laravel 11
->withMiddleware(function (Middleware $middleware) {
    $middleware->validateCsrfTokens(except: [
        'dodo/*',
    ]);
})