Release 1.3.0

This commit is contained in:
jenkins-mobile
2023-12-22 16:57:25 +03:00
parent 63e918e79a
commit 837528ad9c
21 changed files with 413 additions and 144 deletions
@@ -20,7 +20,6 @@ class SavedBankCardModuleInputData {
String? customerId;
bool isSafeDeal;
HostParameters? hostParameters;
String? applePayID;
SavedBankCardModuleInputData(
{required this.clientApplicationKey,
@@ -37,8 +36,7 @@ class SavedBankCardModuleInputData {
this.isLoggingEnabled = false,
this.customizationSettings = const CustomizationSettings(),
this.customerId,
this.hostParameters,
this.applePayID});
this.hostParameters});
Map<String, dynamic> toJson() => {
'clientApplicationKey': clientApplicationKey,
@@ -48,7 +46,6 @@ class SavedBankCardModuleInputData {
'savePaymentMethod': savePaymentMethod.toString(),
'gatewayId': gatewayId,
'testModeSettings': testModeSettings?.toJson(),
'applePayMerchantIdentifier': applePayID,
'shopId': shopId,
'returnUrl': returnUrl,
'isLoggingEnabled': isLoggingEnabled,
@@ -26,7 +26,6 @@ class TokenizationModuleInputData {
String? customerId;
GooglePayParameters googlePayParameters;
bool googlePayTestEnvironment;
String? applePayID;
TokenizationModuleInputData(
{required this.clientApplicationKey,
@@ -47,8 +46,7 @@ class TokenizationModuleInputData {
this.applicationScheme,
this.customerId,
this.googlePayParameters = const GooglePayParameters(),
this.googlePayTestEnvironment = false,
this.applePayID});
this.googlePayTestEnvironment = false});
Map<String, dynamic> toJson() => {
'clientApplicationKey': clientApplicationKey,
@@ -60,7 +58,6 @@ class TokenizationModuleInputData {
'gatewayId': gatewayId,
'tokenizationSettings': tokenizationSettings.toJson(),
'testModeSettings': testModeSettings?.toJson(),
'applePayMerchantIdentifier': applePayID,
'shopId': shopId,
'returnUrl': returnUrl,
'isLoggingEnabled': isLoggingEnabled,
+1 -1
View File
@@ -1,7 +1,7 @@
import 'currency.dart';
class Amount {
double value;
String value;
Currency currency;
Amount({required this.value, required this.currency});
-10
View File
@@ -12,18 +12,12 @@ class PaymentMethodTypes {
PaymentMethodTypes([PaymentMethod.yooMoney]);
static const PaymentMethodTypes sberbank =
PaymentMethodTypes([PaymentMethod.sberbank]);
static const PaymentMethodTypes applePay =
PaymentMethodTypes([PaymentMethod.applePay]);
static const PaymentMethodTypes googlePay =
PaymentMethodTypes([PaymentMethod.googlePay]);
static const PaymentMethodTypes sbp =
PaymentMethodTypes([PaymentMethod.sbp]);
static const PaymentMethodTypes all = PaymentMethodTypes([
PaymentMethod.bankCard,
PaymentMethod.yooMoney,
PaymentMethod.sberbank,
PaymentMethod.applePay,
PaymentMethod.googlePay,
PaymentMethod.sbp
]);
}
@@ -39,10 +33,6 @@ extension PaymentMethodExtension on PaymentMethod {
return PaymentMethod.yooMoney;
case 'sberbank':
return PaymentMethod.sberbank;
case 'apple_pay':
return PaymentMethod.applePay;
case 'google_pay':
return PaymentMethod.googlePay;
case 'sbp':
return PaymentMethod.sbp;
}
+8 -3
View File
@@ -29,9 +29,14 @@ class YookassaPaymentsFlutter {
.then((value) => TokenizationResult.fromJson(json.decode(value)));
}
static Future<void> confirmation(
String url, PaymentMethod? paymentMethod, String? clientApplicationKey) async {
var inputData = {'url': url, 'paymentMethod': paymentMethod?.name, 'clientApplicationKey': clientApplicationKey};
static Future<void> confirmation(String url, PaymentMethod? paymentMethod,
String? clientApplicationKey, String? shopId) async {
var inputData = {
'url': url,
'paymentMethod': paymentMethod?.name,
'clientApplicationKey': clientApplicationKey,
'shopId': shopId
};
return await _channel.invokeMethod('confirmation', inputData);
}