Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can provide your own networking by implementing the GiniCaptureNetworkService interface. Also, you can use Gini Bank API Library for Android or implement the communication with the Gini Bank API yourself.

This is how you can configure the GiniBank to use an implementation of GiniCaptureNetworkService. We are providing GiniCaptureDefaultNetworkService in this example.

Code Block
languagekotlin
// initialise the GiniCaptureNetworkService implementation
val giniCaptureDefaultNetworkService = GiniCaptureDefaultNetworkService  
    .builder(context)  
    .setClientCredentials(  
        clientId,  
        clientSecret,  
        "example.com"  
    )  

// set the GiniCaptureNetworkService to the CaptureConfiguration
val captureConfiguration = CaptureConfiguration(
    networkService = giniCaptureDefaultNetworkService
)

// setup GiniBank to use CaptureConfiguration
GiniBank.setCaptureConfiguration(context, captureConfiguration)