G
G
Georgy Baruchyan2019-03-13 10:58:57
1C-Bitrix
Georgy Baruchyan, 2019-03-13 10:58:57

How to correctly specify the type of paid product Service?

Hello.
When setting up payment from the site and printing checks, I ran into a problem:
the type of paid product is printed in the checks as a Product, although the payment system settings indicate that this will be a service.
Fiscal data format is 1.05
The payment system uses the Sberbank module sberbank.ecom
Communication with the Sberbank TP did not bring any results.
Maybe someone faced such a problem.
Screenshot of payment system settings5c88b85bc3120879275413.jpeg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
George Baruchyan, 2019-03-14
@Snatch87

No matter how surprising, but the correct answer to my question was given by Bitrix TP. Well, not that true, but the problem is solved in this way:
Good afternoon!
Starting from version 18.5.10 of the online store module, in the OnSaleCheckPrepareData event handler for goods and delivery, in the PAYMENT_OBJECT field, you can change the type of settlement object
https://dev.1c-bitrix.ru/api_d7/bitrix/sale/events...
Possible PAYMENT_OBJECT field values:
\Bitrix\Sale\Cashbox\Check::PAYMENT_OBJECT_COMMODITY // product
\Bitrix\Sale\Cashbox\Check::PAYMENT_OBJECT_EXCISE // excise
\Bitrix\Sale\Cashbox\Check::PAYMENT_OBJECT_JOB // work
\Bitrix\Sale \Cashbox\Check::PAYMENT_OBJECT_SERVICE // service
\Bitrix\Sale\Cashbox\Check::PAYMENT_OBJECT_PAYMENT // payment
And indeed, I washed down the handler, in it for all goods I put down the Service Type \Bitrix\Sale\Cashbox\Check::PAYMENT_OBJECT_SERVICE

/**
     * @param array $a
     * @param string $type
     * @return array
     */
    public static function courseCheckPrepareDataHandler(array $a, string $type) : array{

        if(!empty($a['PRODUCTS'])){
            foreach($a['PRODUCTS'] as $key => $product){
                $a['PRODUCTS'][$key]['PAYMENT_OBJECT'] = \Bitrix\Sale\Cashbox\Check::PAYMENT_OBJECT_SERVICE;
            }
        }

        return $a;
    }

And the long-awaited inscription Service appears in the check.
I hope that my experience will be useful to someone.

S
sivll, 2021-01-22
@sivll

where to start?
Bitrix also wrote to us:
"... you need to add the processing of the OnSaleCheckPrepareData event"
but I don’t know how to add it .. tell
me This should be done in each payment system installed on the site? Is it possible to display the possibility of choosing a Product-Service in a product property? Since there is a part of finished goods, the rest are exhibited for example and will be made to order according to the buyer's size.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question