createPaymentIntent method
Implementation
@override
Future<Map> createPaymentIntent(
String token, Map<String, dynamic> paymentIntentInfo) async {
final baseUrl = await getBaseUrl;
var url = Uri.parse("$baseUrl/api/v1/pa/payment_intents/create");
var jsonBody = jsonEncode(paymentIntentInfo);
var response = await http.post(
url,
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer $token"
},
body: jsonBody,
);
var data = jsonDecode(response.body);
return data;
}