PCSDKModule Documentation

Structure PCProcessing​Request

public struct PCProcessingRequest  

Holds operation's processing data

Properties

confirmation​Results

public let confirmationResults: [Result<PCConfirmation, Error>] 

Transactions confirmation data

decline​Results

public let declineResults: [Result<PCDeclination, Error>] 

Transactions decline data

Methods

create(to​Confirm:​to​Decline:​user:​password:​signer:​completion:​)

public static func create(
        toConfirm: [PCTransaction],
        toDecline: [PCTransaction],
        user: PCUser,
        password: String,
        signer: @escaping (_ digests: [Data]) -> [Result<String, Error>],
        completion: @escaping (_ result: Result<PCProcessingRequest, Error>) -> Void
    )  

Creates PCProcessingRequest instance

Parameters

to​Confirm [PCTransaction]

The transactions to confirm

to​Decline [PCTransaction]

The transactions to decline

user PCUser

The user to process operation

password String

The user's password

signer @escaping (_ digests:​ [Data]) -> [Result<String, Error>]

The function to sign digests of the transactions

completion @escaping (_ result:​ Result<PCProcessing​Request, Error>) -> Void

A closure to be invoked after finishing

result

Returns PCProcessingRequest instance when success. Otherwise, returns error