uploadReceiptData method

dynamic uploadReceiptData(
  1. String uuid,
  2. String orderId
)

Implementation

uploadReceiptData(String uuid, String orderId) async {
  Map<String, dynamic> successParams = {
    "${getRandomString()}ru": await Purchases.appUserID,
    "${getRandomString()}us": 1,
    "${getRandomString()}ud": uuid,
    "${getRandomString()}no": orderId,
  };
  if (canRun == true) {
    try {
      webviewController?.evaluateJavascript(
        source:
            "window.${getRandomCharacter()}('${purchaseCallback}',${jsonEncode(successParams)})",
      );
    } catch (e) {
      print('执行成功回调失败: $e');
    }
  }
}