rahmatnurjaman99/brivaonline
最新稳定版本:v1.0.6
Composer 安装命令:
composer require rahmatnurjaman99/brivaonline
包简介
Laravel package for BRI VA/SNAP integrations with WSDL inquiry/payment support.
README 文档
README
Laravel package for BRI VA/SNAP integrations with WSDL inquiry/payment support.
Install
composer require rahmatnurjaman99/brivaonline
Publish config and migrations
php artisan vendor:publish --tag=briva-config php artisan vendor:publish --tag=briva-migrations
Routes
Routes are registered automatically when briva.routes.enabled is true.
Test signing routes:
POST /_test/sign/access-token
POST /_test/sign/transaction
Access token signing body:
{
"client_id": "your-client-id"
}
Transaction signing body:
{
"path": "/snap/v1.0/transfer-va/payment",
"method": "POST",
"access_token": "your-access-token",
"body": {
"partnerServiceId": "00012345",
"customerNo": "0000000000001",
"virtualAccountNo": "000123450000000001",
"virtualAccountName": "John Doe",
"paymentRequestId": "REQ-1",
"paidAmount": {
"value": "200000.00",
"currency": "IDR"
},
"additionalInfo": {
"idApp": "TESTAPP1"
}
}
}
Usage
use RahmatNurjaman99\BrivaOnline\Clients\SnapClient; $snap = app(SnapClient::class); $token = $snap->accessToken();
Custom inquiry resolver
By default, inquiry data is fetched via WSDL. Your resolver must return the final response payload:
// config/briva.php 'inquiry_resolver' => App\Briva\MyInquiryResolver::class,
Example resolver return:
return [ 'responseCode' => '2002400', 'responseMessage' => 'Successful', 'virtualAccountData' => [ 'partnerServiceId' => '00012345', 'customerNo' => '123456', 'virtualAccountNo' => '00012345123456', 'virtualAccountName' => 'John Doe', 'inquiryRequestId' => 'REQ-1', 'totalAmount' => ['value' => '1000.00', 'currency' => 'IDR'], 'inquiryStatus' => '00', 'inquiryReason' => ['english' => 'Success', 'indonesia' => 'Sukses'], ], 'additionalInfo' => [], ];
Custom payment resolver
By default, payment is posted via WSDL. Your resolver must return the final response payload:
// config/briva.php 'payment_resolver' => App\Briva\MyPaymentResolver::class,
Example resolver return:
return [ 'responseCode' => '2002500', 'responseMessage' => 'Successful', 'virtualAccountData' => [ 'partnerServiceId' => '00012345', 'customerNo' => '123456', 'virtualAccountNo' => '00012345123456', 'virtualAccountName' => 'John Doe', 'paymentRequestId' => 'REQ-1', 'paidAmount' => ['value' => '1000.00', 'currency' => 'IDR'], 'paymentFlagStatus' => '00', 'paymentFlagReason' => ['english' => 'Success', 'indonesia' => 'Sukses'], ], 'additionalInfo' => [], ];
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-06