承接 moipayway/mpw-php 相关项目开发

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

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

moipayway/mpw-php

最新稳定版本:v0.1.0

Composer 安装命令:

composer require moipayway/mpw-php

包简介

The library simplifies interaction with Moipayway APIs in your PHP applications. It streamlines the process of integration, eliminating the need to deal with intricate details, and facilitates rapid API calls.

README 文档

README

Introduction

The MoiPayWay PHP Library simplifies interaction with Moipayway APIs in your PHP applications. It streamlines the process of integration, eliminating the need to deal with intricate details, and facilitates rapid API calls. Key features include:

  • Wallets: creating and managing wallets (fiat, crypto).
  • Making transfers, single/bulk. Fiat (NGN, GBP, EUR, USD) & Crypto.
  • Manage virtual accounts.
  • Tokens: create and manage token, such as; NFT, fungible token, stable coins, storage token, etc.
  • Verification: running identity checks, credit checks, etc.
  • AI: verify document image (drivers license NIN, BVN, etc), Face Comparison.
  • Lookups: Document validity check, CAC, etc.

Table of Content

  • Requirements
  • Installation
  • Initialization
  • Authenticate
  • Sending requests with payload
  • Error handling
  • More usage documentation
  • Testing
  • License

Requirements

  1. PHP 7.4 or higher.

Installation

composer require moipayway/mpw-php

Initialization

use MPW\MoiPayWay;

$mpw = new MoiPayWay("secret_token");

try {
    var_dump($mpw->misc->countries());
} catch (Exception $e) {
    echo $e->getMessage();
}

Authenticate

Refer to the documentation linked below to understand how to generate secret tokens for authenticating the Moipayway SDK.

Authentication

Sending requests with payload

Some endpoint requires additional data to be included in the request payload. Below is an example demonstrating sending requests with payload:

use MPW\MoiPayWay;

$mpw = new MoiPayWay("secret_token");

try {
    $response = $mpw->wallet->createFiat([
        'code' => '***',
        'meta' => [
            'name' => '***',
            'user_id' => '***'
        ]
    ]);
    var_dump($response);
} catch (Exception $e) {
    echo $e->getMessage();
}

Error handling

You can catch request errors by wrapping the method in a try / catch block.

use MPW\MoiPayWay;

$mpw = new MoiPayWay("invalid_api_secret_key");

try {
    $response = $mpw->token->multi->mint($payload);
    var_dump($response);
} catch (Exception $e) {
    echo $e->getMessage();
}

Response :

Error minting multi token

More usage documentation

Testing

./vendor/bin/phpunit

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-02-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固