Answer the question
In order to leave comments, you need to log in
Installing a custom payment method for the cloud version of Bitrix. What did you do wrong?
I wrote a custom payment method and compiled it into an installer.
on the boxed version, the installation is successful and the new payment method is displayed.
In the cloud version, I get
the installer code (index.php)
<?php
/**
* Odrazu Payment Module
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* @category Odrazu
* @package eshop.odrazu
* @version 1.0.0
* @author Odrazu
* @copyright Copyright (c) 2021 Odrazu
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*
* EXTENSION INFORMATION
*
* 1C-Bitrix 20.0
* Odrazu API https://2m2.ua
*
*/
use Bitrix\Main\Localization\Loc;
use Bitrix\Main\ModuleManager;
Loc::loadMessages(__FILE__);
class odrazu extends CModule
{
const MODULE_ID = 'odrazu';
const PARTNER_NAME = 'eshop';
const PARTNER_URI = 'https://2m2.ua';
var $MODULE_ID = 'odrazu';
var $PARTNER_NAME = 'eshop';
var $PARTNER_URI = 'https://2m2.ua';
public $MODULE_GROUP_RIGHTS = 'N';
public function __construct()
{
$arModuleVersion = [];
include(__DIR__.'/version.php');
$this->MODULE_ID = 'odrazu';
$this->MODULE_NAME = Loc::getMessage('ODRAZU_MODULE_NAME');
$this->MODULE_DESCRIPTION = Loc::getMessage('ODRAZU_MODULE_DESC');
$this->MODULE_VERSION = $arModuleVersion['VERSION'];
$this->MODULE_VERSION_DATE = $arModuleVersion['VERSION_DATE'];
$this->PARTNER_NAME = 'eshop';
$this->PARTNER_URI = 'https://2m2.ua';
}
public function DoInstall()
{
global $APPLICATION;
$this->InstallFiles();
ModuleManager::registerModule($this->MODULE_ID);
}
public function DoUninstall()
{
ModuleManager::unRegisterModule($this->MODULE_ID);
$this->UnInstallFiles();
}
public function InstallFiles()
{
CopyDirFiles(
__DIR__.'/sale_payment',
$_SERVER['DOCUMENT_ROOT'].'/bitrix/php_interface/include/sale_payment',
true, true
);
}
public function UnInstallFiles()
{
DeleteDirFilesEx($_SERVER['DOCUMENT_ROOT']."/bitrix/php_interface/include/sale_payment/".$this->MODULE_ID);
return true;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question