Magento 2 Extension Integration Guide

Instructions for setting up Dagpay for your Magento 2-based e-Commerce Store.

Installing the Plugin (via FTP)

  1. Look for the Magento 2 extension in the Magento marketplace.
  2. Login to your hosting space via an FTP client and navigate to the Magento root directory.
  3. Create a new directory app/code if it does not exist and unzip the extension .zip file there.
  4. After installing the plugin, make sure to run the following command setup:upgrade at the command line to edit one of the database tables. If you don't run it, Magento will not store the Dagpay invoice IDs in the database and the invoice will be unusable.
  5. Log in to the Magento Admin Panel and from the side, navigation go to System > Web Setup Wizard and select Module Manager.
  6. Locate the extension in the list and enable it from the Action select dropdown on the right column. Go through the steps as instructed.
  7. The extension should now be ready for configuration


Creating your Dagpay Integration Environment

  1. Log in to your Dagpay account and head over to Merchant Tools from the side menu, select Integrations, and click Add Integration.
  2. Select Magento as integration type and add your environment details: Name, Description and select your Wallet for Receiving Payments.
  3. Add your site domain address in the status URL field for server-to-server communication and redirect URLs.
    • The status URL for Magento is 
      https://store_base_path/dagcoin/response 
    • Change store_base_path with your store domain address.
      For example, https://mymagentostore.com/dagcoin/response
    • Redirect URLs to redirect back to your store from the payment view depending on the final outcome of the transaction (can be set the same for all states).
      For example, https://mymagentostore.com/success/
  4. Click on Create Environment after filling out all the required fields and you will be displayed your integration environment details and generated the Environment ID, User ID, and Secret Credentials.


Setup & Configuration

  1. After successfully installing the extension and creating the integration environment in your Dagpay account, return to your Magento Admin Panel and navigate to Stores > Configuration, and locate the Sales panel. From there select Payment Methods and look for the Dagpay Payment Gateway.
  2. Enter the Environment ID, User ID, and SecretCredentials from your newly created Dagpay integration environment to the corresponding fields.
    • If you wish to use the Dagpay test environment, which enables you to test Dagpay payments using Testnet Dags, enable Test Mode. Please note, for Test Mode, you must create a separate account on test.dagpay.io, create an integration and generate environment credentials there. Environment credentials generated on dagpay.io are 'Live' credentials and will not work for Test Mode.
  3. Save changes and you are good to go. Dagpay should now be working in your Magento Store.


Plugin Limitations

This plugin has been developed to work with Magento 2. It will not work for older Magento versions.