getStr method

String getStr({
  1. required String request_time,
  2. required String request_data,
})

getHash

request_time: unique request time

request_data: base64_encode string

Example:

var partner = PaywayPartner();
var helper = PaywayPartnerClientHelper(partner);
var tranID = DateTime.now().microsecondsSinceEpoch.toString();
var request_time = DateTime.now().toUtc();
var request_data = "base_64 string";
var hash = helper.getHash(request_time: request_time, request_data: request_data);
print(hash);

Implementation

String getStr({
  required String request_time,
  required String request_data,
}) {
  // String =
  // partner_id + request_data + req_time
  assert(partner != null);
  var str = "${partner!.partnerID}$request_data$request_time";

  return str;
}