dezlov/php-paypal-ipn 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

dezlov/php-paypal-ipn

Composer 安装命令:

composer require dezlov/php-paypal-ipn

包简介

A class for handling Instant Payment Notifications (IPN) from PayPal.

README 文档

README

A PHP class for handling Instant Payment Notifications (IPN) from PayPal.

Features:

  • Switch between live and sandbox by setting the use_sandbox property.
  • Supports HTTPS (SSL) transactions by default (HTTP is discontinued by PayPal as of 2016).
  • Supports both cURL and fsockopen network libraries by setting the use_curl property (cURL is recommended).
  • Verifies an HTTP 200 response status code from the PayPal server.
  • Get detailed plain text reports of the entire IPN using the getTextReport() method for use in emails and logs to administrators.
  • Throws various exceptions to differentiate between common errors in code or server configuration versus invalid IPN responses.

Requirements:

  • PHP 5.3.0 or newer.
  • cURL extension (if use_curl property is enabled).

Documentation

The source code contains PHPDoc style comments which essentially provide a function reference.

Example scripts ranging from basic IPN verification to a complete order processing chain, and a sample report as returned by the getTextReport() method, can be found in the Examples folder.

This package is available via Composer at dezlov/php-paypal-ipn.

Getting Started

You should understand how the IPN process works conceptually and you should understand when and why you would be using IPN. Reading the PayPal Instant Payment Notification Guide is a good place to start.

You should also have a PayPal Sandbox Account with a test buyer account and a test seller account. When logged into your sandbox account there is an IPN simulator under the "Test Tools" menu which you can use to test your IPN listener.

Once you have your sandbox account setup, you simply create a PHP script that will be your IPN listener. In that script, use the IpnListener() class as demonstrated in the Examples.

Also consider reading this in-depth tutorial about the IPN process and how to implementing an IPN listener script in PHP.

History

Changes between versions are documented in the CHANGELOG.md.

This library was forked from WadeShuler/PHP-PayPal-IPN which in turn was forked from Quixotix/PHP-PayPal-IPN.

Below is a brief summary of their differences and reasons for forking:

  1. Quixotix's version is no longer maintained and contains various critical issues.
  2. WadeShuler's version was meant to address all issues of the original version, however, several breaking changes have been made unnecessarily.
  3. The goal of this version is to keep the library operational by fixing any issues, while trying to retain backward compatibility with the original version.

License

This work is licensed under GPL 2.0.

Copyright notice from the original author: LICENSE.

dezlov/php-paypal-ipn 适用场景与选型建议

dezlov/php-paypal-ipn 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9.32k 次下载、GitHub Stars 达 9, 最近一次更新时间为 2015 年 12 月 18 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「paypal」 「ipn」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 dezlov/php-paypal-ipn 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 dezlov/php-paypal-ipn 我们能提供哪些服务?
定制开发 / 二次开发

基于 dezlov/php-paypal-ipn 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 9
  • Watchers: 5
  • Forks: 208
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2015-12-18