B
B
by_ruiner2021-06-24 13:00:23
Payment systems
by_ruiner, 2021-06-24 13:00:23

Why can the refund method of a custom payment system in 1C-Bitrix not be executed?

For some reason, refunds through the administration panel stopped working in the self-written payment system. The refund method of the D7 handler has ceased to be called. Payment works as before, and returns occur as if bypassing the processor. The handler was written according to the examples of standard payment systems (bitrix/modules/sale/handlers/paysystem), previously it worked fine, but after the Bitrix update, refunds stopped being performed (the status in the admin panel changes, but the logic described in refund() is not executed).

I even tried to make a timeout for the test, but the payment went from the status "paid" to "not paid" instantly:

class BCCHandler extends PaySystem\ServiceHandler implements PaySystem\IRefund
{
    // код по оплатам...

    public function refund(Payment $payment, $refundableSum) { 
        sleep(10); 
    }
}


Tell me what could be the problem? Or maybe somewhere there is documentation on writing custom payment systems and possible errors hidden from everyone?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question