oneafricamedia/omnipay-pesapal 问题修复 & 功能扩展

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

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

oneafricamedia/omnipay-pesapal

Composer 安装命令:

composer require oneafricamedia/omnipay-pesapal

包简介

Pesapal gateway for Omnipay payment processing library

README 文档

README

Pesapal driver for the Omnipay PHP payment processing library

Maintainability Test Coverage Style CI Scrutinizer Code Quality

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP. This package implements Pesapal support for Omnipay. https://www.pesapal.com/ refer to the API docs here: http://developer.pesapal.com/

Install

Via Composer

$ composer require oneafricamedia/omnipay-pesapal

Basic Usage

Get the pesapal iframe/redirect URL

use Omnipay\Omnipay;


$url = Omnipay::create('Pesapal')
    ->setCredentials(
        'your_key', 
        'your_secret'
    )
    ->setCallbackUrl('https://example.com/callback')
    ->getUrl(
        'test@example.com',
        'my_reference',
        'description',
        100
    );

Check transaction status (from the pesapal ipn)

  1. configure & setup an endpoint to receive the ipn message from pesapal
  2. listen for the message and use getTransactionStatus (please handle the http GET vars accordingly)
use Omnipay\Omnipay;


$status = Omnipay::create('Pesapal')
    ->setCredentials(
        'your_key', 
        'your_secret'
    )
    ->getTransactionStatus(
        $_GET['pesapal_notification_type'],
        $_GET['pesapal_transaction_tracking_id'],
        $_GET['pesapal_merchant_reference']
    );
    
  1. $status will be either PENDING, COMPLETED, FAILED or INVALID. Handle these statuses in your application workflow accordingly.

TODO

  1. Test coverage
  2. add QueryPaymentStatusByMerchantRef support
  3. add QueryPaymentDetails support

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 30
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-03-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固