parkwayprojects/paywithbank3d-php 问题修复 & 功能扩展

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

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

parkwayprojects/paywithbank3d-php

Composer 安装命令:

composer require parkwayprojects/paywithbank3d-php

包简介

A PHP API wrapper for PayWithBank3D.

README 文档

README

Latest Version on Packagist Build Status Quality Score Total Downloads

PayWithBank3D PHP is a library for using the PayWithBank3D API from PHP.

Installation

You can install the package via composer:

composer require parkwayprojects/paywithbank3d-php

Usage

First you initialize the library with your public key, secret key and option(live or staging)

$bank3d = \ParkwayProjects\PayWithBank3D\PayWithBank3D::setup('Public Key', 'Secret Key', 'staging');

Transaction

initialize a transaction

\ParkwayProjects\PayWithBank3D\Transaction::addBody('reference', time())
            ->addBody('amount', '100000')
            ->addBody('currencyCode', 'NGN')
            ->addBody('customer', [
                'name' => 'Edward Paul',
                'email' => 'infinitypaul@live.com',
                'phone' => '0848494839'
            ])
            ->addBody('returnUrl', 'https://infinitypaul.com')
            ->addBody('color', '#FF0000')
            ->addBody('metadata', [
                'orderId'=> '1234'
            ])->getAuthorizationUrl()->redirectNow();

This will automatically take you to secure payment page on PayWithBank3D, Once payment is completed, you are redirected to the url you specify in the returnURL

Verify Transaction

\ParkwayProjects\PayWithBank3D\Transaction::verify();

This return the status of the payment you just made and some other values of the transaction

Configuration Parameters

Parameter Required Description
amount True Amount to be charged in kobo.
color False You get to choose a theme color for the payment modal that reflects your brand
customer True This is an object that contains customer details
email False Customer email address
metadata False This is an object that allows you to add additional detail(s) to your request
phone False Phone number of customer
reference False Your unique transaction reference.
returnUrl True Url Redirected To After A Successful Payment.

Testing

composer test

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-07-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固