WooCommerce

WooCommerce — Merchant installation and setup

Overview

The MyPay plugin for WooCommerce connects your store to the MyPay payment platform (mypay.ly) so you can offer local payment methods at checkout. Orders are confirmed using a signed webhook, not by relying on the customer’s browser return alone.

Guide version: 1.0.0 (aligned with the plugin header).


Requirements

  • WordPress: 5.0 or newer.
  • WooCommerce: Installed and active.
  • PHP: 7.0 or newer.
  • HTTPS: Strongly recommended for production (payments and webhook delivery).
  • MyPay merchant account: Active, with API and gateway access enabled.

What you need from the MyPay dashboard

Before configuring the plugin, prepare the following in your MyPay merchant dashboard:

  1. Client ID and Secret ID (integration / API credentials).
  2. Webhook Secret (used to verify signatures on incoming webhook requests).
  3. Enable the payment gateways you want to offer in MyPay gateway settings (if your dashboard separates gateways per alias).

Installation steps

1) Get the plugin package

  • Download mypay-woo.zip from the source MyPay provides (for example the merchant dashboard or developer area, if available).
  • Do not rename the folder inside the archive if documentation refers to the path mypay-woo.

2) Upload the plugin in WordPress

  1. In wp-admin: Plugins → Add New → Upload Plugin.
  2. Choose mypay-woo.zip, then Install Now.
  3. When installation finishes, click Activate.

Alternative: Unzip the package and upload the mypay-woo folder via FTP/SFTP to wp-content/plugins/, then activate from the Plugins screen.

3) Confirm WooCommerce

Make sure WooCommerce is running and that your store currency and checkout settings match how you operate.


Configuration and connection to MyPay

  1. Go to WooCommerce → Settings → Payments.
  2. Open MyPay (the main gateway).
  3. Enable the gateway (for example Enable MyPay).
  4. Enter Client ID and Secret ID from the MyPay dashboard.
  5. Environment:
    • Production: Sandbox mode off — requests use the production path (/pay/api/v1).
    • Sandbox: Sandbox mode on — requests use the sandbox path (/pay/sandbox/api/v1).
  6. Copy the Webhook URL shown in the plugin and add it to your MyPay webhook/API settings (per your dashboard UI).
  7. Paste the same Webhook Secret from MyPay into the plugin field — it must match exactly so signatures (X-MyPay-Signature) validate.
  8. Save changes.

Optional alias gateways

If your MyPay account exposes alias gateways (for example Yasr Pay, Masrafi Pay, Sahara Pay, Banking Card for moamalat, Edfali), enable each corresponding method under Payments in WooCommerce. Credentials and environment still come from the main MyPay gateway settings.


How orders are confirmed

  • The customer returning from the payment page is not enough on its own to finalize an order safely.
  • The authoritative source for final payment status is a signed webhook from MyPay; the plugin is built around that flow.

Troubleshooting

  • Payment methods do not appear: Check that the plugin is active, the method is enabled under Payments, and the gateway is enabled in MyPay.
  • Order does not complete after payment: Verify Webhook Secret matches, HTTPS is available, and nothing blocks POST requests to the webhook URL.
  • Sandbox vs production errors: Check the Sandbox toggle in the main MyPay gateway settings.

Privacy and tracking (summary)

  • Operational tracking on MyPay’s side is limited (for example connectivity checks, webhook health, and compliance-related support), per platform policy.
  • Full customer data or complete order payloads are not sent as part of optional plugin health metadata, as described in the plugin policy/readme.