Download the PHP package samsin33/laravel-razorpay without Composer
On this page you can find all versions of the php package samsin33/laravel-razorpay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-razorpay
Introduction
Razorpay package for laravel. Supports razorpay integration with laravel version 8.
Installation
Just install samsin33/laravel-razorpay package with composer.
It uses razorpay/razorpay package and will be installed automatically.
Database Migration
Razorpay service provider registers its own database migration directory, so remember to migrate your database after installing the package. The Razorpay migrations will add several columns to your customers and orders table as well as create new plans and subscriptions table to hold all of your customer's subscriptions:
If you need to overwrite the migrations that ship with this package, you can publish them using the vendor:publish Artisan command:
If you would like to prevent Razorpay's migrations from running entirely, you may use the ignoreMigrations method provided by Razorpay. Typically, this method should be called in the register method of your AppServiceProvider:
Env Configuration
Razorpay assumes your customer model will be the App\Models\User class that ships with Laravel. If you wish to change this you can specify a different model in your .env file:
Razorpay assumes your order model will be the App\Models\Order class that ships with Laravel. If you wish to change this you can specify a different model in your .env file:
Next, you should configure your Razorpay API keys in your application's .env file. You can retrieve your Razorpay API keys from the Razorpay control panel:
The default razorpay currency is Indian Rupee (INR). You can change the default currency by setting the RAZORPAY_CURRENCY environment variable within your application's .env file:
Model Configuration
Before using Razorpay, add the Billable trait to your customer model definition. Typically, this will be the App\Models\User model. This trait provides various methods to allow you to perform common tasks, such as fatching, creating and updating customer method information:
Before using Razorpay, add the Orderable trait to your order model definition. Typically, this will be the App\Models\Order model. This trait provides various methods to allow you to perform common tasks, such as fatching, creating and updating order method information:
Customers
Retrieving Customers
You can retrieve a customer by their Razorpay ID using the Razorpay::findBillable method. This method will return an instance of the billable model:
Creating Customers
You can create a Razorpay customer by using the createRazorpayCustomer method in a billable model:
You may use the getRazorpayCustomer method if you want to return the Razorpay customer object for a billable model:
Orders
Creating Orders
You can create a Razorpay order by using the createRazorpayOrder method in a orderable model:
You may use the getRazorpayOrder method if you want to return the Razorpay orders for a orderable model:
You may use the getRazorpayOrderPayments method if you want to return the Razorpay order payments for a orderable model:
All versions of laravel-razorpay with dependencies
ext-json Version *
illuminate/container Version ^7.0|^8.0
illuminate/contracts Version ^7.0|^8.0
illuminate/database Version ^7.0|^8.0
illuminate/http Version ^7.0|^8.0
illuminate/log Version ^7.0|^8.0
illuminate/notifications Version ^7.0|^8.0
illuminate/routing Version ^7.0|^8.0
illuminate/support Version ^7.0|^8.0
illuminate/view Version ^7.0|^8.0
laminas/laminas-diactoros Version ^2.2
moneyphp/money Version ^3.2
nesbot/carbon Version ^2.0
nyholm/psr7 Version ^1.0
phpseclib/phpseclib Version ^2.0|^3.0
razorpay/razorpay Version ^2.7
symfony/http-kernel Version ^4.3|^5.0
symfony/intl Version ^4.3|^5.0