Linux 软件免费装
Banner图

Donation Router for GiveWP & PayPal Donations

开发者 mralaminahamed
更新时间 2026年7月7日 18:46
捐献地址: 去捐款
PHP版本: 8.1 及以上
WordPress版本: 6.9
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

paypal donations charity givewp country-routing

下载

1.1.0 1.0.0

详情介绍:

Donation Router for GiveWP & PayPal extends the GiveWP PayPal Donations gateway so that a single WordPress installation can accept donations through several PayPal Business accounts, automatically routing each transaction to the correct account based on the donor's declared country. This plugin is an independent, third-party extension. It is not affiliated with, endorsed by, or sponsored by GiveWP (StellarWP) or PayPal. The names "GiveWP" and "PayPal" appear here solely to describe compatibility with those products. This plugin is designed for organisations that operate two or more legally distinct charity entities — for example a US 501(c)(3) and a Canadian CRA-registered charity — that share a single donation website but must process payments through separate PayPal accounts and issue separate tax receipts. Key features:

安装:

  1. Upload the alamin-donation-router folder to the /wp-content/plugins/ directory.
  2. Run composer install --no-dev --optimize-autoloader inside the plugin directory.
  3. Ensure AUTH_KEY and SECURE_AUTH_SALT are set to strong, unique values in wp-config.php — these are required for credential encryption.
  4. Activate the plugin through the Plugins screen in WordPress.
  5. Navigate to Donation Forms → PayPal Accounts and add your first PayPal Business account.
  6. Configure country routing rules under the Country Routing tab.
  7. Add the shortcode [ador_country_selector] to your donation landing page.
  8. Register per-account webhook URLs in your PayPal Developer apps (see the Webhook Setup view for each account).
For detailed configuration instructions, see operations.md in the GitHub repository.

屏幕截图:

  • Add Account form — entering legal entity details and connecting a PayPal Business account via OAuth.
  • Country Routing list table — routing rules mapping donor countries to donation forms and PayPal accounts.
  • Webhook Setup view — per-account webhook URL with one-click copy and the required PayPal event type list.
  • Country selector popup — donor-facing modal that lets donors choose their country/legal entity before checkout.
  • Plugin Settings tab — configuring the country selector popup, geolocation provider, PDF receipts, and legal acknowledgement.
  • Edit Account form — per-account legal entity details and receipt template editor with available GiveWP email tags.

常见问题:

Which payment gateways does this plugin support?

This plugin supports the GiveWP PayPal Donations gateway (also known as PayPal Commerce / PPCP) only. It does not affect or support other GiveWP gateways such as Stripe, Authorize.net, or PayPal Standard.

How many PayPal accounts can I add?

There is no hard limit on the number of PayPal Business accounts you can configure. Each account requires its own PayPal Developer REST app (Client ID and Client Secret) and its own webhook URL registered in PayPal's developer portal.

How are PayPal credentials stored? Is it safe?

Yes. PayPal Client IDs and Client Secrets are never stored in plaintext. They are encrypted with AES-256-GCM using a key derived via HKDF-SHA256 (RFC 5869) from your WordPress AUTH_KEY and SECURE_AUTH_SALT constants (32-byte key). The random nonce and GCM authentication tag are stored alongside the ciphertext as a base64 blob. Credentials are never written to any log. If AUTH_KEY or SECURE_AUTH_SALT are changed, stored credentials become unreadable and must be re-entered.

Can I test with PayPal sandbox accounts before going live?

Yes. The plugin works with both PayPal sandbox and live environments. Add your sandbox accounts the same way as live accounts, using the Client IDs and Secrets from your sandbox REST apps. Register sandbox webhook URLs in PayPal's developer portal using a publicly accessible HTTPS URL (use a tunnelling tool such as ngrok for local development). See operations.md for a full sandbox testing procedure.

What happens if a routing rule is missing for a donor's country?

If no active routing rule exists for the selected country, the credential router falls back to GiveWP's primary PayPal account. The donation is not blocked — it proceeds normally using the default account. An error entry is written to the PHP error log with prefix [ADOR] for the operator's attention.

Does this plugin modify GiveWP core files?

No. The plugin hooks into GiveWP exclusively through WordPress filters, actions, and GiveWP's public IoC container (give()). No GiveWP core files are modified.

Can I use this plugin with GiveWP's built-in email receipts?

Yes. The plugin registers additional GiveWP email template tags that you can insert into your existing GiveWP email templates (GiveWP → Settings → Emails). Tags include {paypal_account_entity_name}, {paypal_account_entity_tax_id}, {paypal_account_receipt_number}, and four others. Tags return an empty string for donations not routed through this plugin, so existing templates work without changes.

The PDF receipt is not generating. What should I check?

Verify that dompdf/dompdf is installed by running composer install in the plugin directory. Confirm that the ador_pdf_receipts_enabled option is set to a truthy value in wp_options. Check the PHP error log for a line beginning [ADOR] PDF receipts disabled: — this will include the underlying error message.

更新日志:

1.1.0 - 2026-07-06 Added Changed Fixed Removed 1.0.0 - 2026-05-07 Added Security