Magento 2

Learn about using plugins to power up your Magento website

ℹ️ Maya Magento Plugin only supports straight payments. Alternatively, you can explore Shopify and WooCommerce plugins to satisfy your business needs.

1 Request Access to Maya Business Manager

Contact your assigned Relationship Manager to gain access to your Maya Manager Sandbox account.

🧠 Keep in mind

Maya Business Manager has two environments: Sandbox and Production.

  • Sandbox is used for development, testing, and integration. Once the integration is completed in this environment, it will be verified by our Operations team. Only then the production credentials will be provided.
  • Production is for live payments. Testing in this environment will incur real charges.

Both environments have the ability to generate API keys. Once your account is onboarded to a sandbox account, you need to log in to the manager account of your respective environment.

2 Generating API Keys

Generate your API keys by following the steps below:

Step 1: Login to Maya Manager Sandbox and generate your API Key.

Step 2: Go to the menu on the left side of the screen and look for API Keys.

Step 3: On the main navigation, select the name of the Merchant that you registered earlier. Then generate the API key by clicking Generate API Key.

Step 4: After being redirected to another screen, create keys for both Public and Secret policies.

Step 5: Click Create then your API key will be shown to you.


ℹ️ The same flow will be used when generating keys on to your Production environment.

⚠️ Save your API key in a secured location

The full API key will only be shown once. It is important that you store it in a secure location. If you lost your API key, try generating it again using the environment you are working on.

3 Install and configure Maya Business Plugin in Magento 2

⚠️ Must-have requirements before proceeding:

  1. A Maya Business Merchant Manager account
  2. A working Magento instance with shell/terminal access
  3. Technical know-how to navigate and execute commands in the terminal

3.1 Installing Maya Business Plugin

  1. Purchase Maya Business Plugin from Magento Marketplace. It is free.
  2. Users should install it according to the official extensions installation instructions page: Magento Extension Installation Guide.

3.2 Configuring Maya Business Plugin to accept payments

  1. Click Stores on the left-hand navigation and choose Configuration under Settings.
  1. On the Stores Configuration screen, click the Sales dropdown navigation menu on the left side of the main panel. Under it, click on the Payment Methods submenu. This will bring you to the Payment Methods screen where you can configure the Maya Business Plugin.
  1. On the Payment Methods screen, just click on the corresponding Configure button with the Maya Business Plugin.
  2. On the Maya Business Plugin Configuration section, under the Basic Settings section, you can configure the following fields:
    1. Mode - This is the mode of the plugin. You can set this dropdown field to either Test or Live mode.
    2. Public API Key - This is where your public API key from your Maya Business Merchant Manager dashboard will go. Depending on your Mode, you’ll either need to generate test or live keys in your manager dashboard. The value from your manager dashboard that goes in this field is normally prefixed with the characters ‘pk-’.
    3. Secret API Key - This is the same as your public API key, except this one is prefixed with the characters ‘sk-’.

  1. Under the Card Payments section, you can configure the following fields:
    1. Enabled - This determines whether or not the Maya payment method will show up in the Checkout page.
    2. Title - This is what the label of your Maya payment method in the checkout page is.
  2. For Webhook Settings section, no change needed. The URL configured in the Base URL field below will be automatically passed to Maya Manager once you click Save Config.

  1. Click Save Config when you have finished your configuration.

To ensure that the configuration was a success, login to your Maya Manager 1.0. Go to Webhooks, and select the Magento merchant.

You should find the Webhook URLs from your Magento plugin (based on the Base URL configured) successfully saved on Maya Manager 1.0.

3.3 [Recommended] Sandbox Mode Testing

ℹ️ At this point, you should have done the following:

  1. Generated Sandbox API Keys.
  2. You should have added products in your Magento store.

⚠️ Currently, only the Production environment is accessible through the Maya Business Manager. If you require Sandbox Access via the Maya Manager 1.0, please reach out to [email protected].

Stay tuned for more features to be released within the portal.

  1. Go to the Maya Business Magento Plugin configuration section, under the Basic Settings section.
  2. Set Mode to Test.
  3. Paste your public (pk-...) and secret (sk-...) keys generated from Maya Manager 1.0 Sandbox. Make sure that there are no extra whitespaces.

  1. Click Save Config.

To ensure that the configuration was a success, login to your Maya Manager 1.0 Sandbox. Go to Webhooks, and select the Magento merchant.

You should find the Webhook URLs from your Magento plugin (based on the Base URL configured) successfully saved on Maya Manager 1.0.

At this stage, you should now have a working checkout button that redirects your customer to Maya Checkout.

  1. Click the checkout button.
  2. You are redirected to Maya Checkout Page.
Sample Maya Checkout page

Sample Maya Checkout page

  1. Before your customer will input their payment details, their order will be marked as Pending Payment on your Magento Orders Dashboard.
  2. Once the payment is successful, go to your Magento Orders Dashboard. The order should now have the status Processing.

🧠 Keep in mind

During your tests on the Sandbox environment, you may use Maya’s Sandbox Credentials and Cards. You would be required to test card transactions: VISA, Mastercard, JCB; and e-wallet via Pay with Maya.

3.4 Go Live

Once you are done with your tests on the Sandbox Environment, it is time to move to Production.

ℹ️ At this point, you should have done the following:

  1. Generated Production API Keys.
  2. You should have added products in your Magento store.
  1. Go to the Maya Business Magento Plugin configuration section, under the Basic Settings section.
  2. Set Mode to Live.
  3. Paste your public (pk-...) and secret (sk-...) keys generated from Maya Manager 1.0 Production.. Make sure that there are no extra whitespaces.

  1. Click Save Config.

To ensure that the configuration was a success, login to your Maya Manager 1.0 Production. Go to Webhooks, and select the Magento merchant.

You should find the Webhook URLs from your Magento plugin (based on the Base URL configured) successfully saved on Maya Manager 1.0.

3.5 Live Testing

At this stage, when you checkout products from your store and proceed to payment, you should now be redirected to a live Maya Checkout page.

  1. Click the checkout button.
  2. You are redirected to Maya Checkout Page.
Sample Maya Checkout page

Sample Maya Checkout page

  1. Before your customer will input their payment details, their order will be marked as Pending Payment on your Magento Orders Dashboard.
  2. Once the payment is successful, go to your Magento Orders Dashboard. The order should now have the status Processing.

🧠 Keep in mind

If you wish to test live transactions in Production, you will need to use real cards and e-wallet accounts. Transactions performed will incur real charges.

Advanced Use Cases

Setup of Order Confirmation Email Notification

Email notification upon order confirmation is a Magento default behavior. To change that behavior:

  1. Under Miscellaneous Settings, configure the field Send order confirmation email before payment resolution to:
    1. Yes - If you want the order confirmation email to be sent before payment is made (regardless if payment resolution is successful or failure).
    2. No - If you want the order confirmation email not to be sent before payment is successful. For failed payments, no email will be sent.

Troubleshooting

ℹ️ For troubleshooting tips and guides, please refer to Magento Troubleshooting Guide.