Pay is a PHP payment SDK extension package that unifies integration with multiple Chinese payment providers including Alipay, WeChat Pay, Douyin, Unipay, and Jiangsu Bank.
The project addresses the fragmentation of payment gateway APIs by providing a single, unified interface for handling payments across multiple providers. Rather than learning each provider's distinct API, developers work with a consistent abstraction layer. The tool handles the complexity of JSON and XML construction, certificate management for WeChat's public certificates, and provider-specific quirks, exposing only clean, intuitive methods. It supports the full feature set of each provider including service provider functionality through a plugin mechanism.
Developers building PHP applications that need to accept payments from Chinese users should consider this tool. It suits projects ranging from web applications to mini-programs that require integration with Alipay, WeChat Pay, or other domestic payment methods. The codebase is organized for clarity and extensibility, allowing developers to add unsupported payment gateways without modifying core code. Framework-specific packages exist for Laravel, Hyperf, and Yii, enabling seamless integration into those ecosystems. The tool adheres to multiple PHP standards including PSR-2, PSR-3, PSR-4, PSR-7, PSR-11, PSR-14, and PSR-18, making it compatible with various frameworks and libraries.
The project maintains active test coverage and code quality checks across its workflow. Development follows consistent coding standards with automated style enforcement. The architecture underwent significant redesign between major versions to improve extensibility and usability, indicating ongoing refinement of the core design. The project includes comprehensive documentation and welcomes community contributions.