• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/cashbox/cashboxyookassa.php
  • Класс: BitrixSaleCashboxCashboxYooKassa
  • Вызов: CashboxYooKassa::getHeaders
private function getHeaders(SalePayment $payment): array
{
	$headers = [
		'Content-Type' => 'application/json',
		'Idempotence-Key' => $this->getIdempotenceKey(),
	];

	try
	{
		$headers['Authorization'] = $this->getAuthorizationHeader($payment);
	}
	catch (Exception $ex)
	{
		$headers['Authorization'] = 'Basic '.$this->getBasicAuthString($payment);
	}

	return $headers;
}