Magento 2 Setup Guide

Accept Cryptocurrencies in Magento at low cost!

Valter avatar
Written by Valter
Updated over a week ago

Prerequisite:

Magento version: 2.x

Step 1: Register Crypto.com Pay Account

  1. Sign up for a Crypto.com Pay account, if you don't already have one.

  2. Navigate to the “Settings” tab on your dashboard and, complete the KYC requirements.

Once you have access to the Crypto.com Pay Merchant Dashboard, You will be able to generate a secret key and publishable key pair. The API keys can be found inside the Integration > API Keys tab.

Note: You can switch between the Test Data toggle on the left menu to access the API Keys in Live Mode and Test Mode: if the toggle is on, the API Keys are in Test Mode; if it is off, the API Keys are in Live Mode.

Step 2: Install the plugin on Magento

You can learn more about the Crypto.com Pay plugin from our GitHub Repository and install as follows:

  1. Download the module zip package in Releases page

  2. Extract and upload all files to your Magento 2 installation path, i.e. move /code/Cdcpay in the zip file to /app/code/Cdcpay in the Magento server

  3. Login to your server, and in the root of your Magento2 install, run the following commands:
    php bin/magento setup:upgrade
    php bin/magento module:enable Cdcpay_CDCCheckout
    php bin/magento setup:static-content:deploy -f

  4. Flush your Magento2 Caches
    php bin/magento cache:flush

Installation is done and you can now activate Crypto.com Pay in your Magento Store.

Note: If you encountered errors like “The requested class did not generate properly, because the ‘generated’ directory permission is read-only.” or “Can’t create directory” errors in your Magento 2 store, that means the file permissions in your environment are not configured correctly. You can refer to Magento’s documentation to update the settings.

Step 3: Activate Crypto.com Pay on Magento

  1. Log in to the Magento admin panel.

  2. Navigate to Stores > Configuration > Sales > Payment Methods.

  3. Navigate to Crypto.com Pay and expand the configurations.

  4. Select Yes” in Enabled.

  5. If you would like to enable LIVE transactions without testing the flow, you can skip the following and go to Step 5.

  6. Fill in the Secret Key in Test Mode with the values you obtained from Step 1.

  7. Select “Yes” in Test Mode.

  8. Copy the webhook url in the description of Webhook signature secret in Test Mode and replace the [Store URL] with your Magento Store’s URL.

  9. Navigate back to Crypto.com merchant dashboard and ensure Test Data toggle is switched on at the left menu.

  10. Go to Integration > Webhooks tab.

  11. Click Add Webhook button and then paste the webhook url copied into Payload URL, then a signature secret for the webhook will be generated.

  12. Copy and paste the signature secret back to the Webhook signature secret in Test Mode in Magento’s configurations page.

  13. Click Save Config button to save the configurations.

Note: Please make sure to configure Test Mode in the form correctly, based on whether you are testing or not, and please make sure you input the secrets keys correctly as they are different between Test Mode and Live Mode.

Step 4: Verify the flow

At this point, Crypto.com Pay is fully integrated with your Magento. But it is recommended to try the payment flow at least once.

Refer here for how to complete a test payment.

When Crypto.com Pay approves the payment, the checkout window will indicate that the payment has been approved and your order status will also be updated.

Step 5: Configure Account for LIVE transactions

Once the payment flow is thoroughly tested, you could enable LIVE transactions by following the below:

  1. Log in to Magento’s admin panel, and navigate to Stores > Configuration > Sales > Payment Methods, and expand Crypto.com Pay configurations.

  2. Select “No” in Test Mode.

  3. Fill in Secret Key in Live Mode with the Live Mode’s Secret Key you obtained from the Merchant Dashboard.

  4. Copy the webhook url in the description of Webhook signature secret in Live Mode and replace the [Store URL] with your Magento Store’s URL.

  5. Navigate back to Crypto.com merchant dashboard and ensure Test Data toggle is switched off at the left menu.

  6. Go to Integration > Webhooks tab.

  7. Click Add Webhook button and then paste the webhook url copied into Payload URL, then a signature secret for the webhook will be generated.

  8. Copy and paste the signature secret back to the Webhook signature secret in Live Mode in Magento’s configurations page.

  9. Click Save Config button to save the configurations.

Congratulations, you could now accept cryptocurrency payments in Live Mode.

Did this answer your question?