[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: README.md
# Laravel PhonePe [](https://packagist.org/packages/dipesh79/laravel-phonepe) [](https://packagist.org/packages/dipesh79/laravel-phonepe) [](https://packagist.org/packages/dipesh79/laravel-phonepe) This Laravel package allows you to integrate PhonePe payment on your Laravel Application. ## Usage/Examples ### Install Using Composer ``` composer require dipesh79/laravel-phonepe ``` ### Add Variables in .env ``` PHONEPE_MERCHANT_ID="PGTESTPAYUAT" PHONEPE_MERCHANT_USER_ID="MUID123" PHONEPE_ENV="staging" //staging or production PHONEPE_SALT_KEY="099eb0cd-02cf-4e2a-8aca-3e6c6aff0399" PHONEPE_SALT_INDEX="1" PHONEPE_CALLBACK_URL="http://localhost:8000" ``` ### Publish Vendor File ``` php artisan vendor:publish ``` And publish "Dipesh79\LaravelPhonePe\LaravelPhonePeServiceProvider" Redirect the user to payment page from your controller ``` use Dipesh79\LaravelPhonePe\LaravelPhonePe; //Your Controller Method public function phonePePayment() { $phonepe = new LaravelPhonePe(); //amount, phone number, callback url, unique merchant transaction id $url = $phonepe->makePayment(1000, '9999999999', 'https://locahost:8000/redirct-url','1'); return redirect()->away($url); } ``` ### Check Payment Status After Successful Payment PhonePe will redirect to your callback url with transaction id and status. You can check the payment status using transaction id. ``` use Dipesh79\LaravelPhonePe\LaravelPhonePe; use Illuminate\Http\Request; public function callBackAction(Request $request) { $phonepe = new LaravelPhonePe(); $response = $phonepe->getTransactionStatus($request->all()); if($response == true){ //Payment Success } else { //Payment Failed } } ``` ## License [MIT](https://choosealicense.com/licenses/mit/) ## Author - [@Dipesh79](https://www.github.com/Dipesh79) ## Support For support, email dipeshkhanal79[at]gmail[dot]com.
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.81 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002