satispay/gbusiness-api-php-sdk 问题修复 & 功能扩展

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

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

satispay/gbusiness-api-php-sdk

Composer 安装命令:

composer require satispay/gbusiness-api-php-sdk

包简介

Satispay GBusiness API PHP SDK

README 文档

README

Packagist Version Packagist Downloads

Installation

Run the following command:

composer require satispay/gbusiness-api-php-sdk

If you do not wish to use Composer, import the init.php file.

require_once("/path/init.php");

Documentation

https://developers.satispay.com

Authenticate with RSA Signature

Sign in to your Dashboard at business.satispay.com, click "Negozi Online" or "Negozi Fisici", and then click on "Genera un token di attivazione" to generate an activation token.

Use the activation token with the authenticateWithToken function to generate and exchange a pair of RSA keys.

Save the keys in your database or in a safe place not accesibile from your website.

// Authenticate and generate the keys
$authentication = \SatispayGBusiness\Api::authenticateWithToken("XXXXXX");

// Export keys
$publicKey = $authentication->publicKey;
$privateKey = $authentication->privateKey;
$keyId = $authentication->keyId;

Reuse the keys after authentication.

// Keys variables
$publicKey = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhk...";
$privateKey = "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBg...";
$keyId = "ldg9sbq283og7ua1abpj989kbbm2g60us6f18c1sciq...";

// Set keys
\SatispayGBusiness\Api::setPublicKey($publicKey);
\SatispayGBusiness\Api::setPrivateKey($privateKey);
\SatispayGBusiness\Api::setKeyId($keyId);

Enable Sandbox

To enable sandbox use setSandbox function.

\SatispayGBusiness\Api::setSandbox(true);

Changelog

1.4.0

  • Added custom header support in every HTTP call.
  • Improve code formatting and documentation.
  • Added RSA generation fallback with seclib (available via Composer only).

1.3.0

  • Added \SatispayGBusiness\Api::getPlatformHeader() method.

  • Added \SatispayGBusiness\Api::setPlatformHeader() method.

  • Added \SatispayGBusiness\Api::getTrackingHeader() method.

  • Added \SatispayGBusiness\Api::setTrackingHeader() method.

  • Added \SatispayGBusiness\Request::HEADER_OS constant for x-satispay-os request header.

  • Added \SatispayGBusiness\Request::HEADER_OS_VERSION constant for x-satispay-osv request headers.

  • Added \SatispayGBusiness\Request::HEADER_APP_VERSION constant for x-satispay-appv request headers

  • Added \SatispayGBusiness\Request::HEADER_APP_NAME constant for x-satispay-appn request headers.

  • Added \SatispayGBusiness\Request::HEADER_DEVICE_TYPE constant for x-satispay-devicetype request headers.

  • Added \SatispayGBusiness\Request::HEADER_TRACKING_CODE constant for x-satispay-tracking-code request headers.

  • Changed in \SatispayGBusiness\Request header key from X-Satispay-Platformv to x-satispay-osv

  • Changed in \SatispayGBusiness\Request header key from X-Satispay-Plugin-Version to x-satispay-appv

  • Changed in \SatispayGBusiness\Request header key from X-Satispay-Plugin-Name to x-satispay-appn

  • Changed in \SatispayGBusiness\Request header key from X-Satispay-Type to x-satispay-devicetype

1.2.1

  • Added \SatispayGBusiness\ApiAuthentication class.
  • Performed code refactoring to adhere to PSR2 Coding Standards

1.2.0

  • Added \SatispayGBusiness\PreAuthorizedPaymentToken class.

1.1.1

  • Fixed composer file version

1.1.0

  • Removed \SatispayGBusiness\Api::testAuthentication() method.

  • Removed \SatispayGBusiness\Api::getSecurityBearer() method.

  • Removed \SatispayGBusiness\Api::setSecurityBearer() method.

  • Added \SatispayGBusiness\Api::getPlatformVersionHeader() method.

  • Added \SatispayGBusiness\Api::setPlatformVersionHeader() method.

  • Added \SatispayGBusiness\Api::getPluginVersionHeader() method.

  • Added \SatispayGBusiness\Api::setPluginVersionHeader() method.

  • Added \SatispayGBusiness\Api::getPluginNameHeader() method.

  • Added \SatispayGBusiness\Api::setPluginNameHeader() method.

  • Added \SatispayGBusiness\Api::getTypeHeader() method.

  • Added \SatispayGBusiness\Api::setTypeHeader() method.

satispay/gbusiness-api-php-sdk 适用场景与选型建议

satispay/gbusiness-api-php-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 215.45k 次下载、GitHub Stars 达 19, 最近一次更新时间为 2019 年 01 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「api」 「sdk」 「satispay」 「gbusiness」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 satispay/gbusiness-api-php-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 satispay/gbusiness-api-php-sdk 我们能提供哪些服务?
定制开发 / 二次开发

基于 satispay/gbusiness-api-php-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 215.45k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 19
  • 点击次数: 12
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 19
  • Watchers: 5
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-01-22