-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
executable file
·20 lines (18 loc) · 909 Bytes
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
function generateChecksum($transId, $sellingCurrencyAmount, $accountingCurrencyAmount, $status, $rkey, $key) {
$str = "$transId|$sellingCurrencyAmount|$accountingCurrencyAmount|$status|$rkey|$key";
$generatedCheckSum = md5($str);
return $generatedCheckSum;
}
function verifyChecksum1($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;
}
?>