purwantaraid / purwantara-php
PHP Wrapper for Purwantara API.
v0.0.1
2023-10-05 15:29 UTC
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.8
Requires (Dev)
- laravel/pint: ^1.0
- pestphp/pest: ^2.15
- spatie/ray: ^1.28
This package is auto-updated.
Last update: 2024-11-08 15:43:15 UTC
README
PHP Wrapper for Purwantara API.
Installation
You can install the package via composer:
composer require purwantaraid/purwantara-php
Usage
$config = [ 'is_sandbox' => false, 'token' => 'XXXXXXXX' ];
Virtual Account
use Purwantara\Purwantara\Collect\VirtualAccount; $request = new VirtualAccount($config); // Create transaction $response = $request->create($data); // Get all transactions $response = $request->get(); // Get transaction by UUID $response = $request->get($uuid); // Cancel transaction by UUID $response = $request->cancel($uuid);
QRIS
use Purwantara\Purwantara\Collect\Qris; $request = new Qris($config); // Create transaction $response = $request->create($data); // Get all transactions $response = $request->get(); // Get transaction by UUID $response = $request->get($uuid);
Over the Counter
use Purwantara\Purwantara\Collect\Otc; $request = new Otc($config); // Create transaction $response = $request->create($data); // Get all transactions $response = $request->get(); // Get transaction by UUID $response = $request->get($uuid);
Payment Link
use Purwantara\Purwantara\Collect\PaymentLink; $request = new PaymentLink($config); // Create transaction $response = $request->create($data); // Get transaction $response = $request->get($uuid);
Testing
PPN_TOKEN="XXXX" composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
License
The MIT License (MIT). Please see License File for more information.