applePayWebviewRequest static method

Future<String?> applePayWebviewRequest({
  1. required String encodedString,
})

Implementation

static Future<String?> applePayWebviewRequest({required String encodedString}) async {
  final url = Uri.parse(ApiEndPoint.applepay_URL);
  Map<String, dynamic> body = {"data": encodedString};
  //List<int> body = utf8.encode("encryptData=$encodedString");
  var result = await http.post(url, body: body);
  if (result.statusCode == 200) {
    var response = result.body;
    print(response);
    return response;
  }
  return "";
}