1. Go to this page and download the library: Download asciisd/cashier-tap 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/ */
asciisd / cashier-tap example snippets
namespace App;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Asciisd\Cashier\Billable;
class User extends Authenticatable {
use Billable;
}
try{
//allowed payment methods is ['src_kw.knet', 'src_all', 'src_card']
$payment_method = 'src_card';
$payment = $user->charge(10, $payment_method);
$payment->url; // this will return payment link
} catch(\Asciisd\Cashier\Exceptions\PaymentActionRequired $exception) {
$payment = $exception->payment;
}
return $payment->actionUrl();
bash
php artisan cashier:install
bash
php artisan cashier:publish
bash
php artisan migrate
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.