-
Notifications
You must be signed in to change notification settings - Fork 1
/
functions.php
22 lines (20 loc) · 901 Bytes
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
function generateChecksum($transId,$sellingCurrencyAmount,$accountingCurrencyAmount,$status, $rkey,$key)
{
$str = "$transId|$sellingCurrencyAmount|$accountingCurrencyAmount|$status|$rkey|$key";
$generatedCheckSum = md5($str);
return $generatedCheckSum;
}
function verifyChecksum($paymentTypeId, $transId, $userId, $userType, $transactionType, $invoiceIds, $debitNoteIds, $description, $sellingCurrencyAmount, $accountingCurrencyAmount, $key, $checksum)
{
$str = "$paymentTypeId|$transId|$userId|$userType|$transactionType|$invoiceIds|$debitNoteIds|$description|$sellingCurrencyAmount|$accountingCurrencyAmount|$key";
$generatedCheckSum = md5($str);
// echo $str."<BR>";
// echo "Generated CheckSum: ".$generatedCheckSum."<BR>";
// echo "Received Checksum: ".$checksum."<BR>";
if($generatedCheckSum == $checksum)
return true ;
else
return false ;
}
?>