Package 

Object GiniBank

  • All Implemented Interfaces:

    
    public class GiniBank
    
                        

    Api for interacting with Capture and Payment features.

    The Capture feature is a layer of abstraction above Gini Capture SDK and the Return Assistant feature. Capture feature can be used with:

    • the Screen API by calling startCaptureFlow or startCaptureFlowForIntent.

    • the Component API by building everything around the provided fragments. See example apps for more details about usage of Screen and Component APIs.

    To use capture features, they need to be configured with setCaptureConfiguration. Note that configuration is immutable. releaseCapture needs to be called before passing a new configuration.

    To use the pay feature, first setGiniApi needs to be called. The flow for this feature would be:

    • Constructor Detail

    • Method Detail

      • checkCaptureRequirements

         final RequirementsReport checkCaptureRequirements(Context context)

        Checks hardware requirements for Capture feature. Requirements are not enforced, but are recommended to be checked before using.

      • createDocumentForImportedFiles

         final Unit createDocumentForImportedFiles(Intent intent, Context context, AsyncCallback<Document, ImportedFileValidationException> callback)

        Component API

        Creates an Document for a pdf or image that was shared from another app.

        Importing the files is executed on a secondary thread as it can take several seconds for the process to complete. The callback methods are invoked on the main thread.

        Parameters:
        intent - the Intent your app received
        context - Android context
        callback - A [AsyncCallback} implementation
      • setGiniApi

         final Unit setGiniApi(GiniBankAPI giniApi)

        Set the GiniBankAPI instance to be used for the Pay feature.

      • getPaymentRequest

         final PaymentRequest getPaymentRequest(String id)

        Get the payment details for the request created by a business. The id is sent in an Intent. Use getRequestId for extracting the id from the Intent.

        Parameters:
        id - The id sent by the business.
      • resolvePaymentRequest

         final ResolvedPayment resolvePaymentRequest(String requestId, ResolvePaymentInput resolvePaymentInput)

        Marks the a PaymentRequest as paid.

        Important: The amount string in the ResolvePaymentInput must be convertible to a Double. For ex. "12.39" is valid, but "12.39 €" or "12,39" are not valid.

        Parameters:
        requestId - id of PaymentRequest to be resolved.
        resolvePaymentInput - the details used for the actual payment.