承接 smodav/ipay 相关项目开发

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

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

smodav/ipay

Composer 安装命令:

composer require smodav/ipay

包简介

iPay Africa PHP package for transaction handling

README 文档

README

Build Status Total Downloads Latest Stable Version Latest Unstable Version License

This is a PHP package for iPay Africa Web based integration. The API allows a merchant to initiate C2B transaction and receive payments from the customers.

Installation

Pull in the package through Composer.

composer require smodav/ipay

Usage

To make a request is simple. Just initiate the Cashier and finalize the transaction:

use SmoDav\iPay\Cashier;

require "vendor/autoload.php";

$cashier = new Cashier();

$response = $cashier
    ->usingVendorId('your vendor id', 'your vendor secret')
    ->withCallback('http://yourcallback.com')
    ->withCustomer('0722000000', 'demo@example.com', false)
    ->transact(10, 'your order id', 'your order secret');

The $response variable will hold the html response from iPay. Just render it to the page and the process would be complete.

Payment Channels

By default, you are able to transact with multiple channels. The package default are:

  • MPesa
  • Airtel Money
  • Equity
  • Credit Card
  • Debit Card

In order to use other channels, you can call the usingChannels() method with a channel array. The currently available channels are:

  • Cashier::CHANNEL_MPESA
  • Cashier::CHANNEL_AIRTEL
  • Cashier::CHANNEL_EQUITY
  • Cashier::CHANNEL_MOBILE_BANKING
  • Cashier::CHANNEL_DEBIT_CARD
  • Cashier::CHANNEL_CREDIT_CARD
  • Cashier::CHANNEL_MKOPO_RAHISI
  • Cashier::CHANNEL_SAIDA

For example:

use SmoDav\iPay\Cashier;

require "vendor/autoload.php";

$cashier = new Cashier();

$transactChannels = [
    Cashier::CHANNEL_MPESA,
    Cashier::CHANNEL_AIRTEL,
];

$response = $cashier
    ->usingChannels($transactChannels)
    ->usingVendorId('your vendor id', 'your vendor secret')
    ->withCallback('http://yourcallback.com')
    ->withCustomer('0722000000', 'demo@example.com', false)
    ->transact(10, 'your order id', 'your order secret');

Disclaimer

The iPay API has a bug of displaying channels that have not been enabled and vice versa.

License

The M-Pesa Package is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-06-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固