rahmatnurjaman99/brivaonline 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固