https://github.com/zerosdev/tripay-sdk-php
Unofficial TriPay.co.id Integration Kit for PHP
https://github.com/zerosdev/tripay-sdk-php
Last synced: 6 months ago
JSON representation
Unofficial TriPay.co.id Integration Kit for PHP
- Host: GitHub
- URL: https://github.com/zerosdev/tripay-sdk-php
- Owner: zerosdev
- License: mit
- Created: 2023-03-02T02:33:33.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-03T14:11:21.000Z (12 months ago)
- Last Synced: 2025-10-06T22:52:42.843Z (6 months ago)
- Language: PHP
- Size: 31.3 KB
- Stars: 15
- Watchers: 1
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
tripay-sdk-php
Unofficial TriPay.co.id Integration Kit for PHP
## Requirements
- PHP v7.2.5+
- PHP JSON Extension
- PHP cURL Extension
## Installation
1. Run command
```
composer require zerosdev/tripay-sdk-php
```
## Usage
```php
addOrderItem('Gula', 10000, 1)
->addOrderItem('Kopi', 6000, 5)
->create([
'method' => 'BRIVA',
'merchant_ref' => 'INV123',
'customer_name' => 'Nama Pelanggan',
'customer_email' => 'email@konsumen.id',
'customer_phone' => '081234567890',
'expired_time' => Helper::makeTimestamp('6 HOUR'), // see Supported Time Units
]);
echo $result->getBody()->getContents();
/**
* For debugging purpose
*/
$debugs = $client->debugs();
echo json_encode($debugs, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
```
Please check the `/examples` for the other examples
## Supported Time Units
> :exclamation: All time units are in a singular noun
- SECOND
- MINUTE
- HOUR
- DAY