getCheckValue function

String getCheckValue({
  1. required String merchantKey,
  2. required String merchantToken,
  3. required String invoiceId,
  4. required String amount,
  5. required String currencyCode,
})

Implementation

String getCheckValue({
  required String merchantKey,
  required String merchantToken,
  required String invoiceId,
  required String amount,
  required String currencyCode
}) {
  String hash1 = sha512.convert(utf8.encode(merchantToken)).toString().toUpperCase();
  String hash2 = sha512.convert(utf8.encode("$merchantKey|$invoiceId|$amount|$currencyCode|$hash1")).toString().toUpperCase();
  return hash2;
}