teleconsultationCapturePayment method
Future
teleconsultationCapturePayment(
{ - dynamic transactionId,
- dynamic context,
})
Implementation
Future teleconsultationCapturePayment({transactionId, context}) async {
var decodedResponse;
final ApiBody = {
"teleconsult_order_id": '$teleconsultationPlaceOrderId',
"transaction_id": '$transactionId'
};
http.Response response = await http.post(
Uri.parse(
'${medicine_API}api/teleconsultation/capture-payment-details'),
headers: {
'Authorization': currentUserToken,
},
body: ApiBody);
print(ApiBody);
decodedResponse = json.decode(response.body);
getCapturePaymentData = decodedResponse;
if (decodedResponse['success'] == true) {
print(teleconsultationOrderDetailsId);
Get.offAll(MyProfileScreen());
Get.to(MyOrders(fromScreen: 'teleconsultation'));
Get.to(TeleconsultationOrderDetails(
Order_Id: teleconsultationOrderDetailsId));
} else {
Validator().errorMessage(
context: context, message: "${decodedResponse['message']}");
}
}