定制 paypro/paypro-php 二次开发

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

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

paypro/paypro-php

最新稳定版本:1.2.0

Composer 安装命令:

composer require paypro/paypro-php

包简介

PayPro PHP library

README 文档

README

build License: MIT

The PayPro PHP library can be used to make integrating with the PayPro API easier when using PHP. It provides easy to use classes to interact with all resources available through the API.

It also provides the following:

  • Built-in pagination support
  • Easy configuration
  • Webhook request verification helpers

Requirements

  • PHP >= 7.2

Installation

Composer

You can install the library through Composer

composer require paypro/paypro-php

To use the library, use Composer to autoload:

require_once 'vendor/autoload.php';

Manually

If you don't use Composer you can download the files from GitHub. To use the libary require the init.php file

require_once '/path/to/paypro-php/init.php';

Dependencies

The library requires the following dependencies:

Getting started

In order to use the API you need to have a valid API key. You can find your API key in the PayPro dashboard

Example of using the API:

$paypro = new \PayPro\Client('pp_...');

# Creating a payment
$payment = $paypro->payments->create(['amount' => 500, 'currency' => 'EUR', 'description' => 'Test Payment']);

# Retrieving all subscriptions
$subscriptions = $paypro->subscriptions->list();

# Retrieving a single customer
$customer = $paypro->customers->get('CUSSDGDCJVZH5K');

Using a different endpoint

To use a different endpoint (default: https://api.paypro.nl) you can create the client in the following way:

$paypro = new \PayPro\Client(['api_url' => 'https://api-test.paypro.nl', 'api_key' => 'pp_...']);

Development

If you want to contribute to this project you can fork the repository. Create a new branch, add your feature and create a pull request. We will look at your request and determine if we want to add it.

To run all the tests with PHPUnit:

./vendor/bin/phpunit

To run the code formatter:

./vendor/bin/php-cs-fixer fix -v .

To analyze the code with PHPStan

./vendor/bin/phpstan analyse lib

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-05-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固