razor-informatics/dpo-php 问题修复 & 功能扩展

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

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

razor-informatics/dpo-php

最新稳定版本:v0.1.1

Composer 安装命令:

composer require razor-informatics/dpo-php

包简介

DPO Group Payment gateway PHP SDK. using api payment option. Easily use with API without web or redirects

README 文档

README

Build Status

DPO Group Payment gateway wrapper. using api payment option Easily use with API without web or redirects

Development Support

If you need support in development, or you need a development team kindly contact us.

Documentation

To get the depth details of the api check API docs here.

Install

You can install the PHP SDK via composer or by downloading the source

Via Composer

The recommended way to install the SDK is with Composer.

composer require razor-informatics/dpo-php

Fetch Account Balance

use RazorInformatics\DPOPhp;

$companyToken  = 'YOUR_COMPANY_TOKEN';

$dpo = new DPOPhp($companyToken);

$results = $dpo->account()->balance('USD')

print_r($results);

Verify Transaction using Transaction Token

How to verify token

use RazorInformatics\DPOPhp;

$companyToken  = 'YOUR_COMPANY_TOKEN';

$dpo = new DPOPhp($companyToken);

$transactionToken = 'TRANSACTION_TOKEN_GIVEN';

$results = $dpo->token()->verify($transactionToken)

print_r($results);

Card Payment

make a direct card payment.

use RazorInformatics\DPOPhp;

$companyToken  = 'YOUR_COMPANY_TOKEN';
$serviceType = 5525; //SERVICE TYPE
$paymentAmount = 500;
$reference ="INV-1000";
$cardNumber = 5436886269848367
$cardExpiry = 1224;// format My example 0123 i.e. January 2023
$cardCvv = 123;
$customerFirstName='John';
$customerLastName = 'Doe';
$customerPhone ='';
$customerEmail = '';
$currency = 'USD';
$description = 'Flight booking for 5th January 2032'

$dpo = new DPOPhp($companyToken);

$results = $dpo->payment()->card($reference,$serviceType,$paymentAmount,$cardNumber,$cardExpiry,$cardCvv, $customerFirstName,$customerLastName,$customerPhone,$customerEmail,$currency,$description)

print_r($results);

Mpesa Payment

Make a direct mpesa payment, Currency is in KES (Kenya Shillings). In the results there us the transaction token, use it to verfiy payment went through.

use RazorInformatics\DPOPhp;

$companyToken  = 'YOUR_COMPANY_TOKEN';
$serviceType = 5525; //SERVICE TYPE
$reference ="INV-1000";
$paymentAmount = 500;
$customerFirstName='John';
$customerLastName = 'Doe';
$customerPhone = 2547100100100;
$customerEmail = '';
$description = 'Flight booking for 5th January 2032'

$dpo = new DPOPhp($companyToken);

$results = $dpo->payment()->chargeMpesa($reference,$serviceType,$paymentAmount, $customerFirstName,$customerLastName,$customerPhone,$customerEmail,$description)

print_r($results);

Remember to verify the transaction code to confirm if payment was successfully.

License

This package is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固