digikraaft/flutterwave-php 问题修复 & 功能扩展

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

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

digikraaft/flutterwave-php

Composer 安装命令:

composer require digikraaft/flutterwave-php

包简介

PHP Implementation of Flutterwave API

README 文档

README

run-tests Build Status Scrutinizer Code Quality Code Intelligence Status License: MIT

This package provides an expressive and convenient way to interact with the Flutterwave API.

Installation

You can install the package via composer:

composer require digikraaft/flutterwave-php

Usage

All APIs documented in Flutterwave's Developer Reference are currently supported by this package. Using the individual API follows a general convention so that it can be simple and predictable.

<?php 

{API_NAME}::{API_END_POINT}();

Before this, the API key needs to be set. For example, to access the payment-plans endpoint,

<?php 

include_once('vendor/autoload.php');

use Digikraaft\Flutterwave\Flutterwave;
use Digikraaft\Flutterwave\PaymentPlan;

Flutterwave::setApiKey('FLWSECK_TEST_1234abcd');
$plans = PaymentPlan::list();

You can easily pass parameters to be sent as arguments to the API_END_POINT method like this:

<?php

include_once('vendor/autoload.php');

use Digikraaft\Flutterwave\Flutterwave;
use Digikraaft\Flutterwave\PaymentPlan;

Flutterwave::setApiKey('FLWSECK_TEST_1234abcd');

$params = [
    'from' => '2020-07-07',
    'to' => '2020-07-07',
    'currency' => 'NGN',
];

$plans = PaymentPlan::list($params);

This also applies to POST and PUT requests.

For endpoints that require path parameters like the fetch customer with the request like /payment-plans/{id}, simply pass in a string into the API_END_POINT like this:

<?php

include_once('vendor/autoload.php');

use Digikraaft\Flutterwave\Flutterwave;
use Digikraaft\Flutterwave\PaymentPlan;

Flutterwave::setApiKey('FLWSECK_TEST_1234abcd');
$plan = PaymentPlan::fetch('12345678');

For API_END_POINTs that take both path and body parameters like the update payment-plan with the PUT request payment-plans/{id}, simply pass in a string as the first argument, an array as the second like this:

<?php
include_once('vendor/autoload.php');

use Digikraaft\Flutterwave\Flutterwave;
use Digikraaft\Flutterwave\PaymentPlan;

Flutterwave::setApiKey('FLWSECK_TEST_1234abcd');

$params = [
    'name' => 'Gym Membership',
    'status' => 'active',
];

$plan = PaymentPlan::update('12345678', $params);

There are a few exceptions to the API_END_POINT convention.

Check the wiki page here for detailed reference of the available methods



This package returns the exact response from the Flutterwave API but as the stdClass type such that responses can be accessed like this:

<?php

include_once('vendor/autoload.php');

use Digikraaft\Flutterwave\Flutterwave;
use Digikraaft\Flutterwave\PaymentPlan;

Flutterwave::setApiKey('FLWSECK_TEST_1234abcd');
$plan = PaymentPlan::fetch('12345678');

if ($plan->status == 'success') {
    echo $plan->data->name;
}

Future updates will see to improving on how the response object is handled.

Documentation

For detailed documentation, check the wiki page here

Todo

  • More tests
  • Better API response handling

Testing

composer test

More Good Stuff

Check here for more awesome free stuff!

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Contributions are welcome! Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email dev@digitalkraaft.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

digikraaft/flutterwave-php 适用场景与选型建议

digikraaft/flutterwave-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 201 次下载、GitHub Stars 达 1, 最近一次更新时间为 2020 年 07 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 digikraaft/flutterwave-php 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

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