angelleye/paypal-php-library
Composer 安装命令:
composer require angelleye/paypal-php-library
包简介
PHP wrapper for PayPal APIs
关键字:
README 文档
README
This PHP class library for PayPal makes it easy to integrate PayPal APIs, including the PayPal REST APIs and Classic APIs like the Payments Standard Button Manager, Invoicing, General Merchant APIs, and Permissions.
Server Requirements
- PHP version 5.3.0 or newer.
- cURL
Installation
Video Overview
Composer Install
Create a composer.json file with the following section and run composer update.
"require": { "php": ">=5.3.0", "ext-curl": "*", "angelleye/paypal-php-library": "3.0.*" }
Manual Install (without Composer)
- Download the class library and extract the contents do a directory in your project structure.
- Upload the files to your web server.
Setup
Open /samples/config/config-sample.php, fill out your details accordingly, and save-as config.php to a location of your choice.
To use the library in your project, include the following into your file(s).
- /path/to/config.php
- autoload.php
Usage
-
Open the template file that corresponds to the API call you'd like to make.
- Example: If we want to make a call to the RefundTransaction API we open up /templates/RefundTransaction.php
-
You may leave the file here, or save this file to the location on your web server where you'd like this call to be made.
- I like to save the files to a separate location and keep the ones included with the library as empty templates.
- Note that you can also copy/paste the template code into your own file(s).
-
Each template file prepares the PayPal class object for you and includes PHP arrays for every parameter available to that particular API. Simply fill in the array parameters with your own dynamic (or static) data. This data may come from:
- Session Variables
- General Variables
- Database Recordsets
- Static Values
- Etc.
-
When you run the file you will get a $PayPalResult array that consists of all the response parameters from PayPal, original request parameters sent to PayPal, and raw request/response info for troubleshooting.
- You may refer to the PayPal Developer Documentation for details about what response parameters you can expect to get back from any successful API request.
- Example: When working with RefundTransaction, I can see that PayPal will return a REFUNDTRANSACTIONID, FEEREFUNDAMT, etc. As such, I know that those values will be included in $PayPalResult['REFUNDTRANSACTIONID'] and $PayPalResult['FEEREFUNDAMT'] respectively.
- You may refer to the PayPal Developer Documentation for details about what response parameters you can expect to get back from any successful API request.
-
If errors occur they will be available in $PayPalResult['ERRORS']
You may refer to this overview video of how to use the library, and there are also samples provided in the /samples directory as well as blank templates ready to use under /templates.
If you need additional help you may place an order for premium support.
Fully Functional Demos
The library comes with basic usage samples, but if you feel more comfortable seeing the integration inside a fully functional demo that is built into a basic shopping cart system, take a look at our demo kits available on our website.
You can find our FREE demos inside /demo directory. If you have purchased any demo then you just need to add those inside demo directory and its ready to go.
Tutorials
Supported APIs
REST APIs
- Orders API
- Payments API
- Invoicing API
- Identity API
- Billing Plans API
- Billing Agreements API
- PayPal Sync API
- Customer Disputes API
- Payouts API
- Vault API
- Webhooks Management API
Payments Standard Button Manager
- BMButtonSearch
- BMCreateButton
- BMGetButtonDetails
- BMGetInventory
- BMManageButtonStatus
- BMSetInventory
- BMUpdateButton
Button Manager
Invoicing
- CancelInvoice
- CreateAndSendInvoice
- CreateInvoice
- DeleteInvoice
- GenerateInvoiceNumber
- GetInvoiceDetails
- MarkInvoiceAsPaid
- MarkInvoiceAsRefunded
- MarkInvoiceAsUnpaid
- RemindInvoice
- SearchInvoices
- SendInvoice
- UpdateInvoice
Merchant
- AddressVerify
- BAUpdate
- BillOutstandingAmount
- Callback (Express Checkout)
- CreateBillingAgreement
- CreateRecurringPaymentsProfile
- DoAuthorization
- DoCapture
- DoDirectPayment
- DoExpressCheckoutPayment
- DoNonReferencedCredit
- DoReauthorization
- DoReferenceTransaction
- DoVoid
- GetBalance
- GetBillingAgreementCustomerDetails
- GetExpressCheckoutDetails
- GetPalDetails
- GetRecurringPaymentsProfileDetails
- GetRecurringPaymentsProfileStatus
- GetTransactionDetails
- ManagePendingTransactionStatus
- ManageRecurringPaymentsProfileStatus
- MassPay
- RefundTransaction
- SetCustomerBillingAgreement
- SetExpressCheckout
- TransactionSearch
- UpdateRecurringPaymentsProfile
Permissions
- CancelPermissions
- GetAccessToken
- GetAdvancedPersonalData
- GetBasicPersonalData
- GetPermissions
- RequestPermissions
PayPal Manager (PayFlow Gateway)
Financing Banners
- FinancingBannerEnrollment
Deprecated
- DoMobileCheckoutPayment
- GetAccessPermissionsDetails
- GetAuthDetails
- SetAccessPermissions
- SetAuthFlowParam
- SetMobileCheckout
- UpdateAccessPermissions
- Adaptive Accounts
- Adaptive Payments
Resources
angelleye/paypal-php-library 适用场景与选型建议
angelleye/paypal-php-library 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 451.16k 次下载、GitHub Stars 达 242, 最近一次更新时间为 2014 年 03 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「rest」 「api」 「paypal」 「express checkout」 「adaptive payments」 「payflow」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 angelleye/paypal-php-library 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 angelleye/paypal-php-library 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 angelleye/paypal-php-library 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PayPal SDK for ExpressCheckout and AdaptivePayments. Supports recurring payments, simple payments, parallel payments and chained payments.
A PayPal IPN (Instant Payment Notification) listener for PHP
Librería para la gestión sencilla de pagos mediante TPV Redsys y Paypal
A PSR-7 compatible library for making CRUD API endpoints
Api bundle
Rich payment solutions for Laravel framework. Paypal, payex, authorize.net, be2bill, omnipay, recurring paymens, instant notifications and many more
统计信息
- 总下载量: 451.16k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 245
- 点击次数: 33
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2014-03-25