Answer the question
In order to leave comments, you need to log in
How to make your own processor for the payment system in 1C-Bitrix based on the existing one?
I am finalizing the website of the online store, on CMS 1C-Bitrix, Small Business edition. Based on the payment system "Sberbank Receipt", I want my own payment system handler, it is not clear in the Bitrix documentation how to correctly place the custom payment system handler.
link to documentation
link to additional article
According to the instructions, I placed my payment system in the local/php_interface/include/sale_payment/ folder.
Now I have done the following:
[Bitrix\Main\SystemException]
The key "SELLER_PARAMS" was not found in the GLOBALS[SALE_CORRESPONDENCE] array and the default value is not defined. Order ID: "144", payment system ID: "16" (CAllSalePaySystemAction::GetParamValue) (1)
C:\OpenServer\domains\ovsinka\bitrix\modules\sale\general\pay_system_action.php:127
#0: CAllSalePaySystemAction: :GetParamValue(string)
C:\OpenServer\domains\ovsinka\local\php_interface\include\sale_payment\test\payment.php:19
#1: require(string)
C:\OpenServer\domains\ovsinka\bitrix\modules\sale \lib\paysystem\compatibilityhandler.php:209
#2: Bitrix\Sale\PaySystem\CompatibilityHandler->includeFile(string)
C:\OpenServer\domains\ovsinka\bitrix\modules\sale\lib\paysystem\compatibilityhandler.php:65
#3: Bitrix\Sale\PaySystem\CompatibilityHandler->initiatePay(object, NULL)
C:\OpenServer\domains\ovsinka \bitrix\modules\sale\lib\paysystem\service.php:75
#4: Bitrix\Sale\PaySystem\Service->initiatePay(object, NULL, integer)
C:\OpenServer\domains\ovsinka\local\components\alex \sale.order.ajax\class.php:6129
#5: SaleOrderAjax->showOrderAction()
C:\OpenServer\domains\ovsinka\local\components\alex\sale.order.ajax\class.php:6019
#6: SaleOrderAjax->doAction(string)
C:\OpenServer\domains\ovsinka\local\components\alex\sale.order.ajax\class.php:6282
#7: SaleOrderAjax->executeComponent()
C:\OpenServer\domains\ovsinka\bitrix\modules\main\classes\general\component.php:649
#8: CBitrixComponent->includeComponent(string, array, NULL)
C:\OpenServer\domains\ovsinka\bitrix\modules \main\classes\general\main.php:1039
#9: CAllMain->IncludeComponent(string, string, array)
C:\OpenServer\domains\ovsinka\personal\order\make\index.php:125
Answer the question
In order to leave comments, you need to log in
handler.php should be in the same folder.
As far as I understand, the payment.php file is not required at all, since its role is to pre-check the data and launch the initiatePay method from handler.php
If there is no payment.php file in the custom handler, then initiatePay is called immediately, without any errors. Validation of input data can be done in the same place.
That is, you can copy any handler from "/bitrix/modules/sale/handlers/paysystem/", move it to "/local/php_interface/include/sale_payment/" and customize (in this case it will replace the system one). Or you can use it as a template and create your own based on it.
Alexander, did you manage to modify the handler? Where can you see the result?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question