Integration
To integrate plugin to your app you have to add a dependency for plugin itself and a dependency for PCSDK.
1. Adding flutter plugin
In order to include a flutter plugin in your app, you are supposed to add the following lines to pubspec.yaml:
For PCSDK:
dependencies:
pcsdk:
git: https://repo.payconfirm.org/git/flutter/pcsdk-flutter.git
For PCSDKGost:
dependencies:
pcsdk_gost:
git: https://repo.payconfirm.org/git/flutter/pcsdkgost-flutter.git
2. Adding PCSDK
To make the plugin work, you have to embed PCSDK for each platform separately.
iOS
In iOS project (usually in <your_project>/ios folder) add the new dependency to a Podfile:
For PCSDK:
target 'Runner' do
...
pod 'PCSDKModule', :git => 'https://repo.payconfirm.org/git/ios/pcsdk.git'
...
end
For PCSDKGost:
target 'Runner' do
use_frameworks! :linkage => :static
...
pod 'PCSDKModule', :git => 'https://repo.payconfirm.org/git/ios/pcsdk-gost.git'
...
end
Android
In Android project (<your_project>/android folder) add the following maven repository to a root build.gradle:
For PCSDK:
allprojects {
repositories {
...
maven { url "https://repo.payconfirm.org/android/maven" }
}
}
For PCSDKGost:
allprojects {
repositories {
...
// PC Libs
maven { url "https://repo.paycontrol.org/android/maven" }
// CryptoPro libs
maven { url "https://repo.paycontrol.org/mydss/android/maven" }
}
}
Then, add the dependency with the last PCSDK version into a module-level build.gradle:
For PCSDK:
// Dependency in your module-level build.gradle
implementation 'tech.paycon.sdk.v5:pcsdk:5.4.<LATEST_VERSION>'
For PCSDKGost:
dependencies {
implementation 'tech.paycon.sdk.v5:pcsdk-gost:6.0.414'
// CryptoPro libs
implementation 'ru.cryptopro.sdk:cspbase:5.0.49010-3'
implementation 'ru.cryptopro.sdk:jinitcsp:5.0.49010-3'
implementation 'ru.cryptopro.sdk:sharedlibrary:5.0.49010-3'
implementation 'ru.cryptopro.sdk:cspgui:5.0.49010-3'
implementation 'org.ini4j:ini4j:0.5.4'
}
Initialization
PCSDK must be initialized before using. To initialize PC SDK library you just call PCSDK.initialize() method. Also, you may turn on SDK's logger providing the required log level.
// Импорт зависимостей
import 'package:pcsdk/pcsdk.dart';
import 'package:pcsdk/models/pcloggingoptions.dart';
...
// Выставление уровня логирования
await PCSDK.setLogLevel(PCLoggingOptions.debug + PCLoggingOptions.sensitive);
// Инициализация
await PCSDK.initialize();
User registration
This page covers the user's lifecycle on the device: registration and key renewal.
Registration
User registration process contains followings steps:
- Getting personalization data from the PC Server (via QR, QR + activation code, JSON-value)
- Registering PC User on PC Server
- Store user's keys in internal storage for further using
The activation code could be delivered by other channel (SMS, Push Notifications)
import 'package:pcsdk/models/pcuser.dart';
import 'package:pcsdk/pcusersmanager.dart';
String userJSON = ... ; // String with user's data in JSON format
// Importing JSON info
PCUser user = await PCUsersManager.importUser(userJSON);
// Activating the user
if (await user.isActivated() == false) {
await PCUsersManager.activate(user, activationCode);
}
// Registering
await PCUsersManager.register(user, deviceToken);
// Storing
await PCUsersManager.store(user, userName, passwordToStore);
After successfull registration you can use this user to confirm and decline transactions.
List<PCUser> users = await PCUsersManager.listUsers();
PCUser firstUser = users.first;
Key renewal
PCUsersManager.renew() renews the user's key pair on the PC Server and returns the updated user. The method is available starting from plugin version 1.1.0.
// Renewal requires the password submitted to the SDK
if (await user.isReadyToSign() == false) {
await PCUsersManager.submitPassword(user, password);
}
PCUser renewedUser = await PCUsersManager.renew(user);
// Use renewedUser further on: the previous object keeps the outdated user's data
The server may deny the renewal. The
user.flags.isDenyRenewPubKeyflag tells whether the key renewal is forbidden for this user. Check it before the call, otherwiserenew()fails with an error.
Transactions
Online Methods
// Getting the appropriate user.
// We are using the first stored user in this example
List<PCUser> users = await PCUsersManager.listUsers();
PCUser user = users.first;
// Getting the available transactions list for this user
List<String> transactionsIDs = await PCTransactionsManager.getTransactionsList(user);
// Getting transactions's data
// We are using the first transaction in the list in this example
PCTransaction transaction = await PCTransactionsManager.getTransaction(transactionsIDs.first, user);
// Transaction may contain the binary data
// It is necessary to download it before confirming or declining
if (transaction.hasBinaryData) {
String? binaryDataURL = await transaction.getBinaryDataUrl();
if (binaryDataURL == null) {
await PCTransactionsManager.getTransactionBinaryData(transaction, user);
}
}
// Providing password before processing
bool isReadyToSign = await user.isReadyToSign();
if (!isReadyToSign) {
await PCUsersManager.submitPassword(user, password);
}
// Confirming transaction
await PCTransactionsManager.sign([transaction], user);
// ... or declining transaction
await PCTransactionsManager.decline([transaction], user);
Offline Methods
// Getting the appropriate user.
// We are using the first stored user in this example
List<PCUser> users = await PCUsersManager.listUsers();
PCUser user = users.first;
String transactionJSON = ... ; // String with transaction's data in JSON format
// Importing a transaction from JSON
PCTransaction transaction = await PCTransactionsManager.importTransaction(transactionJSON);
// Providing password before processing
bool isReadyToSign = await user.isReadyToSign();
if (!isReadyToSign) {
await PCUsersManager.submitPassword(user, password);
}
// Confirming transaction
PCConfirmation confirmation = await PCTransactionsManager.signOffline(transaction, user);
// PCConfirmation contains a confirmationCode to complete confirmation process on the server
// ... or declining transaction
PCDeclination declination = await PCTransactionsManager.declineOffline(transaction, user);
// PCDeclination contains a declineCode to complete decline process on the server
Operations
An operation groups several transactions the user confirms or declines in a single action. PCOperationsManager works with operations, the PCOperation model holds their data. Both are available starting from plugin version 1.1.0.
Getting operations
// Getting the appropriate user.
// We are using the first stored user in this example
List<PCUser> users = await PCUsersManager.listUsers();
PCUser user = users.first;
// Getting the identifiers of the operations waiting to be processed
List<String> operationIds = await PCOperationsManager.getOperationsList(user);
// Getting the operation's data
// We are using the first operation in the list in this example
PCOperation operation = await PCOperationsManager.getOperation(operationIds.first, user);
// The operation contains only the transactions which are not processed yet
for (PCTransaction transaction in operation.transactions) {
String? text = transaction.transactionContent?.text;
// Showing the transaction's text to the user
}
The operation's description is in
operation.description, its format is inoperation.descriptionRenderType:rawfor plain text andmarkdownfor markup. Theoperation.appExtrafield holds any additional data the PC Server sends along with the operation.
Processing an operation
processOperation takes the lists of transactions to confirm and to decline. It returns three values: the operation with the transactions left to process, the confirmation results and the declination results.
// Providing password before processing
if (await user.isReadyToSign() == false) {
await PCUsersManager.submitPassword(user, password);
}
// Confirming all the transactions of the operation
var (remainingOperation, confirmationResults, declinationResults) =
await PCOperationsManager.processOperation(operation, operation.transactions, [], user);
// The server may reject a part of the transactions — every result is a PCResult
List<PCResult> failed = confirmationResults.where((result) => result.error != null).toList();
for (PCResult result in failed) {
String code = result.error!.code;
// Showing the user which transactions did not pass
}
// An empty list of transactions means the operation is processed entirely
if (remainingOperation.transactions.isEmpty) {
// Removing the operation from the list on the screen
}
A part of the transactions may be confirmed and another part declined within a single call:
List<PCTransaction> toConfirm = operation.transactions.take(1).toList();
List<PCTransaction> toDecline = operation.transactions.skip(1).toList();
var (remainingOperation, confirmationResults, declinationResults) =
await PCOperationsManager.processOperation(operation, toConfirm, toDecline, user);
Pass the very operation returned by the SDK.
processOperationaccepts only the operation returned bygetOperationorimportOperation: the SDK processes the transactions of its own operation instance. An operation rebuilt from JSON in the app leads to an error. Both transaction lists cannot be empty — at least one transaction has to go either to confirmation or to declination.
Importing an operation
An operation may come not only from the PC Server but from an external source as well — a QR code's value, for instance. The source is passed to the SDK as is: the SDK itself decides whether it is JSON, XML or plain text.
String operationSource = ... ; // String with the operation's data
PCOperation operation = await PCOperationsManager.importOperation(operationSource);
// The imported operation is processed the same way as the one received from the server
if (await user.isReadyToSign() == false) {
await PCUsersManager.submitPassword(user, password);
}
var (remainingOperation, confirmationResults, declinationResults) =
await PCOperationsManager.processOperation(operation, operation.transactions, [], user);
Errors
There are two types of errors in SDK:
PC_ERROR: returning by SDKPC_SERVER_ERROR: returning by PC server
PC_ERROR codes
| Code | Description |
|---|---|
| PC_ERROR_INTERNAL_ERROR | Internal error |
| PC_ERROR_STORAGE_NOT_INITIALIZED | Storage is not initialized |
| PC_ERROR_EMPTY_KEYS_CONTENT | The user's source does not contain the key content |
| PC_ERROR_EMPTY_DEVICE_TOKEN | The device token is not set |
| PC_ERROR_MISSING_INTERACTION_URL | Interaction url is missing |
| PC_ERROR_MISSING_TRANSACTION_DATA | Transaction's data is missing |
| PC_ERROR_MISSING_KAUTH | Authorization data is missing |
| PC_ERROR_MISSING_REQUESTED_DATA | Requested data is missing |
| PC_ERROR_EMPTY_PASSWORD | Password is not set |
| PC_ERROR_EMPTY_NAME | Name is not set |
| PC_ERROR_INVALID_ACTIVATION_CODE | Activation code is invalid |
| PC_ERROR_INVALID_PASSWORD | The password is invalid |
| PC_ERROR_PASSWORD_DOES_NOT_MATCH_CONDITIONS | Provided password does not match the policy conditions |
| PC_ERROR_USER_IS_NOT_ACTIVATED | The user is not activated |
| PC_ERROR_USER_IS_NOT_REGISTERED | User is not registered |
| PC_ERROR_USER_IS_EXPIRED | User is expired |
| PC_ERROR_USER_NOT_FOUND | User is not found in the storage |
| PC_ERROR_BINARY_UNAVAILABLE | This transaction does not contain a binary data |
| PC_ERROR_BINARY_REQUIRED | Downloading transaction's binary data is required before confirmation or declining |
| PC_ERROR_UNABLE_TO_STORE_BINARY_DATA | Unable to store the transaction's binary data |
| PC_ERROR_BINARY_DATA_IS_CORRUPTED | Binary data is corrupted |
| PC_ERROR_API_IS_NOT_SUPPORTED | This version of the SDK does not support the API version of the server |
| PC_ERROR_API_IS_UNDEFINED | Interaction server api is undefined |
| PC_ERROR_UNSUPPORTED_KEY_VERSION | This version of the key is unsupported |
| PC_ERROR_ENDPOINT_UNAVAILABLE | Endpoint unavailable |
| PC_ERROR_SIGNING_ERROR | An error occured during signing operation |
| PC_ERROR_INVALID_HANDLE | Entering password is required |
| PC_ERROR_SCORING_UNAVAILABLE | Scoring is unavailable for this user |
| PC_ERROR_AUTOSIGN_UNAVAILABLE | Auto-signing is unavailable |
| PC_ERROR_INVALID_JSON | JSON data is invalid |
| PC_ERROR_INVALID_QR | QR code is invalid |
| PC_ERROR_EXT_AUTH_NOT_FOUND | The extended authentication type is not registered for the user |
| PC_ERROR_REMOTE_UPDATE_DISABLED | The remote update is not available for this user |
| PC_ERROR_LOGIN_SESSION_IS_EXPIRED | Login session is expired |
| PC_ERROR_PROCESSING_ERROR | Failed to process one or more transactions |
| PC_ERROR_EXTERNAL_KEYS_PROCESSOR_IS_REQUIRED | External keys processor is required |
PC_SERVER_ERROR codes
| Code | Description |
|---|---|
| PC_SERVER_ERROR_UNDEFINED | Undefined error |
| PC_SERVER_ERROR_ATTEMPT_ID_IS_NULL | Attempt ID not set |
| PC_SERVER_ERROR_AUTH_CODE_IS_NULL | Authentication code is null |
| PC_SERVER_ERROR_AUTOSIGN_FAILED | Transaction autoconfirm failed |
| PC_SERVER_ERROR_AUTOSIGN_NOT_ALLOWED | Autoconfirm is not allowed |
| PC_SERVER_ERROR_AUTOSING_SIGNATURE_IS_INVALID | Signature for autoconfirm is invalid |
| PC_SERVER_ERROR_BILL_DATE_CORRUPTED | Billing date is corrupted |
| PC_SERVER_ERROR_BILL_REQUEST_ALREADY_PROCESSED | Billing is closed for this date |
| PC_SERVER_ERROR_BILLING_TYPE_CORRUPTED | Billing type corrupted in database |
| PC_SERVER_ERROR_CALLBACK_URL_IS_NULL | Callback url is NULL |
| PC_SERVER_ERROR_COLLECTION_IS_EMPTY | Collection is empty |
| PC_SERVER_ERROR_CONFIRM_CODE_IS_NULL | Confrimation code is null |
| PC_SERVER_ERROR_CONFIRM_CODE_LENGTH_IS_WRONG | Confirmation code length is not valid |
| PC_SERVER_ERROR_CONFIRM_TYPE_IS_NULL | Confirm type is null |
| PC_SERVER_ERROR_CREATE_OPERATION_ERROR | Create operation error |
| PC_SERVER_ERROR_DATA_TYPE_IS_WRONG | Data type is wrong |
| PC_SERVER_ERROR_DECLINE_REASON_IS_NULL | Decline reason is null |
| PC_SERVER_ERROR_DEVICE_ID_IS_NULL | Device ID is null |
| PC_SERVER_ERROR_DEVICE_TYPE_IS_INCORRECT | Device type is incorrect |
| PC_SERVER_ERROR_DEVICE_TYPE_IS_NULL | Device type is null |
| PC_SERVER_ERROR_DS_STRUCT_ERROR | Digital signature is corrupted |
| PC_SERVER_ERROR_DS_VERIFY_ERROR | Digital signature is not valid |
| PC_SERVER_ERROR_ERROR_PARSE_REGISTER_SYSTEM_INFO | Request is corrupted |
| PC_SERVER_ERROR_EXT_AUTH_FAILED | Extended authentication failed |
| PC_SERVER_ERROR_EXT_AUTH_NEEDED | Extended authentication needed |
| PC_SERVER_ERROR_EXT_AUTH_TEMPLATE_NOT_FOUND | Extended authentication template not found |
| PC_SERVER_ERROR_EXT_AUTH_TYPE_NOT_SUPPORTED | Extended authentication type not supported |
| PC_SERVER_ERROR_FLEXIBLE_LICENSE_ERROR | Flexible license error |
| PC_SERVER_ERROR_FPRINT_IS_EMPTY | Fingerprint is empty |
| PC_SERVER_ERROR_FPRINT_IS_NOT_EMPTY | Fingerprint has not been set |
| PC_SERVER_ERROR_HIGH_SCORING_RISK_LEVEL | Scoring risk level is very high |
| PC_SERVER_ERROR_HTTP_AUTH_CODE_INVALID | HTTP Authorization failed |
| PC_SERVER_ERROR_INCORRECT_USER_TYPE | User type is incorrect |
| PC_SERVER_ERROR_INVALID_HMAC | HMAC is not valid |
| PC_SERVER_ERROR_INVALID_KDF | Export param format is not valid |
| PC_SERVER_ERROR_INVALID_OTP | OTP is not valid |
| PC_SERVER_ERROR_JAVA_INTERNAL_ERROR | Internal Error |
| PC_SERVER_ERROR_JSON_REQUEST_INCORRECT | JSON request is incorrect |
| PC_SERVER_ERROR_JSON_SCHEME_NOT_SUPPORTED | JSON scheme not supported |
| PC_SERVER_ERROR_KEY_CONTAINER_ALIAS_IS_NULL | Key alias is null |
| PC_SERVER_ERROR_KEY_CONTAINER_NOT_EXISTS | Key container does not exist |
| PC_SERVER_ERROR_KEY_EXPIRED | The key has been expired, to continue you should update the key |
| PC_SERVER_ERROR_KEY_INFO_NOT_FOUND | User key not found |
| PC_SERVER_ERROR_LICENSE_ERROR | License error |
| PC_SERVER_ERROR_LICENSE_EXPIRED | License expired |
| PC_SERVER_ERROR_LICENSE_NOT_FOUND | License not found |
| PC_SERVER_ERROR_LICENSE_UPDATE_ERROR | License update error |
| PC_SERVER_ERROR_LICENSE_USER_COUNT_EXCEEDED | Licensed users count exceeded |
| PC_SERVER_ERROR_NO_RESULT | Empty result |
| PC_SERVER_ERROR_NOT_SUPPORTED | Operation not supported |
| PC_SERVER_ERROR_OPERATION_EXPIRED | Operation has been expired |
| PC_SERVER_ERROR_OPERATION_NOT_EXISTS | Operation not exists |
| PC_SERVER_ERROR_OPERATION_STATUS_INVALID | Operation status invalid |
| PC_SERVER_ERROR_OTP_IS_NOT_VALID | OTP is not valid |
| PC_SERVER_ERROR_PIN_IS_EMPTY | PIN is empty |
| PC_SERVER_ERROR_PIN_LENGTH_IS_WRONG | PIN length is invalid |
| PC_SERVER_ERROR_PUBKEY_IS_EMPTY | Public key is empty |
| PC_SERVER_ERROR_PUBKEY_IS_NOT_EMPTY | Public key was already set |
| PC_SERVER_ERROR_PUSH_ID_IS_NULL | PUSH ID is null |
| PC_SERVER_ERROR_PUSH_NOT_FOUND | Device ID not found |
| PC_SERVER_ERROR_REMOTE_UPDATE_DISABLED | Remote update disabled |
| PC_SERVER_ERROR_REMOTE_UPDATE_ERROR_BLOCK | Remote update error, user was blocked |
| PC_SERVER_ERROR_REMOTE_UPDATE_ERROR | Remote update error |
| PC_SERVER_ERROR_REPORT_TPL_IS_NULL | Report template is null |
| PC_SERVER_ERROR_REQUEST_ERROR | Request error |
| PC_SERVER_ERROR_REQUEST_SIGNATURE_NOT_VALID | Requset digital signature invalid |
| PC_SERVER_ERROR_SCORING_FAILED | Scoring failed |
| PC_SERVER_ERROR_SCORING_SETTINGS_IS_NULL | Scoring settings not set |
| PC_SERVER_ERROR_SERVER_SCORING_SETTINGS_INCORRECT | Scoring settings are invalid on the server |
| PC_SERVER_ERROR_SIGNATURE_AND_CONFIRM_CODE_ARE_NULL | Signature or confirm code must be specified |
| PC_SERVER_ERROR_SIGNATURE_IS_INVALID | Signature is invalid |
| PC_SERVER_ERROR_SIGNATURE_IS_NULL | Signature is null |
| PC_SERVER_ERROR_SPART_LENGTH_IS_WRONG | Second key part length is not valid |
| PC_SERVER_ERROR_STATUS_LIST_IS_EMPTY | Transaction status list is empty |
| PC_SERVER_ERROR_STATUS_LIST_IS_INCORRECT | Status list is incorrect |
| PC_SERVER_ERROR_STORE_TYPE_IS_NULL | Key store type is null |
| PC_SERVER_ERROR_STORE_TYPE_IS_WRONG | Key storage type is unsupported |
| PC_SERVER_ERROR_SYSTEM_ID_IS_NULL | System ID is null |
| PC_SERVER_ERROR_SYSTEM_ID_IS_WRONG | System ID is wrong |
| PC_SERVER_ERROR_SYSTEM_ID_NOT_UNIQUE | System ID is not unique |
| PC_SERVER_ERROR_SYSTEM_IS_DELETED | System has been deleted |
| PC_SERVER_ERROR_SYSTEM_NAME_IS_NULL | System name is null |
| PC_SERVER_ERROR_SYSTEM_NOT_FOUND | System not found |
| PC_SERVER_ERROR_SYSTEM_NOT_VALID | System is not valid |
| PC_SERVER_ERROR_SYSTEM_PROPERTY_ERROR | System property error |
| PC_SERVER_ERROR_SYSTEM_TYPE_IS_WRONG | System type is not valid |
| PC_SERVER_ERROR_TRANSACTION_CHECKED | Transaction is confirmed |
| PC_SERVER_ERROR_TRANSACTION_DATA_ERROR | Transaction data error |
| PC_SERVER_ERROR_TRANSACTION_DATA_IS_NULL | Transaction data is null |
| PC_SERVER_ERROR_TRANSACTION_DATA_TYPE_IS_NULL | Transaction data type is null |
| PC_SERVER_ERROR_TRANSACTION_DATA_UID_ERROR | Transaction data is corrupted (User ID does not match) |
| PC_SERVER_ERROR_TRANSACTION_EXPIRED | Transaction expired |
| PC_SERVER_ERROR_TRANSACTION_ID_IS_NULL | Transaction ID is null |
| PC_SERVER_ERROR_TRANSACTION_IS_DELETE | Transaction is marked as deleted |
| PC_SERVER_ERROR_TRANSACTION_IS_NOT_IN_OPERATION | Transaction is not in operation |
| PC_SERVER_ERROR_TRANSACTION_IS_NOT_UNIQUE | Transaction is not unique |
| PC_SERVER_ERROR_TRANSACTION_IS_NULL | Transaction is NULL |
| PC_SERVER_ERROR_TRANSACTION_STATUS_INVALID | Invalid transaction status |
| PC_SERVER_ERROR_TRANSFER_STORAGE | Unable to transfer data from old storage |
| PC_SERVER_ERROR_UNSUPPORTED_BILLING_TYPE | Unsupported billing type |
| PC_SERVER_ERROR_USER_BILL_DATE_CORRUPTED | User billing date is corrupted |
| PC_SERVER_ERROR_USER_ID_IS_NULL | User ID is null |
| PC_SERVER_ERROR_USER_ID_PREF_IS_NULL | User ID prefix is null |
| PC_SERVER_ERROR_USER_ID_PREF_TOO_LONG | User ID Prefix is too long |
| PC_SERVER_ERROR_USER_IS_BLOCKED | User is blocked |
| PC_SERVER_ERROR_USER_IS_DELETED | User has been deleted |
| PC_SERVER_ERROR_USER_NOT_FOUND | User not found |
| PC_SERVER_ERROR_VALID_DATE_EXPIRED | Key has expired |
| PC_SERVER_ERROR_WRONG_AUTH_CODE | Authentication code is invalid |
| PC_SERVER_ERROR_WRONG_SYSTEM_TYPE | System type is not valid |
| PC_SERVER_ERROR_DN_IS_NULL | Distinguished Name not set |
| PC_SERVER_ERROR_CERT_REQUEST_PARAMS_IS_NULL | Certificate request params not set |
| PC_SERVER_ERROR_CERT_ISSUE_ERROR | Certificate issuing error |
| PC_SERVER_ERROR_NO_CERT_REQUEST | Certificate Request or Certificate is absent |
| PC_SERVER_ERROR_NO_CERT | No certificate for this operation |
| PC_SERVER_ERROR_NO_PKI_SETTINGS_DEFINED | No PKI settings defined in service configuration |
| PC_SERVER_ERROR_CAN_NOT_USE_CERTIFICATE_CHAIN | Can not use one or more certificates in provided chain |
| PC_SERVER_ERROR_CERT_STATUS_INVALID | Certificate status invalid for this operation |
| PC_SERVER_ERROR_CERT_REVOKE_ERROR | Certificate revoking error |
| PC_SERVER_ERROR_KEY_INDEX_OBSOLETED | This key is not longer relevant. It was re-emitted |
| PC_SERVER_ERROR_KEY_INDEX_WRONG | Key index is wrong |
| PC_SERVER_ERROR_DEVICE_FINGERPRINT_MISMATCH | The fingerprint of the device does not match the saved one |
| PC_SERVER_ERROR_KEY_NOT_ACTIVATED | Key is not activated |
| PC_SERVER_ERROR_ACTIVATION_ATTEMPTS_EXCEEDED | The number of activation attempts exceeded |
| PC_SERVER_ERROR_ACTIVATION_CODE_INCORRECT | Activation code is incorrect |
| PC_SERVER_ERROR_PASSWORD_ATTEMPTS_EXCEEDED | Password attempts exceeded |
| PC_SERVER_ERROR_PASSWORD_INCORRECT | Password incorrect |
| PC_SERVER_ERROR_PASSWORD_NOT_SET | Password not set |
| PC_SERVER_ERROR_CREDENTIALS_NOT_INITIALIZED | Credentials not initialized |
Changelog
1.1.0
- Added support for operations.
PCOperationsManagergets an operation from the server or from an external source and processes its transactions entirely or in parts — examples are in the Operations chapter - Added the
PCUsersManager.renew()method. It renews the user's key pair on the PC Server and returns the updated user - Added the
appExtrafield to an operation and to a transaction. It holds additional data of the application system, and the value comes as a string on both platforms PCSDK.setRequestsTimeout()works on both platforms. The timeout is set in seconds and on Android applies both to establishing a connection and to reading the answer — call the method afterPCSDK.initialize()- Implemented the methods declared in the Dart API:
PCUser.getActivationCodeLength(),PCUser.getRegisteredPushServiceType()andPCSDK.getSpyAppsList() PCUser.getRegisteredPushServiceType()works on Android only: the iOS SDK has no way to tell the registered push service type, so the method returnsnullthere- Fixed importing of transactions and users on iOS. The handlers trimmed the quotes and removed the backslashes, now the source is passed to the SDK as is
- Fixed the units of
PCSDK.setHandlesBackgroundTimeout()on Android. The method takes seconds while the value reached the SDK as milliseconds, so the handles lived a thousand times shorter than asked. iOS is not affected - Fixed parsing of the push service type.
PCPushServiceTypereads the platform's value instead of the type cast which failed at runtime, and knows theednavalue - Added the single import point. The whole public API is available through
package:pcsdk/pcsdk.dartorpackage:pcsdk_gost/pcsdk_gost.dart - Updated the environment requirements: Dart 3.0, Flutter 3.10, iOS 13.0
- Fixed a misprint in
pcsdk_gost.podspecof PCSDKGost: because of the wrong path the CryptoPro localization did not get into the app's bundle
1.0.1
- Supporting of offline transactions
1.0.0
- Initial release with common functional