Download the PHP package shibanashiqc/phone-pay-php without Composer
On this page you can find all versions of the php package shibanashiqc/phone-pay-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download shibanashiqc/phone-pay-php
More information about shibanashiqc/phone-pay-php
Files in shibanashiqc/phone-pay-php
Package phone-pay-php
Short Description PhonePay PHP Library by Shiban Ashiq
License MIT
Informations about the package phone-pay-php
phone-pay-php
Laravel Sample Repo: Click Here
Unofficial PHP library for PhonePe.
Read up here for getting started and understanding the payment flow with PhonePe: https://developer.phonepe.com/v1/docs/api-integration
Prerequisites
- A minimum of PHP 8.1 is required.
Installation
-
If your project using composer, run the below command
- If you are not using composer, download the latest release from the releases section.
You should download the
phone-pay-php.zip
file. After that, includePhonepay.php
in your application and you can use the API as usual.
Note:
This PHP library follows the following practices:
- Namespaced under
Shibanashiqc\PhonePayPhp\
- API throws exceptions instead of returning errors
- Options are passed as an array instead of multiple arguments wherever possible
- All requests and responses are communicated over JSON
Documentation
Documentation of PhonePe's API and their usage is available at https://developer.phonepe.com/v1/docs/api-integration
Basic Usage
Merchant credentials can be obtained from the PhonePay Developer Dashboard. You can use the following credentials for testing:
Required parameters for the constructor are: Merchant ID, Merchant Salt Key, Environment
Create a Payment
getPaymentRequest() on this function first parameter is amount, second parameter is merchant transaction id, third parameter is user unique id, fourth parameter is user mobile number only required parameter is amount other parameter is optional
redirect url to redirect your user to phonepay payment page complete the payment after payment complete phonepay will redirect to your callback url with payment details
License
The PhonePay PHP SDK is released under the MIT License. See LICENSE file for more details.