Made applePayID and moneyAuthClientId fields optional
This commit is contained in:
parent
b7c7e3fd69
commit
187f2a4af5
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@ -18,7 +18,7 @@
|
||||
"flutterMode": "debug",
|
||||
"args": [
|
||||
"-t",
|
||||
"lib/main-dev.dart",
|
||||
"lib/main_dev.dart",
|
||||
"--flavor",
|
||||
"dev"
|
||||
]
|
||||
|
@ -1,3 +1,7 @@
|
||||
# 1.0.2
|
||||
|
||||
* Made applePayID and moneyAuthClientId fields optional.
|
||||
|
||||
# 1.0.1
|
||||
|
||||
* Formatted code. Added homepage and repo urls.
|
||||
|
18
README.md
18
README.md
@ -15,12 +15,15 @@ dependencies:
|
||||
yookassa_payments_flutter: ^version
|
||||
```
|
||||
|
||||
2. Для iOS в файле your_project_name.podspec, лежащий в корне проекта в папке ios добавьте зависимость:
|
||||
или используйте команду `flutter pub add yookassa_payments_flutter`.
|
||||
|
||||
2. В Podfile вашего приложения добавьте ссылки на репозитории с podspecs YooKassa:
|
||||
```ruby
|
||||
s.dependency 'YooKassaPayments', '6.8.0'
|
||||
source 'https://github.com/CocoaPods/Specs.git'
|
||||
source 'https://git.yoomoney.ru/scm/sdk/cocoa-pod-specs.git'
|
||||
```
|
||||
|
||||
3. Запустите `pod install` в директории рядом с Runner.xcworkspace
|
||||
3. Запустите `pod install --repo-update` в директории рядом с Runner.xcworkspace
|
||||
|
||||
4. В Info.plist своего приложения добавьте поддержку url-схем для корректной работы mSDK с оплатой через Сбер и ЮMoney:
|
||||
```
|
||||
@ -76,7 +79,6 @@ B. В некоторых сложных случаях рекомендуем с
|
||||
```dart
|
||||
var clientApplicationKey = "<Ключ для клиентских приложений>";
|
||||
var amount = Amount(value: 999.9, currency: Currency.rub);
|
||||
var applePayID = "<Идентификатор продавца Apple Pay>";
|
||||
var shopId = "<Идентификатор магазина в ЮKassa)>";
|
||||
var tokenizationModuleInputData =
|
||||
TokenizationModuleInputData(clientApplicationKey: clientApplicationKey,
|
||||
@ -89,6 +91,10 @@ var tokenizationModuleInputData =
|
||||
|
||||
2. Запустите процесс токенизации с кейсом `.tokenization` и передайте `TokenizationModuleInputData`.
|
||||
|
||||
```dart
|
||||
var result = await YookassaPaymentsFlutter.tokenization(tokenizationModuleInputData);
|
||||
```
|
||||
|
||||
3. Получите token в `TokenizationResult`
|
||||
|
||||
Пример:
|
||||
@ -339,7 +345,6 @@ func application(
|
||||
| clientApplicationKey | String | Ключ для клиентских приложений из личного кабинета ЮKassa |
|
||||
| title | String | Название магазина в форме оплаты |
|
||||
| subtitle | String | Описание заказа в форме оплаты |
|
||||
| purchaseDescription | String | Описание заказа в форме оплаты |
|
||||
| amount | Amount | Объект, содержащий сумму заказа и валюту |
|
||||
| shopId | String | Идентификатор магазина в ЮKassa ([раздел Организации](https://yookassa.ru/my/company/organization) - скопировать shopId у нужного магазина) |
|
||||
| savePaymentMethod | SavePaymentMethod | Объект, описывающий логику того, будет ли платеж рекуррентным |
|
||||
@ -370,7 +375,6 @@ func application(
|
||||
| -------------------- | ------ | -------- |
|
||||
| clientApplicationKey | String | Ключ для клиентских приложений из личного кабинета ЮKassa |
|
||||
| title | String | Название магазина в форме оплаты |
|
||||
| purchaseDescription | String | Описание заказа в форме оплаты |
|
||||
| subtitle | String | Описание заказа в форме оплаты |
|
||||
| paymentMethodId | String | Идентификатор сохраненного способа оплаты |
|
||||
| amount | Amount | Объект, содержащий сумму заказа и валюту |
|
||||
@ -495,10 +499,8 @@ var savedBankCardModuleInputData = SavedBankCardModuleInputData(
|
||||
clientApplicationKey: clientApplicationKey,
|
||||
title: "Космические объекты",
|
||||
subtitle: "Комета повышенной яркости, период обращения — 112 лет",
|
||||
purchaseDescription: "root.description",
|
||||
amount: amount,
|
||||
savePaymentMethod: SavePaymentMethod.on,
|
||||
applePayID: applePayID,
|
||||
shopId: shopId,
|
||||
paymentMethodId: paymentMethodId
|
||||
);
|
||||
|
@ -52,5 +52,5 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation 'ru.yoomoney.sdk.kassa.payments:yookassa-android-sdk:6.5.2'
|
||||
implementation 'ru.yoomoney.sdk.kassa.payments:yookassa-android-sdk:6.5.3'
|
||||
}
|
||||
|
@ -1 +1,9 @@
|
||||
<manifest package="ru.yoomoney.sdk.kassa.payments.flutter" />
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="ru.yoomoney.sdk.kassa.payments.flutter">
|
||||
|
||||
<queries>
|
||||
<package android:name="ru.sberbankmobile_alpha" />
|
||||
<package android:name="ru.yoo.money.debug" />
|
||||
</queries>
|
||||
|
||||
</manifest>
|
||||
|
@ -169,7 +169,7 @@ private fun PaymentParameters(data: Map<String, Object>): PaymentParameters {
|
||||
val title = data["title"] as String
|
||||
val subtitle = data["subtitle"] as String
|
||||
val shopId = data["shopId"] as String
|
||||
val authCenterClientId = data["moneyAuthClientId"] as String
|
||||
val authCenterClientId = data["moneyAuthClientId"] as? String
|
||||
val gatewayId = data["gatewayId"] as? String
|
||||
val userPhoneNumber = data["userPhoneNumber"] as? String
|
||||
val customReturnUrl = data["returnUrl"] as? String
|
||||
|
@ -1,2 +1,2 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
#include "Flutter/Generated.xcconfig"
|
||||
|
@ -48,7 +48,6 @@ class TokenizationScreenState extends State<TokenizationScreen> {
|
||||
var clientApplicationKey = "<Ключ для клиентских приложений>";
|
||||
var amount = Amount(value: double.parse(controller.text), currency: Currency.rub);
|
||||
var moneyAuthClientId = "<ID для центра авторизации в системе YooMoney>";
|
||||
var applePayID = "<Идентификатор продавца Apple Pay>";
|
||||
var shopId = "<Идентификатор магазина в ЮKassa>";
|
||||
var applicationScheme = "<Схема вашего приложения для deeplink>" "://";
|
||||
var tokenizationModuleInputData = TokenizationModuleInputData(
|
||||
@ -59,7 +58,6 @@ class TokenizationScreenState extends State<TokenizationScreen> {
|
||||
savePaymentMethod: SavePaymentMethod.userSelects,
|
||||
isLoggingEnabled: true,
|
||||
moneyAuthClientId: moneyAuthClientId,
|
||||
applePayID: applePayID,
|
||||
shopId: shopId,
|
||||
customerId: "<Уникальный идентификатор покупателя>",
|
||||
applicationScheme: applicationScheme,
|
||||
|
@ -10,7 +10,6 @@ class SavedBankCardModuleInputData {
|
||||
String subtitle;
|
||||
Amount amount;
|
||||
SavePaymentMethod savePaymentMethod;
|
||||
String applePayID;
|
||||
String shopId;
|
||||
String paymentMethodId;
|
||||
String? gatewayId;
|
||||
@ -21,6 +20,7 @@ class SavedBankCardModuleInputData {
|
||||
String? customerId;
|
||||
bool isSafeDeal;
|
||||
HostParameters? hostParameters;
|
||||
String? applePayID;
|
||||
|
||||
SavedBankCardModuleInputData(
|
||||
{required this.clientApplicationKey,
|
||||
@ -28,7 +28,6 @@ class SavedBankCardModuleInputData {
|
||||
required this.subtitle,
|
||||
required this.amount,
|
||||
required this.savePaymentMethod,
|
||||
required this.applePayID,
|
||||
required this.shopId,
|
||||
required this.paymentMethodId,
|
||||
required this.isSafeDeal,
|
||||
@ -38,7 +37,8 @@ class SavedBankCardModuleInputData {
|
||||
this.isLoggingEnabled = false,
|
||||
this.customizationSettings = const CustomizationSettings(),
|
||||
this.customerId,
|
||||
this.hostParameters});
|
||||
this.hostParameters,
|
||||
this.applePayID});
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'clientApplicationKey': clientApplicationKey,
|
||||
|
@ -12,9 +12,8 @@ class TokenizationModuleInputData {
|
||||
String subtitle;
|
||||
Amount amount;
|
||||
SavePaymentMethod savePaymentMethod;
|
||||
String applePayID;
|
||||
String shopId;
|
||||
String moneyAuthClientId;
|
||||
String? moneyAuthClientId;
|
||||
HostParameters? hostParameters;
|
||||
String? gatewayId;
|
||||
TokenizationSettings tokenizationSettings;
|
||||
@ -27,6 +26,7 @@ class TokenizationModuleInputData {
|
||||
String? customerId;
|
||||
GooglePayParameters googlePayParameters;
|
||||
bool googlePayTestEnvironment;
|
||||
String? applePayID;
|
||||
|
||||
TokenizationModuleInputData(
|
||||
{required this.clientApplicationKey,
|
||||
@ -34,9 +34,8 @@ class TokenizationModuleInputData {
|
||||
required this.subtitle,
|
||||
required this.amount,
|
||||
required this.savePaymentMethod,
|
||||
required this.applePayID,
|
||||
required this.shopId,
|
||||
required this.moneyAuthClientId,
|
||||
this.moneyAuthClientId,
|
||||
this.hostParameters,
|
||||
this.gatewayId,
|
||||
this.tokenizationSettings = const TokenizationSettings(),
|
||||
@ -48,7 +47,8 @@ class TokenizationModuleInputData {
|
||||
this.applicationScheme,
|
||||
this.customerId,
|
||||
this.googlePayParameters = const GooglePayParameters(),
|
||||
this.googlePayTestEnvironment = false});
|
||||
this.googlePayTestEnvironment = false,
|
||||
this.applePayID});
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'clientApplicationKey': clientApplicationKey,
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: yookassa_payments_flutter
|
||||
description: This Flutter SDK allows processing payments using a payment token. It works as an addition to the YooMoney API.
|
||||
version: 1.0.1
|
||||
version: 1.0.2
|
||||
homepage: https://git.yoomoney.ru/projects/SDK/repos/yookassa-payments-flutter-sdk/browse
|
||||
repository: https://git.yoomoney.ru/projects/SDK/repos/yookassa-payments-flutter-sdk/browse
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user