Transaction Docs

Overview

Please make sure to contact Gini customer support to enable this feature in our backend platform.

We highly recommend having a QA session with Gini before releasing the Transaction Docs feature to your customers.

 

The Transaction Docs feature allows end users to:

  1. Attach a document during the Photo Payment flow. Here, 3 options: “Attach files”, “Always attach”, “Don’t attach files”, are available.

  2. View the attached document on the Transaction Summary screen.

  3. Open the attached document in a full screen mode from the Transaction Summary screen when tapping on the already attached file.

  4. Delete an attached document from the Transaction Summary screen and from the Document Preview screen.

Enabling the feature in the app

Please note that in GiniBankSDK this feature is enabled by default in the SDK in the transactionDocsEnabled property with the true value.

To disable this feature, set transactionDocsEnabledto false in GiniBankConfiguration:

let configuration = GiniBankConfiguration.shared configuration.transactionDocsEnabled = false

Transaction Docs attachment settings

The value of 'Always attach' from the attachment alert view inside the photo payment flow is, in the current version of the Transaction Docs feature, stored locally on the end user’s device. It can be accessed through the GiniBankConfiguration's transactionDocsDataCoordinator instance, using the getAlwaysAttachDocsValue() method:

let alwaysAttachDocsValue = GiniBankConfiguration.shared.transactionDocsDataCoordinator.getAlwaysAttachDocsValue().

This retrieves the user’s preference for automatically attaching documents to future transactions. To update the stored value for the 'Always attach' option, you can use the setAlwaysAttachDocs(_ value: Bool) method from the public protocol TransactionDocsDataProtocol, like this:

GiniBankConfiguration.shared.transactionDocsDataCoordinator.setAlwaysAttachDocs(false)

This approach can be used when implementing this option in your app settings screen, allowing users to easily modify their preferences if they had previously selected the 'Always attach' option.

Attachments view component

You can use our new Attachments view component named TransactionDocsView in the transaction summary screen.

This new component allows end users to:

  • View an attached document along with its file name

  • Delete an attached document by tapping on the options button or directly from the document preview screen

  • Tap on an attached document to open a preview for a closer look

First, when initializing the transaction summary screen in your app, you must set a custom view controller for presenting the transaction docs-related UI using the TransactionDocsDataCoordinator: action sheet for the specified attached document after tapping on one, allowing the user to open or delete the document and the document preview screen.

For example:

The TransactionDocsViewDelegate protocol should be implemented to handle user interactions within the view. For instance, when the content of the TransactionDocsView is updated (such as when an attachment is deleted), the delegate method transactionDocsViewDidUpdateContent(_:) will be triggered, allowing you to refresh the UI or handle other business logic accordingly.

Check our demo project to see the full integration for the new view component: https://github.com/gini/gini-mobile-ios/tree/main/BankSDK/GiniBankSDKExample/GiniBankSDKExample/TransactionSummary

 

Find out how to customize the Transaction Docs feature here.