GiniPayBank
@objc
public final class GiniPayBank : NSObject
Core class for GiniPayBank SDK.
-
reponsible for interaction with Gini Pay backend .
Declaration
Swift
public var giniApiLib: GiniApiLib -
reponsible for the payment processing.
Declaration
Swift
public var paymentService: PaymentService -
Returns a GiniPayBank instance
Declaration
Swift
public init(with giniApiLib: GiniApiLib)Parameters
giniApiLibGiniApiLib initialized with client’s credentials
-
Fetches the payment request via payment request id.
Declaration
Swift
public func receivePaymentRequest(paymentRequestId: String, completion: @escaping (Result<PaymentRequest, GiniPayBankError>) -> Void)Parameters
paymentRequestIdId of payment request.
completionAn action for processing asynchronous data received from the service with Result type as a paramater. Result is a value that represents either a success or a failure, including an associated value in each case. Completion block called on main thread. In success returns the payment request structure. In case of failure error from the server side.
-
Resolves the payment via payment request id.
Declaration
Swift
public func resolvePaymentRequest(paymentRequesId: String, paymentInfo: PaymentInfo, completion: @escaping (Result<ResolvedPaymentRequest, GiniPayBankError>) -> Void)Parameters
paymentRequesIdId of payment request.
completionAn action for processing asynchronous data received from the service with Result type as a paramater. Result is a value that represents either a success or a failure, including an associated value in each case. Completion block called on main thread. In success returns the resolved payment request structure. In case of failure error from the server side.
-
Returns back to the business app.
Declaration
Swift
public func returnBackToBusinessAppHandler(resolvedPaymentRequest: ResolvedPaymentRequest)Parameters
resolvedPaymentRequestresolved payment request returned by method ‘resolvePaymentRequest’
-
Returns a view controller which will handle the analysis process.
Note
Screen API only.
Declaration
Swift
@objc public class func viewController(withDelegate delegate: GiniCaptureDelegate, importedDocuments: [GiniCaptureDocument]? = nil) -> UIViewControllerParameters
delegateAn instance conforming to the
GiniCaptureDelegateprotocol.importedDocumentsDocuments that come from a source different than
CameraViewController. There should be either images or one PDF, and they should be validated before calling this method.Return Value
A presentable view controller.
-
Returns a view controller which will handle the analysis process.
Note
Screen API only.
Declaration
Swift
public class func viewController(withDelegate delegate: GiniCaptureDelegate, importedDocuments: [GiniCaptureDocument]? = nil, trackingDelegate: GiniCaptureTrackingDelegate? = nil) -> UIViewControllerParameters
delegateAn instance conforming to the
GiniCaptureDelegateprotocol.importedDocumentsDocuments that come from a source different than
CameraViewController. There should be either images or one PDF, and they should be validated before calling this method.trackingDelegateA delegate object to receive user events
Return Value
A presentable view controller.
-
Returns a view controller which will handle the analysis process.
Note
Screen API only.
Declaration
Swift
@objc public class func viewController(withDelegate delegate: GiniCaptureDelegate, importedDocument: GiniCaptureDocument? = nil) -> UIViewControllerParameters
delegateAn instance conforming to the
GiniCaptureDelegateprotocol.importedDocumentDocuments that come from a source different than CameraViewController. There should be either images or one PDF, and they should be validated before calling this method.
Return Value
A presentable view controller.
-
Returns a view controller which will handle the analysis process.
Note
Screen API only.
Declaration
Swift
public class func viewController(withDelegate delegate: GiniCaptureDelegate, importedDocument: GiniCaptureDocument? = nil, trackingDelegate: GiniCaptureTrackingDelegate? = nil) -> UIViewControllerParameters
delegateAn instance conforming to the
GiniCaptureDelegateprotocol.importedDocumentDocuments that come from a source different than CameraViewController. There should be either images or one PDF, and they should be validated before calling this method.
trackingDelegateA delegate object to receive user events
Return Value
A presentable view controller.
-
Returns a view controller which will handle the analysis process. Allows to set a custom configuration to change the look and feel of the Gini Pay Bank SDK.
Note
Screen API only.
Declaration
Swift
@objc public class func viewController(withDelegate delegate: GiniCaptureDelegate, withConfiguration configuration: GiniPayBankConfiguration, importedDocument: GiniCaptureDocument? = nil) -> UIViewControllerParameters
delegateAn instance conforming to the
GiniCaptureDelegateprotocol.configurationThe configuration to set.
importedDocumentDocuments that come from a source different than CameraViewController. There should be either images or one PDF, and they should be validated before calling this method.
Return Value
A presentable view controller.
-
Returns a view controller which will handle the analysis process. Allows to set a custom configuration to change the look and feel of the Gini Pay Bank SDK.
Note
Screen API only.
Declaration
Swift
public class func viewController(withDelegate delegate: GiniCaptureDelegate, withConfiguration configuration: GiniPayBankConfiguration, importedDocument: GiniCaptureDocument? = nil, trackingDelegate: GiniCaptureTrackingDelegate? = nil) -> UIViewControllerParameters
delegateAn instance conforming to the
GiniCaptureDelegateprotocol.configurationThe configuration to set.
importedDocumentDocuments that come from a source different than CameraViewController. There should be either images or one PDF, and they should be validated before calling this method.
trackingDelegateA delegate object to receive user events
Return Value
A presentable view controller.
-
viewController(withClient:importedDocuments:configuration:resultsDelegate:documentMetadata:api:userApi:trackingDelegate:)Returns a view controller which will handle the analysis process. It’s the easiest way to get started with the Gini Pay Bank SDK as it comes pre-configured and handles all screens and transitions out of the box, including the networking.
Note
Screen API only.
Declaration
Swift
public class func viewController(withClient client: Client, importedDocuments: [GiniCaptureDocument]? = nil, configuration: GiniPayBankConfiguration, resultsDelegate: GiniCaptureResultsDelegate, documentMetadata: Document.Metadata? = nil, api: APIDomain = .default, userApi: UserDomain = .default, trackingDelegate: GiniCaptureTrackingDelegate? = nil) -> UIViewControllerParameters
clientGiniClientwith the information needed to enable document analysisresultsDelegateResults delegate object where you can get the results of the analysis.
configurationThe configuration to set.
documentMetadataAdditional HTTP headers to send when uploading documents
apiThe Gini backend API to use. Supply .custom(“domain”) in order to specify a custom domain.
userApiThe Gini user backend API to use. Supply .custom(“domain”) in order to specify a custom domain.
trackingDelegateA delegate object to receive user events
Return Value
A presentable view controller.
-
Undocumented
Declaration
Swift
public class func removeStoredCredentials(for client: Client) throws
View on GitHub
GiniPayBank Class Reference