https://github.com/zerosdev/linkqu-php
Unofficial Integration Kit for LinkQu.id
https://github.com/zerosdev/linkqu-php
Last synced: 6 months ago
JSON representation
Unofficial Integration Kit for LinkQu.id
- Host: GitHub
- URL: https://github.com/zerosdev/linkqu-php
- Owner: zerosdev
- License: mit
- Created: 2021-09-07T10:15:30.000Z (over 4 years ago)
- Default Branch: 1.x
- Last Pushed: 2025-04-18T11:46:04.000Z (12 months ago)
- Last Synced: 2025-10-01T13:55:45.607Z (6 months ago)
- Language: PHP
- Homepage: https://linkqu.id
- Size: 59.6 KB
- Stars: 3
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# linkqu-php
Unofficial Integration Kit for LinkQu.id
## Requirements
- PHP v7.0.0+
- PHP JSON Extension
- [Guzzle, PHP HTTP Client](https://github.com/guzzle/guzzle) v6.5+
## Installation
1. Run command
composer require zerosdev/linkqu-php
2. Run command
composer dump-autoload
### The following steps only needed if you are using Laravel
3. Then
php artisan vendor:publish --provider="ZerosDev\LinkQu\Laravel\ServiceProvider"
4. Edit **config/linkqu.php** and put your API credentials
## Basic Usage
### Laravel Usage
```php
createVa(function($va) {
$va->setAmount(10000)
->setExpired(60)
->setCustomerId(uniqid())
->setPartnerRef(time())
->setCustomerName('Nama Pelanggan')
->setCustomerPhone('08123456789')
->setCustomerEmail('email@customer.com')
->setBankCode('014');
});
if( LinkQu::hasError() ) {
print_r(LinkQu::errors());
} else {
print_r($result);
}
}
}
```
### Non-Laravel Usage
```php
setMode(Constant::DEVELOPMENT)
->setClientId('testing')
->setClientSecret('123')
->setServerKey('LinkQu@2020')
->setUsername('LI307GXIN')
->setPin('2K2NPCBBNNTovgB');
});
$result = $linkqu->transaction()->createVa(function($va) {
$va->setAmount(10000)
->setExpired(60)
->setCustomerId(uniqid())
->setPartnerRef(time())
->setCustomerName('Nama Pelanggan')
->setCustomerPhone('08123456789')
->setCustomerEmail('email@customer.com')
->setBankCode('014');
});
if( $linkqu->hasError() ) {
print_r($linkqu->errors());
} else {
print_r($result);
}
```