zerosdev/paylabs-sdk-php 问题修复 & 功能扩展

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

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

zerosdev/paylabs-sdk-php

最新稳定版本:v1.1.2

Composer 安装命令:

composer require zerosdev/paylabs-sdk-php

包简介

Unofficial Paylabs.co.id Integration Kit for PHP

README 文档

README

Unofficial Paylabs.co.id Integration Kit for PHP

release language license size downloads pulls

Requirements

  • PHP v7.2+
  • PHP JSON Extension
  • PHP cURL Extension

Installation

  1. Run command
composer require zerosdev/paylabs-sdk-php

Usage

Notes

  • The following payloads have been added automatically so you don't have to enter them manually
    • requestId
      • You can still enter your own requestId, otherwise we will generate random UUIDv4 for the requestId
    • merchantId
    • sign
<?php

require 'path/to/your/vendor/autoload.php';

use ZerosDev\Paylabs\Client as PaylabsClient;
use ZerosDev\Paylabs\Support\Constant;
use ZerosDev\Paylabs\VirtualAccount;

$merchantId = '12345';
$apiKey = 'd1cfd***********888ed3';
$mode = Constant::MODE_DEVELOPMENT;
$guzzleOptions = []; // Your additional Guzzle options (https://docs.guzzlephp.org/en/stable/request-options.html)

$client = new PaylabsClient($merchantId, $apiKey, $mode, $guzzleOptions);
$va = new VirtualAccount($client);

$result = $va->create([
    'paymentType' => 'SinarmasVA',
    'amount' => 10000,
    'merchantTradeNo' => uniqid(),
    'notifyUrl' => 'https://yourwebsite.com/payment/notify',
    'payer' => 'Customer Name',
    'goodsInfo' => 'Product Name'
]);

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

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固