
外掛標籤
開發者團隊
原文外掛簡介
Ezone Pay creates payment-link checkout sessions from WordPress. The plugin stores a local payment reference, displays the returned payment link in an iframe, and updates payment status by polling the Ezone Pay API after the customer returns to WordPress.
Features:
Development and production API modes.
Separate API keys for development and production.
Embedded iframe checkout for payment links.
Payment confirmation using Ezone Pay payment-link details and transactions.
Shortcode-based payment button.
Important: embedded checkout depends on Ezone Pay allowing your site domain in iframe/frame headers. If the Ezone Pay checkout page blocks framing, Ezone Pay must allow the merchant site domain or the browser will block the iframe.
Configuration
The plugin supports two API modes:
Development: https://test.ezonepay.ly
Production: https://api.ezonepay.ly
To get a development API key, register or log in at https://demo.ezonepay.ly/, then go to الإعدادات > مفاتيح API.
To get a production API key, register or log in at https://my.ezonepay.ly/, then go to الإعدادات > مفاتيح API.
When creating an API key, enable these permissions:
إنشاء رابط دفع
عرض روابط الدفع
You can manage settings in WordPress admin or define constants in wp-config.php:
define('EZONE_PAY_API_MODE', 'dev');
define('EZONE_PAY_DEV_API_KEY', 'your-dev-secret-key');
define('EZONE_PAY_PRODUCTION_API_KEY', 'your-production-secret-key');
If your WordPress server cannot resolve one of the default API hosts, you can override the base URL:
define('EZONE_PAY_DEV_BASE_URL', 'https://test.ezonepay.ly');
define('EZONE_PAY_PRODUCTION_BASE_URL', 'https://api.ezonepay.ly');
Shortcode
Use:
[ezone_pay_button amount="0.1" reference="ORDER-123" title="Pay with Ezone"]
Optional customer fields:
[ezone_pay_button amount="0.1" reference="ORDER-123" title="Pay with Ezone" customer_first_name="Ali" customer_last_name="Saleh" customer_phone="0910000000"]
Ezone Pay requires customer data when creating a payment link. If the shortcode does not include customer details, the plugin sends WordPress Guest and 0910000000.
Customer data
The plugin sends customer data to Ezone Pay in this shape:
Customer.FirstName
Customer.LastName
Customer.PhoneNumber
Customer values can come from shortcode attributes:
[ezone_pay_button amount="0.1" reference="ORDER-123" title="Pay with Ezone" customer_first_name="Ali" customer_last_name="Saleh" customer_phone="0910000000"]
If the shortcode does not provide customer values, the plugin uses these defaults:
FirstName: WordPress
LastName: Guest
PhoneNumber: 0910000000
Developers can change the defaults with the ezone_pay_default_customer filter:
add_filter('ezone_pay_default_customer', function ($customer) { return ['FirstName' => 'Site', 'LastName' => 'Customer', 'PhoneNumber' => '0910000000']; });
Developers can read the stored customer data after payment completion from the ezone_pay_payment_marked_paid action:
add_action('ezone_pay_payment_marked_paid', function ($order_reference, $payment) { $first_name = $payment['customer']['FirstName'] ?? ''; $phone = $payment['customer']['PhoneNumber'] ?? ''; }, 10, 2);
Payment confirmation
When a customer clicks the shortcode button, the plugin creates a single-use Ezone Pay payment link and stores the local payment session in WordPress.
After Ezone Pay sends the customer back to WordPress, the plugin marks the local session as returned and polls Ezone Pay directly using payment-link details and transactions. The selected API key must have permission to create and view payment links.
The local status endpoint is:
/wp-json/ezone-pay/v1/status/{order_reference}?status_token={status_token}
That endpoint returns the current local payment status, such as pending, returned, or paid. The status token is generated by the plugin and stored with the payment session.
After payment is completed
When Ezone Pay confirms the payment, the plugin updates the stored payment status to paid, records paid_utc, and exposes filters/actions so the site can decide what to show or do next.
Developers can customize the payment completed message with the ezone_pay_completed_message filter, change the success URL with the ezone_pay_success_url filter, and provide site-specific content with the ezone_pay_completed_content filter.
To run custom site logic after a payment is marked paid, use the ezone_pay_payment_marked_paid action:
add_action('ezone_pay_payment_marked_paid', function ($order_reference, $payment) { /* Update your order here. */ }, 10, 2);
External services
This plugin connects to the Ezone Pay API to create payment links, display the Ezone Pay checkout page, and confirm whether a payment has been completed. This service is provided by Ezone.
The plugin connects to one of these Ezone Pay API endpoints depending on the selected environment mode:
Development: https://test.ezonepay.ly
Production: https://api.ezonepay.ly
When a visitor clicks the payment button, the plugin sends the configured Ezone Pay API key, payment amount, payment title, optional note, order reference, internal reference, WordPress return URL, and optional customer first name, last name, and phone number to Ezone Pay. This data is sent so Ezone Pay can create a payment link and return the checkout URL.
After the visitor is redirected back to WordPress, the plugin may send the configured Ezone Pay API key, payment link ID, amount, and order reference to Ezone Pay to check payment-link details and payment-link transactions. This data is sent so WordPress can confirm whether the payment was completed.
The checkout itself is loaded from the payment link returned by Ezone Pay. Any payment details entered by the customer inside the Ezone Pay checkout are submitted directly to Ezone Pay and are not processed by this plugin.
Terms of service: https://ezonepay.ly/ar/terms
Privacy policy: https://ezonepay.ly/ar/privacy
Trademark notice
This plugin uses the Ezone Pay name to identify the payment service it integrates with. Public distribution should only proceed after you confirm that you have permission from the Ezone Pay trademark owner to use the name, brand, and any related marks.
