Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lakshmaji/payubiz
PayUbiz integration for hosted pages
https://github.com/lakshmaji/payubiz
laravel paymentgateway payubiz payubiz-services php
Last synced: 15 days ago
JSON representation
PayUbiz integration for hosted pages
- Host: GitHub
- URL: https://github.com/lakshmaji/payubiz
- Owner: lakshmaji
- Created: 2016-12-05T18:09:01.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-05-08T11:12:44.000Z (over 3 years ago)
- Last Synced: 2024-10-10T05:36:51.682Z (about 1 month ago)
- Topics: laravel, paymentgateway, payubiz, payubiz-services, php
- Language: PHP
- Homepage: https://lakshmajim.github.io/payubiz/
- Size: 85.9 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PayUbiz
>### What it is
- Integrates the PayUbiz services with Laravel application.
>### Version
1.0.1
---
>### Installation- This package is available on packagist and we can simply download it by issuing the following command on terminal within the project root directory.
```bash
composer require lakshmaji/payubiz
```
- Add the Service Provider to **providers** array
```php
Lakshmaji\PayUbiz\PayUbizServiceProvider::class,
```
- Add the Facade to **aliases** array
```php
'PayUbiz' => Lakshmaji\PayUbiz\Facade\PayUbiz::class,
```
- Try updating the application with composer (dependencies)
```bash
composer update
```
- Publish configuration files
```bash
php artisan vendor:publish
```
- Populate config/payubiz.php with credentials and enable production mode.
```bash
return [/*
|--------------------------------------------------------------------------
| PayUbiz Authentication Secret
|--------------------------------------------------------------------------
|
| Don't forget to set this.
|
*/'merchant_id' => 'gtSsEw',
'secret_key' => 'eRyshYFb',
'test_mode' => true
];
```---
>### Integrating PayUbiz services with the applicationThe following example illustrates the usage of PayUbiz package
```php
request->all();
// All of these parameters are mandatory!
$params = array(
'txnid' => $data['transaction_id'],
'amount' => $data['amount'],
'productinfo' => $data['product_info']',
'firstname' => $data['user_name'],
'email' => $data['user_email']',
'phone' => $data['mobile_number'],
'surl' => 'http://localhost/payubiz_app_development/public/back',
'furl' => 'http://localhost/payubiz_app_development/public/back',
);
// Call to PayUbiz method
$result = PayUbiz::initializePurchase($params);
// Redirect to PayUbiz Payment Gateway services
return $result;
}
/**
* A method to process the results returned from the PayUbiz services
*
*/
public function processResultFromPayUbiz()
{
$result = PayUbiz::completePurchase($_POST);
$params = $result->getParams();
echo $result->getStatus()."\n";
echo $result->getTransactionId()."\n";
echo $result->getTransactionStatus()."\n";
echo $result->getStatus()."\n";
}
}
// end of class PayUbizTest
// end of file PayUbizTest.php
```---
>### METHOD```php
PayUbiz::initializePurchase();
``````php
PayUbiz::completePurchase($_POST);
```----
>### LICENSE[MIT](https://opensource.org/licenses/MIT)