activatePaymentLink method

  1. @override
Future<Map> activatePaymentLink(
  1. String token,
  2. String paymentLinkId
)
override

Implementation

@override
Future<Map> activatePaymentLink(String token, String paymentLinkId) async {
  final baseUrl = await getBaseUrl;
  var url =
      Uri.parse("$baseUrl/api/v1/pa/payment_links/$paymentLinkId/activate");

  var response = await http.post(
    url,
    headers: {
      "Content-Type": "application/json",
      "Authorization": "Bearer $token"
    },
  );
  var data = jsonDecode(response.body);
  return data;
}