PHP code example of atacante / cashier-authorizenetpaisa

1. Go to this page and download the library: Download atacante/cashier-authorizenetpaisa 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/ */

    

atacante / cashier-authorizenetpaisa example snippets


Schema::table('users', function ($table) {
    $table->string('authorize_id')->nullable();
    $table->string('authorize_payment_id')->nullable();
    $table->string('card_brand')->nullable();
    $table->string('card_last_four')->nullable();
});

Schema::create('subscriptions', function ($table) {
    $table->increments('id');
    $table->integer('user_id');
    $table->string('name');
    $table->string('authorize_id');
    $table->string('authorize_payment_id');
    $table->text('metadata');
    $table->string('authorize_plan');
    $table->integer('quantity');
    $table->timestamp('trial_ends_at')->nullable();
    $table->timestamp('ends_at')->nullable();
    $table->timestamps();
});

'monthly-10-1' => [
    'name' => 'main',
    'interval' => [
        'length' => 1, // number of instances for billing
        'unit' => 'months' //months, days, years
    ],
    'total_occurances' => 9999, // 9999 means without end date
    'trial_occurances' => 0,
    'amount' => 9.99,
    'trial_amount' => 0,
    'trial_days' => 0,
    'trial_delay' => 0, // days you wish to delay the start of billing
]

'authorize' => [
    'model'  => App\User::class,
],

protected $commands = [
    \Laravel\CashierAuthorizeNet\Console\SubscriptionUpdates::class,
];

$schedule->command('subscription:update')->hourly();