PHP code example of nafiswatsiq / subbase-payment

1. Go to this page and download the library: Download nafiswatsiq/subbase-payment library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nafiswatsiq / subbase-payment example snippets


use Filament\Panel;
use Filament\PanelProvider;
use Nafiswatsiq\SubbasePayment\SubbasePaymentPlugin;

class AdminPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            ->plugins([
                SubbasePlugin::make(),
                SubbasePaymentPlugin::make()
              ])
            // ... rest of your panel configuration
        ;
    }
}

'checkout' => [
    'path' => 'checkout',
    'middleware' => ['web'],
    'return_url' => null,  // named route or full URL after successful payment
    'cancel_url' => null,  // named route or full URL after canceled payment
],

'checkout' => [
    'return_url' => 'dashboard',
    'cancel_url' => 'plans.index',
],

'checkout' => [
    'return_url' => 'https://app.example.com/payment/success',
    'cancel_url' => 'https://app.example.com/payment/cancel',
],

'mail' => [
    'send_invoice' => true,
],
bash
php artisan subbase:install
bash
php artisan vendor:publish --tag=subbase-payment-config
bash
php artisan vendor:publish --tag=subbase-payment-migrations
bash
php artisan subbase-payment:install
bash
php artisan subbase-payment:install --driver=paypal
bash
php artisan subbase-payment:install --driver=paypal --no-interaction
bash
php artisan migrate
bash
php artisan subbase-payment:reset
blade
{{-- resources/views/pricing.blade.php --}}
<x-subbase::plan-list />
bash
php artisan subbase:theme-list
php artisan subbase:theme-install neo-brutalism
bash
php artisan vendor:publish --tag=subbase-payment-views
bash
php artisan vendor:publish --tag=subbase-payment-config
bash
php artisan vendor:publish --tag=subbase-payment-views