zepson/zepsonpay-php
Composer 安装命令:
composer require zepson/zepsonpay-php
包简介
This is the official package to help integration of Zepson pay service to your php based application much faster and easy.
README 文档
README
Zepson pay is the software as a service payment gateway designed to make payment integration through API's easly and avaliable to anyone. Zepson Engineers works on real world researches to get solution suitable for your business.
Features
- Collection (also available android pay)
- Desbursement
- Transaction Enquiry (also available android pay)
- Transaction reversal
- Fraud Check
Documentation
Read Detailed Developer Documentation
How to integrate to PHP/Laravel Application
1.Install Zepson Pay Package
2. Prepare your API key, API secret and environment from zepsonpay.com developer dashboard
3. Create an Instance of ZepsonPay Class
4. Pass Required Parameters
5. Call makePayment to initiate makePayment
6. Call paymentStatus to get transaction paymentStatus
Installation
Install my-project with composer in php or Laravel application
composer require zepson/zepsonpay-php
Create Instance of Zepson pay class
Create an instance of ZepsonPay class using bellow instruction. Note that parameters in the example are all mandatory when initializing the class. api_key and api_secret ca be obtained from https://zepsonpay.com developer portal
<?php $api_key = "YOUR_ZEPSONPAY_API_KEY"; $api_secret = "YOUR_ZEPSONPAY_API_SECRET"; $environment = "android"; //sandbox, produciton, zepsonpay and android. currently support android (v1.0) //creating instance of zepsonpay class. $zp = new Zepson\ZepsonpaySDK\ZepsonPay($api_key, $api_secret, $environment);
Make payment
To complete payment , the parameters in the example are required. Make payment can sometimes be reffered to us Collection.
$data = [ 'amount' => 100, 'purpose' => 'For testing purposes', 'ext_trxn_reff' => '1JF61RJWOK', //for android transaction this is equal to operators transaction id received after payment 'phone' => '0688950846', //customer phone 'operator' => 'vodacom', //operator to charge from 'device' => '00000000-0000-0000-6da8-08a4x40d4b97' // only for android transactions obtained after registering device in gateway.zepsonsms.co.tz ]; //make payment $response = $zp->makePayment($data);
After making payment, please reffer to call back sections below to see how can you work with different responses from the api.
Transaction enquiry(Check transaction status)
To check status, the parameter in the example is required. Transaction status is sometimes reffered to as transaction enquiry
$data = [ 'ext_trxn_reff' => '1JF61RJWOK', //for android transaction this is equal to operators transaction id received after payment ]; //make payment $response = $zp->paymentStatus($data);
After receiving response, please reffer to call back sections below to see how can you work with different responses from the api.
Available payment response helpers
We have prepared a list of helpers to help make your process much easy, you can use this for any type of transaction /environment.
check if payment is successfull
$zp->isPaymentSuccess();
This returns zepsonpay status codes described below.
| CODE | DESCRIPTION |
|---|---|
ZPSUCCESS |
payment is successfull completed |
ZPPENDING |
payment is being processed |
ZPFAILED |
payment request failed |
ZPEXISTED |
Payment refference code existed, send transaction enquiry/status to check |
ZPFRAUD |
Payment is marked as fraud due to failure to pass fraud matrix |
get full transaction response as array
$zp->getFullResponseArray();
get full transaction response as Json
$zp->getFullResponseJson();
get transaction ID
$zp->getTransactionId();
get external transaction ID
$zp->getExternalTransactionId();
get Response message
$zp->getMessage();
get response transaction message
$zp->getTransactionMessage();
get errors
$zp->getErrors();
ANDROID TRANSACTION
Here is is quite simple and does not require much documents, your integration approval is done automatically.
Here you will need an account at gateway.zepsonsms.co.tz , go to device section and register your phone(Android),
create your zepsonpay account and create your app, business category select android, you'll get your app id and app key, use them to integrate with our API.,
your required to add device id( from Zepson SMS gateway) and your webhook secret by going to your gateway.zepsonsms.co.tz account, tools and select webhook, the create webhook, add url https://zepsonpay.com/webhook , you will get your webhook secret key, use it to integrate with our API.
For enquiries please visit zepsonpay.com
Zepson pay is the software as a service payment gateway designed to make payment integration through API's easly and avaliable to anyone. Zepson Engineers works on real world researches to get solution suitable for your business.
Roadmap
- Mnos Collection
- Mno's Desbursement
- Zepon pay agregation (Still in progress)
- VPN tunnelling (in progress)
Contributing
Contributions are always welcome to help make the package more user friendly!
Authors
License
zepson/zepsonpay-php 适用场景与选型建议
zepson/zepsonpay-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4 次下载、GitHub Stars 达 3, 最近一次更新时间为 2022 年 10 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 zepson/zepsonpay-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 zepson/zepsonpay-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-10-15

