承接 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

统计信息

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

GitHub 信息

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

其他信息

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