Errors
Error codes returned by the PayLexer plugin's developer API.
Functions return a WP_Error; adapter methods throw an Exception whose get_error_code() returns the same code.
Codes
| Code | Meaning |
|---|---|
paylexer_register_too_late | paylexer_register_platform() or paylexer_register_adapter() called outside paylexer_init. |
paylexer_invalid_platform_id, paylexer_duplicate_platform, paylexer_platform_name_required | Bad registration. |
paylexer_unknown_platform | Platform not registered. HTTP status 403 in the error data. |
paylexer_feature_not_declared | Not in the platform's supports. 403. |
paylexer_not_connected | PayLexer isn't connected, or checkout is paused for the site. 503. |
paylexer_unknown_gateway | Gateway not enabled for this site. |
paylexer_currency_not_supported, paylexer_subscriptions_not_supported | Gateway can't take this payment. |
paylexer_invalid_amount, paylexer_invalid_email, paylexer_return_url_required, paylexer_invalid_subscription | Bad input. |
paylexer_billing_address_required | The gateway needs a billing address field. |
paylexer_not_found | No such order or subscription for this platform, including ones created by other platforms. |
paylexer_no_order_reference, paylexer_no_checkout_url, paylexer_no_subscription_id | PayLexer returned an incomplete response. |
Errors from PayLexer
Errors from PayLexer itself pass through as paylexer_api_error or paylexer_tenant_service_error, with PayLexer's message, for example Order is not refundable (status: PENDING).
Example
WP_Error( 'paylexer_not_connected', 'PayLexer is not connected.', array( 'status' => 503 ) )
For the common codes, Troubleshooting pairs each cause with its fix.
Was this page helpful?