pageTrace method
Implementation
Future<http.Response> pageTrace({
String? url,
String? pageType,
String? applicationId,
String? userId,
List<StatItem>? items,
String? ver,
}) async {
var list = items?.map((e) => e.toJson()).toList();
var payload = {
"ver": ver ?? '',
"application_id": applicationId ?? '',
"referer": '',
"sk": await UserInfo.getBootpaySK(),
"user_id": userId ?? '',
"url": url ?? '',
"page_type": pageType ?? 'ios',
"items": list
};
var aes256 = BootpaySimpleAES256();
var data = {
"data": aes256.strEncode(json.encode(payload)),
"session_key": aes256.getSessionKey()
};
var uri = Uri.parse('$defaultUrl/call');
return await http.post(
uri,
body: data
);
}