sendPaymentLink method
Implementation
@override
Future<String> sendPaymentLink(
String token, String paymentLinkId, String shopperEmail) async {
final baseUrl = await getBaseUrl;
var url = Uri.parse(
"$baseUrl/api/v1/pa/payment_links/$paymentLinkId/notify_shopper");
var bodyData = {"shopper_email": shopperEmail};
var jsonBody = jsonEncode(bodyData);
var response = await http.post(
url,
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer $token"
},
body: jsonBody,
);
var data = jsonDecode(response.body);
return data;
}