Payment Gateway Setup (2Checkout)

Overview
Please follow the instructions below to activate this gateway. If the payment gateway's interface has changed or if the screenshots (where applicable) look different, please let me know.
2Checkout INS - Setup
1: Sign up for a 2Checkout account.
2: Log into your 2Checkout account.
3: Select "Notifications" from the menu OR in their new cpanel "Integrations > Webhooks & API". Make sure the INS is enabled.
4: Generate a secret word and enter it in your Maian Cart admin area along with your 2Checkout account no.
4: In ALL the notification boxes (or "Enable Global Url" in new cpanel) enter the full http path to the 'checkout/twocheckout.php' callback file in your cart installation:

Example:
http://www.example.com/checkout/twocheckout.php (Or https if over SSL)

5: Make sure ALL notifications are enabled. 2Checkout requires that the domain you use for your store is on the same domain as your account. This is important!
6: Enter applicable details in your Maian Cart admin area:

Sales > Payment Methods > 2Checkout
2Checkout - Callback Url
The callback url for all operations is:

http://www.example.com/checkout/twocheckout.php
https://www.example.com/checkout/twocheckout.php (SSL)

Where 'example.com' is your own domain.
2Checkout - Sandbox
2Checkout doesn`t have a sandbox system. The only way to mimic the callback is to use their INS Simulator.

The simulator should send back the "ORDER_CREATED - 1 product" callback first, followed by the "FRAUD_STATUS_CHANGED" callback. Point the simulator to the callback url as set above. Other things are required for this to work. For this you will need to view the log file created from the initial payment test.

vendor_id - Your 2Checkout vendor ID.
sale_id - The Sale ID. This is in the log file name. Example: 2checkout-15.txt is sale ID 15.
vendor_order_id - Must be the value in "merchant_order_id" field in the logs file. Example: 1ee9dab5a2f4e2083f86-15
invoice_list_amount - The exact amount for the sale as shown in the "total" field in the log file. Example: 1.99
invoice_id - Random number.
md5_hash - For the hash you need to concatenate and md5 the following:

saleID+vendorID+invoiceNo+secretWord

Example: 1+12345+56789+secret = 02679D0CE664EA168C001873D72812F2

The first 3 values must be sent in the forms the same. All other field values are irrelevant. Once you have triggered the callback, view the log file if something didn`t quite happen how you were expecting it to.

If you aren`t sure you`ll probably have to test with a live payment.
If you prefer you can also use free rest clients instead of the simulator. Both Postman and Insomnia are excellent choices.