mod_payment_paypal

Provide PayPal Orders checkout through mod_payment.

Enable this module together with mod_payment. Select it with #payment_request{preferred_psp_module = mod_payment_paypal}. Recurring checkout creation is not supported.

Site configuration

Use System → Payment configuration with use.mod_admin_config to set:

  • is_live: use PayPal live instead of sandbox; defaults to false.
  • client_id and secret: REST API credentials for that environment.
  • webhook_id: the ID of the PayPal webhook registered for /paypal/webhook, used when verifying incoming signatures.
  • enable_reporting_polling: opt into Transaction Search discovery. Defaults to false and requires the additional reporting/search/read permission.

The return route /paypal/ready/:payment_nr captures approved orders. Cancellation uses signed state and checks the remote order before changing local status. Webhooks are verified through PayPal before passing supported events to the shared payment receive logic.

Unknown-payment imports require mod_payment.accept_unknown_payments. Four-hour reporting discovery also requires enable_reporting_polling and an unset/false mod_payment.disable_unknown_payment_polling. It selects positive payment transactions within the retention window, not every account ledger entry. Ordinary checkout and webhooks do not require the reporting option.

Configuration

Configuration keys declared by this module. The defaults below are from the source code.

Module Key Type Default Description
mod_payment_paypal enable_reporting_polling boolean false Discover account payments using Transaction Search; requires the extra reporting/search/read permission.
mod_payment_paypal is_live boolean false Use the live PayPal checkout environment instead of the sandbox environment.
mod_payment_paypal client_id binary <<>> PayPal REST API client id.
mod_payment_paypal secret binary <<>> PayPal REST API secret.
mod_payment_paypal webhook_id binary <<>> PayPal webhook id, used for webhook signature verification.

Observes

Notification

payment_psp_poll

Notification

payment_psp_request

Notification

payment_psp_status_sync

Notification

payment_psp_view_url

Models

Models

m_payment_paypal_api

Create, capture and synchronize PayPal Orders and verify webhook events.

Controllers

Dispatch rules