TestPlaceorder method

Future TestPlaceorder()

Implementation

Future TestPlaceorder() async {
  Map data = {
    "insert_id": "${Testorderid}",
    "user_package_id": "${userpackageId}",
    "check_use_wallet": "${checkbox}",
  };
  var body = jsonEncode(data);

  final response = await http.post(
    Uri.parse('${SDK_BASE_URL}api/diagnostics/place_order'),
    headers: {'Authorization': SignUpController.currentUserToken},
    body: body,
  );

  var decodedResponse = json.decode(response.body);
  await UniversalCallBack().CallBackPayment(
      fromplace: 'Test',
      userpackageIdmedicin: "${userpackageId}",
      callbackurl:
          '${decodedResponse['data']['razorpay_details']['call_back_url']}',
      insertid: Testorderid.toString());

  Get.to(PaymentPopup(
      messag: '${decodedResponse['data']['message']}',
      image: '${LottiePath}Upload_Successful.json',
      fromplace: 'Test'));
  await LocalDatabaseForDiagnostics.instance.DeletedbPaymentList();
}