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? -
Payment Component View Configuration
Declaration
Swift
public var paymentComponentConfiguration: PaymentComponentConfiguration? -
Initializer of the Payment Component Controller class.
Declaration
Swift
public init(giniMerchant: GiniMerchant)Parameters
giniMerchantAn instance of GiniMerchant 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, GiniMerchantError>) -> 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 loadPaymentReviewScreenFor(documentID: String?, paymentInfo: PaymentInfo?, trackingDelegate: GiniMerchantTrackingDelegate?, completion: @escaping (UIViewController?, GiniMerchantError?) -> Void)
-
Undocumented
Declaration
Swift
public func paymentViewBottomSheet(documentID: String?) -> UIViewController -
Undocumented
Declaration
Swift
public func bankSelectionBottomSheet() -> UIViewController -
Undocumented
Declaration
Swift
public func paymentInfoViewController() -> UIViewController -
Undocumented
Declaration
Swift
public func installAppBottomSheet() -> UIViewController -
Undocumented
Declaration
Swift
public func shareInvoiceBottomSheet() -> UIViewController
-
Undocumented
Declaration
Swift
public func canOpenPaymentProviderApp() -> Bool -
Undocumented
Declaration
Swift
public func supportsOpenWith() -> Bool -
Undocumented
Declaration
Swift
public func supportsGPC() -> Bool -
Undocumented
Declaration
Swift
public func obtainPDFURLFromPaymentRequest(paymentInfo: PaymentInfo, viewController: UIViewController) -
Undocumented
Declaration
Swift
public func createPaymentRequest(paymentInfo: PaymentInfo, completion: @escaping (_ paymentRequestID: String?, _ error: GiniMerchantError?) -> Void) -
Undocumented
Declaration
Swift
public func openPaymentProviderApp(requestId: String, universalLink: String) -
Undocumented
Declaration
Swift
public func shouldShowOnboardingScreenFor() -> Bool -
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 didTapForwardOnInstallBottomSheet() -
Undocumented
Declaration
Swift
public func didTapOnContinueOnShareBottomSheet() -
Undocumented
Declaration
Swift
public func didSelectPaymentProvider(paymentProvider: PaymentProvider) -
Undocumented
Declaration
Swift
public func didTapOnClose() -
Undocumented
Declaration
Swift
public func didTapOnMoreInformation() -
Undocumented
Declaration
Swift
public func didTapOnPayButton()
View on GitHub
PaymentComponentsController Class Reference