public class PCOperationsManager
extends java.lang.Object
PCOperation class.| Modifier and Type | Method and Description |
|---|---|
static void |
confirmEntireOperation(PCUser user,
PCOperation operation,
PCProcessOperationCallback callback)
Confirms each transaction in the operation.
|
static void |
confirmEntireOperationWithExtAuth(PCUser user,
PCOperation operation,
PCExtendedAuth extAuth,
PCProcessOperationCallback callback)
Confirms each transaction in the operation using extended authentication.
|
static void |
declineEntireOperation(PCUser user,
PCOperation operation,
PCProcessOperationCallback callback)
Declines each transaction in the operation.
|
static void |
declineEntireOperationWithExtAuth(PCUser user,
PCOperation operation,
PCExtendedAuth extAuth,
PCProcessOperationCallback callback)
Declines each transaction in the operation using extended authentication.
|
static void |
getOperation(PCUser user,
java.lang.String operationId,
PCGetOperationCallback callback)
Gets operation data from PCSDK Server
|
static void |
getOperationList(PCUser user,
PCListOperationsCallback callback)
Gets list of operations identifiers from PCSDK Server
|
static PCOperation |
importOperation(java.lang.String operationJson)
Imports operation from server response
|
static void |
processOperation(PCUser user,
PCOperation operation,
java.util.List<PCTransaction> transactionsToConfirm,
java.util.List<PCTransaction> transactionsToDecline,
PCProcessOperationCallback callback)
Processes the operation by specifying which transactions must be confirmed and which transactions must be declined.
|
static void |
processOperationWithExtAuth(PCUser user,
PCOperation operation,
java.util.List<PCTransaction> transactionsToConfirm,
java.util.List<PCTransaction> transactionsToDecline,
PCExtendedAuth extAuth,
PCProcessOperationCallback callback)
This method processes an operation similarly to
processOperation(PCUser, PCOperation, List, List, PCProcessOperationCallback)
but PCExtendedAuth is additionally used. |
public static void getOperationList(PCUser user, PCListOperationsCallback callback)
user - Target PCUser objectcallback - PCGetOperationCallback for handling resultspublic static void getOperation(PCUser user, java.lang.String operationId, PCGetOperationCallback callback)
user - Target PCUser objectoperationId - Operation identifiercallback - PCGetOperationCallback for handling resultspublic static void processOperation(PCUser user, PCOperation operation, java.util.List<PCTransaction> transactionsToConfirm, java.util.List<PCTransaction> transactionsToDecline, PCProcessOperationCallback callback)
PCOperation.getTransactions(). If some other transaction is passed, the operation will not be
processed and error of type PCError.PC_ERROR_ALIEN_TRANSACTION_IN_OPERATION will be
returned trough the callback.PCError.PC_ERROR_MISS_TRANSACTIONS_TO_PROCESS will be passed to callback.PCError.PC_ERROR_INVALID_METHOD_USAGE will arise.PCError.PC_ERROR_USER_NOT_READY_TO_SIGN is passed to callback.PCError.PC_ERROR_TRANSACTION_BINARY_DATA_IS_REQUIRED will arise and the whole
operation will be prevented from further processing.PCProcessOperationCallback to find out which types of errors can occur at different moments and
how they should be handled.user - Target PCUseroperation - Target PCOperation to be processedtransactionsToConfirm - List of PCTransaction to be confirmedtransactionsToDecline - List of PCTransaction to be declinedcallback - PCProcessOperationCallback to handle resultspublic static void confirmEntireOperation(PCUser user, PCOperation operation, PCProcessOperationCallback callback)
user - Target PCUseroperation - Target PCOperation to be entirely confirmedcallback - PCProcessOperationCallback to handle resultsprocessOperation(PCUser, PCOperation, List, List, PCProcessOperationCallback)}public static void declineEntireOperation(PCUser user, PCOperation operation, PCProcessOperationCallback callback)
user - Target PCUseroperation - Target PCOperation to be entirely declinedcallback - PCProcessOperationCallback to handle resultsprocessOperation(PCUser, PCOperation, List, List, PCProcessOperationCallback)}public static void processOperationWithExtAuth(PCUser user, PCOperation operation, java.util.List<PCTransaction> transactionsToConfirm, java.util.List<PCTransaction> transactionsToDecline, PCExtendedAuth extAuth, PCProcessOperationCallback callback)
processOperation(PCUser, PCOperation, List, List, PCProcessOperationCallback)
but PCExtendedAuth is additionally used.user - Target PCUseroperation - Target PCOperation to be processedtransactionsToConfirm - List of PCTransaction to be confirmedtransactionsToDecline - List of PCTransaction to be declinedextAuth - PCExtendedAuth object for external authenticationcallback - PCProcessOperationCallback to handle resultsprocessOperation(PCUser, PCOperation, List, List, PCProcessOperationCallback)public static void confirmEntireOperationWithExtAuth(PCUser user, PCOperation operation, PCExtendedAuth extAuth, PCProcessOperationCallback callback)
user - Target PCUseroperation - Target PCOperation to be entirely confirmedextAuth - PCExtendedAuth object for external authenticationcallback - PCProcessOperationCallback to handle resultsprocessOperationWithExtAuth(PCUser, PCOperation, List, List, PCExtendedAuth, PCProcessOperationCallback)public static void declineEntireOperationWithExtAuth(PCUser user, PCOperation operation, PCExtendedAuth extAuth, PCProcessOperationCallback callback)
user - Target PCUseroperation - Target PCOperation to be entirely declinedextAuth - PCExtendedAuth object for external authenticationcallback - PCProcessOperationCallback to handle resultsprocessOperation(PCUser, PCOperation, List, List, PCProcessOperationCallback)}public static PCOperation importOperation(java.lang.String operationJson)
operationJson - Server response in JSON formatPCOperation or null if operation cannot be imported from given JSON