$AmountToPay = $order->order_full_price*100;
$PayToMerchant = $method->payment_params->merchantid;
$MerchantName = 'XXXX';.......etc for $AmountCurrency ,$Details1 ,$Details2
next
$zero = '0';
$password = 'XXXXX';
//$password = $method->payment_params->encriptionkey;
$len_AmountToPay = strlen($AmountToPay);
$len_PayToMerchant = strlen($PayToMerchant);
$len_MerchantName = strlen($MerchantName); etc
next
if ($len_AmountToPay<10) {
$nula_AmountToPay = '0';
}
else {
$nula_AmountToPay = '';
}
next
$parameters_value = $zero.$nula_AmountToPay.$len_AmountToPay.$zero.$nula_PayToMerchant.$len_PayToMerchant.$.....etc
$CheckSumHeader = '16AmountToPay,PayToMerchant,MerchantName,....etc'.$parameters_value;
$CheckSum = $CheckSumHeader.$AmountToPay.$PayToMerchant.$MerchantName.$AmountCurrency.$Details1.$Details2.etc;
$CheckSum_control = md5($CheckSum);
<form id="hikashop_casys_form" name="hikashop_casys_form" action="<?php echo $gateway_url?>" method="post" >
<input id='AmountToPay' name='AmountToPay' value='<?php echo $AmountToPay; ?>' type='hidden' />
..... etc other input.
FATAL param[FirstName].Length=4 , given length in CheckSumHeader =8 this is because before get lengt for field i must to encod to the UTF8 with utf8_decode(field)you think problem will be solved?