<?
$data = array(
  'ik_co_id' => $IK_CO_ID,
  'ik_pm_no' => $pay_id,
  'ik_am' => $pay_cost,
  'ik_cur' => 'RUB',
  'ik_desc' => $pay_desc,
  'ik_x_service' => $pay_service,
  'ik_x_service_id' => $pay_service_id,
  'ik_desc' => $pay_desc,
);

ksort($data, SORT_STRING);
array_push($data, $SECRET_KEY);
$common_string = implode(':', $data);

// hash отправляемых данных с паролем
$hash = base64_encode(md5($common_string, true));
?>
<form id="payment" name="payment" action="https://sci.interkassa.com/" enctype="utf-8" method="POST">
	<input type="hidden" name="ik_co_id" value="<?= $IK_CO_ID?>" />
	<input type="hidden" name="ik_pm_no" value="<?= $pay_id?>" />
	<input type="hidden" name="ik_am" value="<?= $pay_cost?>" />
	<input type="hidden" name="ik_cur" value="RUB" /> 
	<input type="hidden" name="ik_desc" value="<?= $pay_desc?>" />
	<input type="hidden" name="ik_x_service" value="<?= $pay_service?>" />
	<input type="hidden" name="ik_x_service_id" value="<?= $pay_service_id?>" />
	<input type="hidden" name="ik_sign" value="<?= $hash?>" />
  <button type="submit" class="btn btn-success"><?= __('Оплатить')?> <?= $pay_cost?> руб.</button>
</form>