robinflyhigh / laravel-razor-pay-cashier
Laravel Cashier provides an expressive, fluent interface to Razorpay's subscription billing services.
Requires
- php: >=7.2
- illuminate/database: ^6.0 || ^7.0 || ^8.40
- illuminate/support: ^6.0 || ^7.0 || ^8.0
- nesbot/carbon: ^2.31
- razorpay/razorpay: ^2.2
- symfony/http-kernel: ^4.4 || ^5.1.5
Requires (Dev)
- illuminate/http: ^6.0 || ^7.0 || ^8.0
- illuminate/routing: ^6.0 || ^7.0 || ^8.0
- mockery/mockery: ^1.4.2
- vlucas/phpdotenv: ^5.2
- dev-master
- 2.1
- v2.0
- v1.0.11
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v0.1.1
- dev-dependabot/add-v2-config-file
- dev-analysis-wjZmeE
- dev-dependabot/composer/vlucas/phpdotenv-approx-5.0
- dev-analysis-9mkmdw
- dev-analysis-876RpZ
- dev-analysis-XVxE9P
- dev-analysis-8P7yno
- dev-analysis-q1vEpv
- dev-analysis-XW7NQN
This package is auto-updated.
Last update: 2024-12-08 17:02:39 UTC
README
Introduction
Laravel Cashier inspired Razorpay Cashier provides an expressive, fluent interface to Razorpay's subscription billing services. It handles almost all of the boilerplate subscription billing code you are dreading writing. In addition to basic subscription management, Cashier can handle subscription "quantities", cancellation grace periods.
Installation
composer require "msonowal/laravel-razor-pay-cashier"
Next, register the service provider in your config/app.php
configuration file.
Msonowal\Razorpay\Cashier\CashierServiceProvider
Environment Configurations
define these keys in config/services.php
'razorpay' => [
'model' => App\Models\User::class,
'key' => env('RAZORPAY_KEY'),
'secret' => env('RAZORPAY_SECRET'),
],
This will register a singleton which can be resolved by using razorpay
as a resolver
Official Documentation
TODO Documentation For time being you can follow laravel cashier's documentation for implementaion, and apis I have kept almost same signature with modifications to razorpay
.env
RAZORPAY_KEY=
RAZORPAY_SECRET=
RAZORPAY_MODEL=
Running Cashier's Tests Locally
TODO Add Invoicing generating PDF based on line items in application side
Contributing
Thank you for considering contributing to the Cashier. You can read the contribution guide lines here.
License
Laravel Cashier is open-sourced software licensed under the MIT license.