Snap OpenCart Integration Steps

  1. Plugin Installation
  2. Transaction Test


  1. An online store with OpenCart infrastructure. This plugin is tested with OpenCart v2.0, v2.1, and v2.2.
  2. PHP v5.4 or greater.
  3. MySQL v5.0 or greater.
  4. Midtrans plugin for OpenCart [ Github | Zip ].

Installation Process

  1. Download and extract the plugin from this repository.
  2. Locate the root OpenCart directory of your shop via FTP connection.
  3. Copy the admin, catalog and system folders to your OpenCart's root folder, and merge it.
  4. Go to Extension - Payments menu in OpenCart admin page.
  5. Find and install Midtrans module to activate plugin.
  6. In Midtrans module, click Edit to enter plugin page.

    • Fill Title with text button that you want to display to customer.
    • Select Environment. Sandbox for testing transaction and Production for real transaction.
    • Fill Client and Server key. You can find this credential on Midtrans MAP Dashboard.
      OpenCart Setting

  7. Login to MAP portal to configure few options below:

    URL Role Redirect URL
    Payment Notification URL http://[your-site-url]/index.php?route=payment/snap/payment_notification
    Finish Redirect URL http://[your-site-url]/index.php?route=payment/snap/landing_redir&
    Error Redirect URL http://[your-site-url]/index.php?route=payment/snap/landing_redir&
    Unfinish Redirect URL http://[your-site-url]/index.php?route=payment/snap/landing_redir&

  1. Perform successful transaction in your online store by inputing a dummy credit card number as followed (Sandbox Mode):

    Type Visa
    Card Number 4811 1111 1111 1114
    CVV 123
    Exp. Month 01
    Exp. Year 2020

  2. Examine a few points below to ensure plugin is installed and performs properly.

    Check Point Expected Result When Unexpected Result Occurs
    Check order status in OpenCart back end Order status turns into processing Check endpoint/payment notification URL setting in MAP
    Merchant receives email notification Receive notification Check MAP menu setting - email notification
    Customer receives email notification Receive notification Check MAP menu setting - email notification