A subscription page with Razorpay Razorpay PHP Integration
- Codeigniter Version 3
- PHP 7.0.10
- MySQL 5.7.14
- Uses Razorpay PHP Library
- Subscription Screen, with three Plans Cards.
- Checkout-form integration.
- Payment authorization and capturing using Razorpay.
- Creation of Customer and Subscription plan using Razorpay API
- Local table updation with customer and subscription details.
-
To run server side code locally you can use LAMP, WAMP, MAMP, or XAMP
-
Clone the file and make the necessary changes.
-
.\application\config\config.php
- Change $base_url
-
..htaccess
- RewriteBase \foldername
-
.\application\config\database.php
- Change the databasse name, username and password
-
-
Create a database and import subscribe.sql file into it, to create needed tables
(Read this Documentation for issues regarding Codeigniter)
- Edit the keySecret inside application/controller/mainctrl.php
- In custom.js
- Change
- var url = "../subscribe/mainctrl/rp_cust";
- To
- var url = "../your_folder_name/mainctrl/rp_cust";
- Change
Make sure that you download the latest version of razorpay-php.zip
file from
the releases section here.
(The assets folder contains the razorpay-php.zip file in this project)