pay static method
Future<NewTransactionResponse>
pay({
- PaygateVersion? version,
- String? identifier,
- String? description,
- String? callbackUrl,
- required double amount,
- required String phoneNumber,
- required PaygateProvider provider,
Implementation
static Future<NewTransactionResponse> pay({
PaygateVersion? version,
String? identifier,
String? description,
String? callbackUrl,
required double amount,
required String phoneNumber,
required PaygateProvider provider,
}) {
if ((version ?? PaygateConfig.version) == PaygateVersion.v1) {
return payV1(
identifier: identifier,
description: description,
provider: provider,
amount: amount,
phoneNumber: phoneNumber,
);
} else {
return payV2(
identifier: identifier,
description: description,
provider: provider,
amount: amount,
callbackUrl: callbackUrl,
phoneNumber: phoneNumber,
);
}
}