定制 gianninasd/pplib 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

gianninasd/pplib

最新稳定版本:v1.0.2

Composer 安装命令:

composer require gianninasd/pplib

包简介

PHP Library for payment processing integration

README 文档

README

Latest Stable Version Latest Unstable Version Total Downloads

PPLib

PHP Library for payment processing integration

Pre-requisites

  • Install Composer
  • Install PHP 7.x

Getting started

  • Clone the repo from github to your local machine
  • Install all dependencies, run composer install and a vendor folder will be generated

Automated Tests

  • Update the values of the global variables in the tests/unit/_bootstrap.php file
  • To execute the unit tests, from a console run: vendor/bin/codecept.bat run unit

Usage

Below is some sample code on how to use the various classes to prepare, send and process a payment.

// will be your own class representing the full billing data
$member = new class {
  ...
  public $firstName = "John";
  public $lastName = "Doe";
  ...
};

$parser = new PaysafeParser();

// create the JSON body first
$obj = $parser->parseRequest( $uuid, $token, $member, $amt );
$body = json_encode($obj, JSON_NUMERIC_CHECK);

$req = new PaymentRequest();
$req->id = "rick@sdf3.com";
$req->uuid = uniqid("", true);
$req->body = $body;

// Send the request to the remote third party service provider
$ps = new PaysafePaymentService( "https://somedomain.com/somepath", "some authentication token" );
$resp = $ps->process( $req );

// Process the response
$jsonResponse = $parser->parseResponse( $resp );
echo( $jsonResponse );

References

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-03-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固