ShopCMS
The Module Setup and Installation Instruction
- Download the archive with the module. 
- Copy the contents of the Unitpay directory from the archive to the root of your site. 
- Go to Modules -> Payment modules and click Install. 
- Click Edit next to the installed Unitpay module. 
- Enter DOMAIN (unitpay.money), PUBLIC KEY, and SECRET KEY which you can get in your Unitpay.money personal account. 
- Select the statuses which will be assigned to the order in case of successful or failed payment. 
- Save your changes. 
- Go to Settings -> Payment options and add a new payment option - Unitpay. 
- Add the following code to core/includes/helper.php file: 
// Helper for Unitpay
// Result Url - index.php?unitpay=yes
if(isset($_GET["unitpay"])){
    $data = $_GET;
    $params = $data['params'];
    $orderID = (int)$params['account'];
    $q = db_query( "select paymethod  from ".ORDERS_TABLE." where orderID=".$orderID);
    $order = db_fetch_row($q);
    if ( $order )
    {
        $paymentMethod = payGetPaymentMethodById( $order["paymethod"] );
        $currentPaymentModule = modGetModuleObj( $paymentMethod["module_id"], PAYMENT_MODULE );
        if ( $currentPaymentModule != null ) $result = $currentPaymentModule->after_payment_php( $_GET );
    }else{
        header('Content-Type: application/json');
        $result = array('error' =>
            array('message' => 'Order not present')
        );
        $result = json_encode($result);
        die($result);
    }
}
<br>10. Clear your cache by deleting the contents of the cache folder.
11. In your Unitpay.ru personal account, enter the address of the payment handler http://<your site address>/ndex.php?unitpay=yes
12. VAT is set inside the module settings Modules - > Payment Modules -> Unitpay Separately for goods and separately for delivery, possible options: vat0, vat10, vat20, none
Last updated
Was this helpful?
