PaymentComponentsController
public final class PaymentComponentsController : PaymentComponentsProtocol
extension PaymentComponentsController: PaymentComponentViewProtocol
extension PaymentComponentsController: PaymentProvidersBottomViewProtocol
The PaymentComponentsController class allows control over the payment components.
-
handling the Payment Component Controller delegate
Declaration
Swift
public weak var delegate: PaymentComponentsControllerProtocol? -
handling the Payment Component view delegate
Declaration
Swift
public weak var viewDelegate: PaymentComponentViewProtocol? -
handling the Payment Bottom view delegate
Declaration
Swift
public weak var bottomViewDelegate: PaymentProvidersBottomViewProtocol? -
storing the current selected payment provider
Declaration
Swift
public var selectedPaymentProvider: PaymentProvider? -
Initializer of the Payment Component Controller class.
Declaration
Swift
public init(giniHealth: GiniHealth)Parameters
giniHealthAn instance of GiniHealth initialized with GiniHealthAPI.
Return Value
- instance of the payment component controller class
-
Loads the payment providers list and stores them.
Note
Also triggers a function that checks if the payment providers are installed.Declaration
Swift
public func loadPaymentProviders() -
Checks if the document is payable by extracting the IBAN.
Declaration
Swift
public func checkIfDocumentIsPayable(docId: String, completion: @escaping (Result<Bool, GiniHealthError>) -> Void)Parameters
docIdThe ID of the uploaded document.
completionA closure for processing asynchronous data received from the service. It has a Result type parameter, representing either success or failure. The completion block is called on the main thread. In the case of success, it includes a boolean value indicating whether the IBAN was extracted successfully. In case of failure, it returns an error from the server side.
-
Provides a custom Gini view that contains more information, bank selection if available and a tappable button to pay the document/invoice
Declaration
Swift
public func paymentView(documentId: String) -> UIViewReturn Value
a custom view
-
Undocumented
Declaration
Swift
public func bankSelectionBottomSheet() -> UIViewController -
Undocumented
Declaration
Swift
public func loadPaymentReviewScreenFor(documentID: String, trackingDelegate: GiniHealthTrackingDelegate?, completion: @escaping (UIViewController?, GiniHealthError?) -> Void) -
Undocumented
Declaration
Swift
public func paymentInfoViewController() -> UIViewController -
Declaration
Swift
public func didTapOnMoreInformation(documentId: String?) -
Declaration
Swift
public func didTapOnBankPicker(documentId: String?) -
Declaration
Swift
public func didTapOnPayInvoice(documentId: String?) -
Undocumented
Declaration
Swift
public func didSelectPaymentProvider(paymentProvider: PaymentProvider) -
Undocumented
Declaration
Swift
public func didTapOnClose() -
Undocumented
Declaration
Swift
public func didTapOnMoreInformation()
View on GitHub
PaymentComponentsController Class Reference