I need to integrate PayTrace 3rd party payment gateway in Magento 2.

Can you explain how to add it?


My Magento v2.0.17


You can use the sample Magento_SamplePaymentGateway module files as basis for your custom module structure and files.

Your custom payment integration module must have at least the following dependencies:

  • Magento_Sales module: to be able to get order details
  • Magento_Payment module: to use the Magento payment provider gateway infrastructure
  • Magento_Checkout module: to be able to add the new payment method to checkout .

If you do not plan to use it on the storefront checkout, this dependency is not required.

Specify these dependencies in your composer.json and module.xml files.


%Vendor_Module%/composer.json file, specify the dependencies like in the following example:

    "require": {
        "magento/module-payment": "100.1.*",
        "magento/module-checkout": "100.1.*",
        "magento/module-sales": "100.1.*",



Add the same dependencies in %Vendor_Module%/etc/module.xml like in the following example:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Vendor_Module" setup_version="2.0.0">
            <module name="Magento_Sales"/>
            <module name="Magento_Payment"/>
            <module name="Magento_Checkout"/>

After this follow Magento DevDocs

For more reference


We have created new extension for paytrace, you can review it here



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.