A
A
Andrew2019-06-15 11:57:41
PHP
Andrew, 2019-06-15 11:57:41

Why doesn't CSalePaySystemAction::GetParamValue work in helper.php?

Hello. I am embedding the payment system in the Bitrix Framework. After setting up, I go to the payment page and it gives an error.

The key 'APPROVE_METHOD' was not found in the GLOBALS[SALE_CORRESPONDENCE] array and no default value was defined.

The key "APPROVE_METHOD" is declared in
.description.php

The D7 kernel documentation says that calling data with
CSalePaySystemAction::GetParamValue
only available in file
payment.php
but the payment system is written so that helpers work first.
helper.php
in which there is an appeal to the data of the payment system
CSalePaySystemAction::GetParamValue("APPROVE_METHOD");
which is why the error occurs.
Question: Is it possible to call values ​​in helper.php or change them somehow? File connection
.description.php
does not solve this problem.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2020-04-29
@alexToster

and in a helper you connect classes through namespaces?
Most probably not

Z
ZardoZAntony, 2021-06-24
@ZardoZAntony

Interestingly, CSalePaySystemAction::GetParamValue also returned empty in payment.php. But there was $arResult, from where I got everything I needed.
And on another site there is no $arResult, but CSalePaySystemAction::GetParamValue works. Wonderful are your Bitrix))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question