承接 genioforge/pulseflow_consumer 相关项目开发

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

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

genioforge/pulseflow_consumer

Composer 安装命令:

composer require genioforge/pulseflow_consumer

包简介

Wrapper for PulseFlow v1 API

README 文档

README

This is an unofficial SDK for the PulseFlow v1 API. It provides a convenient wrapper for interacting with the PulseFlow API.

Installation

To install the SDK, use Composer:

composer require genioforge/pulseflow_consumer dev-main

Configuration

Add the following configuration to your Laravel application's config/services.php file:

return [
    'pulse' => [
        'key' => env('PULSE_API_KEY'),
        'domain' => env('PULSE_VENDOR_DOMAIN'),
        'pin' => env('PULSE_API_PIN'),
        'secret_key' => env('PULSE_SECRET_KEY'),
    ],
];

Usage

Service Provider

Register the service provider in your config/app.php file:

'providers' => [
    // Other Service Providers

    GenioForge\Consumer\ConsumerServiceProvider::class,
],

Facade

Add the facade to your config/app.php file:

'aliases' => [
    // Other Facades

    'Consumer' => GenioForge\Consumer\ConsumerFacade::class,
],

Example

Here is an example of how to use the SDK:

use GenioForge\Consumer\Repository\RepositoryProvider;

$consumer = RepositoryProvider::getProvider();

// Ensure the provider is initialized
$consumer->ensure_initialised();


// Buy airtime
$reference = 'unique_reference';
$planId = 1;
$networkId = 1;
$phoneNumber = '08012345678';
$amount = 1000;
$airtimePurchaseResponse = $consumer->buy_airtime($reference, $planId, $networkId, $phoneNumber, $amount);
echo $airtimePurchaseResponse->message;

Testing

To run the tests, use PHPUnit:

phpunit

License

This SDK is licensed under the MIT License. See the LICENSE file for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-23