Detailed Tutorial: How to Connect the Moyasar Payment Gateway with WooCommerce
Integrating the Moyasar payment gateway with WooCommerce can help you accept payments securely and efficiently on your WordPress e-commerce store. This step-by-step guide will walk you through the entire process in detail to ensure a smooth setup.
Step 1: Prerequisites
Before starting, make sure you have the following ready:
- WordPress Website: Ensure WordPress is installed and working properly.
- WooCommerce Plugin: WooCommerce must be installed and activated on your site. If not:
- Go to Plugins > Add New in your WordPress dashboard.
- Search for “WooCommerce” and install/activate it.
- Moyasar Account: Create an account on Moyasar if you don’t have one.
- API Keys from Moyasar:
- Log into your Moyasar account.
- Navigate to Settings > API Keys.
- Copy both the Publishable Key and Secret Key — these are required for the integration.
Step 2: Installing the Moyasar Plugin
To connect Moyasar to WooCommerce, you need the Moyasar plugin:
Option 1: Install via WordPress Repository
- Log in to your WordPress Admin Dashboard.
- Go to Plugins > Add New.
- Search for
Moyasar WooCommerce Payment Gateway
. - Click Install Now and then click Activate once the installation is complete.
Option 2: Install Manually
- Download the Moyasar plugin from their official website or GitHub repository, if available.
- Log in to your WordPress Admin Dashboard.
- Go to Plugins > Add New > Upload Plugin.
- Upload the plugin
.zip
file and click Install Now. - Activate the plugin after installation.
Step 3: Configure Moyasar Payment Gateway
- Navigate to WooCommerce > Settings in the WordPress Admin Dashboard.
- Click on the Payments tab. This section lists all payment methods available for your store.
- Locate Moyasar Payment Gateway in the list and click Set up or Manage.
Step 4: Enter API Credentials
In the Moyasar settings page:
- Copy the Publishable Key and Secret Key from your Moyasar account (found under API Keys) and paste them into their respective fields.
- Configure additional settings:
- Enable/Disable Test Mode: Use test mode to simulate transactions during setup without processing real payments.
- Payment Title: Enter a title for how Moyasar appears at checkout (e.g., “Pay with Moyasar”).
- Description: Add a short description explaining how customers can pay using Moyasar (e.g., “Secure payments via Mada and credit cards”).
- Click Save Changes.
Step 5: Set Up Test Mode
Before going live, it’s important to test the integration:
- In the Moyasar settings, enable Test Mode by ticking the checkbox.
- Place a dummy order on your WooCommerce store:
- Add an item to your cart and proceed to checkout.
- Select “Pay with Moyasar” as the payment method on the checkout page.
- Complete the payment using test card details provided by Moyasar (refer to their documentation for sample card numbers).
- Verify that:
- The order is created successfully in WooCommerce (check under Orders).
- The transaction appears in the Moyasar dashboard under test transactions.
Step 6: Enable Live Mode
Once testing is successful:
- Go back to the Moyasar settings in WooCommerce.
- Disable Test Mode by unticking the checkbox.
- Save your changes.
Your store is now ready to accept live payments through Moyasar!
Step 7: Additional Customizations
Customize Checkout Experience
To improve user experience:
- Edit the title and description of the payment method in WooCommerce settings.
- Use translation plugins (like WPML or Loco Translate) if you need to display text in multiple languages.
Styling
If you want to customize how Moyasar appears visually, you can use custom CSS or plugins that manage WooCommerce checkout styling.
Step 8: Troubleshooting Common Issues
If you encounter any problems, here are some solutions:
- API Key Errors: Double-check that you’ve copied and pasted the correct Publishable Key and Secret Key from your Moyasar account.
- SSL Certificate Issues: Ensure your site has an active SSL certificate—payment gateways require secure connections.
- Plugin Compatibility: Keep both WooCommerce and the Moyasar plugin updated to avoid compatibility issues.
- Failed Transactions: If payments fail, check:
- The credentials in the plugin settings.
- Your Moyasar account dashboard for possible restrictions or errors.
FAQs
Can I Accept Mada Payments?
Yes! Moyasar supports Mada, which is widely used in Saudi Arabia. Customers can select Mada cards during checkout.
How Do I Monitor Transactions?
You can track all transactions directly from your Moyasar dashboard under “Payments.”
Is Multi-Currency Supported?
Moyasar primarily supports SAR (Saudi Riyal), but check their documentation for updates regarding multi-currency support.
Final Notes
Integrating Moyasar with WooCommerce is easy if you follow these steps carefully. After setup, regularly monitor orders and transactions to ensure everything is running smoothly.
For further assistance, refer to:
- Moyasar Official Documentation
- WooCommerce support forums
- Contact Moyasar’s customer support for specific issues
Let me know if you need help with any part of this setup!