refundPayment method

Future<Map<String, dynamic>> refundPayment(
  1. String paymentId
)

Implementation

Future<Map<String, dynamic>> refundPayment(String paymentId) async {
  final token = await _getAccessToken();
  final url = '$_paymentUrl/$paymentId/refund';

  final response = await _dio.post(
    url,
    options: Options(
      contentType: Headers.formUrlEncodedContentType,
      headers: {'Authorization': 'Bearer $token'},
    ),
  );
  return response.data;
}