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