link static method
Implementation
static Future<String?> link({required double amount, TagTxn? tag, String? invoiceId}) async {
if (amount <= 0) {
UToast.error(message: U.s.invalidAmount);
return null;
}
ULoading.show();
String? url;
await UServices.ipg.pay(
p: UIpgSaleParams(amount: amount, tag: tag, invoiceId: invoiceId),
onOk: (UResponse<UIpgPayResponse> r) => url = r.result?.url,
onError: (UEmptyResponse e) => UToast.error(message: e.message),
onException: (String e) => UToast.error(message: e),
);
ULoading.dismiss();
return url;
}