payViaPaygateV2 function
Implementation
Future<NewTransactionResponse> payViaPaygateV2(
String token,
double amount,
String identifier, {
String? description,
String? callbackUrl,
String? phoneNumber,
PaygateProvider? provider,
Color? color,
}) async {
try {
await launchPageCustomTab(
_ParamsNewTransactionV2(
token,
amount,
identifier,
description: description,
callbackUrl: callbackUrl,
phoneNumber: phoneNumber,
provider: provider,
).paygateLink,
color,
);
return NewTransactionResponse(
null,
status: NewTransactionResponseStatus.success,
identifier: identifier,
);
} catch (e) {
return NewTransactionResponse(
null,
status: NewTransactionResponseStatus.cantLaunchPage,
identifier: identifier,
);
}
}