承接 marcelo-correa/gerencianet-sdk-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

marcelo-correa/gerencianet-sdk-php

Composer 安装命令:

composer require marcelo-correa/gerencianet-sdk-php

包简介

API SDK PHP

README 文档

README

Sdk for Gerencianet Pagamentos' API. For more informations about parameters and values, please refer to Gerencianet documentation.

Build Status Code Climate Test Coverage

Installation

Require this package with composer:

$ composer require marcelo-correa/gerencianet-sdk-php

Or include it in your composer.json file:

...
"require": {
  "marcelo-correa/gerencianet-sdk-php": "2.*"
},
...

Requirements

  • PHP >= 5.5

Tested with

php 5.5, 5.6, 7.0 and 7.1

Getting started

Require the module and namespaces:

require __DIR__ . '/../sdk/vendor/autoload.php';

use Gerencianet\Gerencianet;

Although the web services responses are in json format, the sdk will convert any server response to array. The code must be within a try-catch and exceptions can be handled as follow:

try {
  /* code */
} catch(GerencianetException $e) {
  /* Gerencianet's api errors will come here */
} catch(Exception $ex) {
  /* Other errors will come here */
}

For development environment

Instantiate the module passing using your client_id, client_secret and sandbox equals true:

$options = [
  'client_id' => 'client_id',
  'client_secret' => 'client_secret',
  'sandbox' => true,
  'timeout' => 30
];

$api = new Gerencianet($options);

For production environment

To change the environment to production, just set the third sandbox to false:

$options = [
  'client_id' => 'client_id',
  'client_secret' => 'client_secret',
  'sandbox' => false
  'timeout' => 30
];

$api = new Gerencianet($options);

Running tests

To run tests install PHPUnit and run the following command:

$ phpunit -c config.xml

Running examples

Update examples/config.json file with client_id and client_secret of your application.

You can run using any web server, like Apache or nginx, or simple start a php server as follow:

php -S localhost:9000

Then open any example in your browser.

:warning: Some examples require you to change some parameters to work, like examples/charge/detail.php where you must change the id parameter.

Version Guidance

VersionStatusPackagistRepoPHP Version
1.xMaintainedgerencianet/gerencianet-sdk-phpv1>= 5.4
2.xMaintainedgerencianet/gerencianet-sdk-phpv2>= 5.5

Additional Documentation

The full documentation with all available endpoints is in https://dev.gerencianet.com.br/.

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-09-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固