Download the PHP package fintechsystems/payfast-onsite-subscriptions without Composer

On this page you can find all versions of the php package fintechsystems/payfast-onsite-subscriptions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package payfast-onsite-subscriptions

About Payfast Onsite Subscriptions

GitHub release (latest by date) Tests GitHub Downloads

A Payfast Onsite Payments implementation for Laravel designed to ease subscription billing. Livewire views are included.

Requirements:

If you want to use Laravel Nova, version 4 is required for the Subscription and Receipt resources.

Installation

Install the package via composer:

If you don't have Sanctum already:

Publish Configuration and Views

Publish the config file with:

Publish the Success and Cancelled views and the Livewire components for subscriptions and receipts.

These files are:

Setup

Add the Billable() trait to your user model.

In your header

To include the pricing component on a page, do this:

In your header:

In your view:

Nova Integration

Optionally publish Laravel Nova Subscription and Receipts Resources and Actions

Migrations

A migration is needed to create Customers, Orders, Receipts and Subscriptions tables:

Example Configuration

config/payfast.php:

Livewire setup

Views

The Livewire views are modelled to blend into a Laravel Jetstream user profile page.

Adding a billing menu

In app.blade.php below in the Account Management sections (e.g., below profile):

Also look for the responsive part and add this:

Adding the subscriptions and receipts views

When calling the Livewire component, you can override any PayFast form field by specifying a mergeFields array.

Example modification Jetstream Livewire's resources/views/profiles/show.php:

Replace $user->name with your first name and last name fields.

Usage

Examples

Testing

How to determine when a user's subscription ends

$user->subscription('default')->ends_at = [date in the past]

In your main project, add this:

Then do this to symlink the library:

If you want to test trials, use this one-liner to activate a billable user and a trial using Tinker:

To see if a user is on trial as used in the subscriptions blade, do this:

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of payfast-onsite-subscriptions with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
symfony/dotenv Version *
livewire/livewire Version *
moneyphp/money Version *
spatie/ray Version *
nunomaduro/collision Version *
guzzlehttp/guzzle Version *
guzzlehttp/psr7 Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fintechsystems/payfast-onsite-subscriptions contains the following files

Loading the files please wait ....