承接 phpjuice/paypal-http-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

phpjuice/paypal-http-client

最新稳定版本:v1.2.0

Composer 安装命令:

composer require phpjuice/paypal-http-client

包简介

PHP Http Client for PayPal's REST API

README 文档

README

Tests Latest Stable Version Total Downloads License

This Package is a PHP Http Client. It provides a simple, fluent API to interact with PayPal rest API.

To learn all about it, head over to the extensive documentation.

Installation

This Package requires PHP 7.4 or higher.

One can install this package via Composer.

composer require "phpjuice/paypal-http-client"

Setup

PayPal HTTP Client is designed to simplify using the new PayPal checkout api in your app.

Setup Credentials

Get client ID and client secret by visiting the PayPal Developer Account and generating a REST API app.

Setup Paypal Client

In order to communicate with PayPal platform we need to set up a client first :

Create a client with sandbox environment:

<?php use PayPal\Http\Environment\SandboxEnvironment; use PayPal\Http\PayPalClient; // client id and client secret retrieved from PayPal $clientId = "<<PAYPAL-CLIENT-ID>>"; $clientSecret = "<<PAYPAL-CLIENT-SECRET>>"; // create a new sandbox environment $environment = new SandboxEnvironment($clientId, $clientSecret); // create a new client $client = new PayPalClient($environment);

Create a client with production environment:

<?php use PayPal\Http\Environment\ProductionEnvironment; use PayPal\Http\PayPalClient; // client id and client secret retrieved from PayPal $clientId = "<<PAYPAL-CLIENT-ID>>"; $clientSecret = "<<PAYPAL-CLIENT-SECRET>>"; // create a new sandbox environment $environment = new ProductionEnvironment($clientId, $clientSecret); // create a new client $client = new PayPalClient($environment);

Changelog

Please see the CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details and a todo list.

Security

If you discover any security related issues, please email author instead of using the issue tracker.

Credits

License

Please see the Licence file.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固