mohan-devstack/magento2-paypal-rest-checkout
Composer 安装命令:
composer require mohan-devstack/magento2-paypal-rest-checkout
包简介
Standalone PayPal REST Orders v2 payment integration for Magento 2. No Magento_Paypal or SOAP/NVP dependency. Server-side redirect checkout with capture, refund, and admin transaction support.
README 文档
README
A standalone PayPal REST Orders v2 payment module for Magento 2. Uses only the modern REST API — no dependency on Magento_Paypal, SOAP, or the deprecated NVP/SOAP stack that PayPal is retiring.
Features
- PayPal REST Orders v2 API (
/v2/checkout/orders) - Server-side redirect checkout flow — no JS SDK required
- Automatic invoice generation on successful capture
- Online refunds (full and partial) via credit memo
- Admin transaction detail page with PayPal capture information
- Sandbox / Live toggle in admin config
- No
Magento_Paypaldependency
Requirements
- Magento 2.4.4 or later
- PHP 8.1 or later
- PayPal REST API credentials (Client ID + Secret from developer.paypal.com)
Installation
Via Composer (recommended)
composer require mohan/magento2-paypal-rest-checkout php bin/magento module:enable Mohan_PaypalRest php bin/magento setup:upgrade php bin/magento cache:clean
Manual
- Copy the module to
app/code/Mohan/PaypalRest/ - Run:
php bin/magento module:enable Mohan_PaypalRest php bin/magento setup:upgrade php bin/magento cache:clean
Configuration
Stores > Configuration > Mohan > PayPal REST Checkout
| Field | Description |
|---|---|
| Enabled | Enable/disable the payment method |
| Payment Title | Label shown at checkout (default: "PayPal") |
| Sort Order | Position in the payment method list |
| Payment from Applicable Countries | Restrict to specific countries |
| Use Sandbox | Enable for testing; disable for production |
| Client ID | From developer.paypal.com REST app |
| Client Secret | From developer.paypal.com REST app |
Checkout Flow
- Customer selects PayPal at checkout and clicks Place Order
- Magento creates the order in
pending_paymentstate - Module creates a PayPal Orders v2 order and redirects the customer to PayPal
- Customer approves on PayPal and is returned to the store
- Module captures the payment, generates an invoice, and moves the order to
processing - Order confirmation email is sent
Refunds
Full and partial refunds are processed via Sales > Orders > Credit Memo in the Magento admin. The module calls /v2/payments/captures/{id}/refund on PayPal automatically.
Support
- Email: mohandevstack@gmail.com
License
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: OSL-3.0
- 更新时间: 2026-07-14