-
Notifications
You must be signed in to change notification settings - Fork 8
Android SDK Calling Collect()
It is important to collect the most up-to-date information possible just before a payment method is used. In the realm of shopping carts on a web site, this is normally at the checkout step. On the checkout page, a merchant displays order information the user would like to submit and also displays and gathers last minute information like method of payment or billing/shipping information. Work flow models differ, but generally there is a page that allows the user to confirm their purchase prior to the transaction submission to the processing server. Our suggestion is to execute the collect() method in this review step ("prior to" or "as" the review step is being displayed).
The collection process starts when you call the collect(sessionId) method of the DeviceCollector. This process runs asynchronously in the background and should not stop or interrupt your application.
The collect() call should only happen once per transaction.
If your application resets (i.e. due to an orientation change) you should keep track of whether or not you have already called collect(). The collector will notify your listener, if implemented, of the changes in status as things move along, which you can react to or ignore.
The calling application does not need to wait for the completion of the DeviceCollector. If the DeviceCollector does not complete prior to a call to the Risk Inquiry System (RIS) for the same transaction (session ID), then the DeviceCollector information will not be used. This prevents any "gating" effects to the application from the collector.
The collect() method should only be called once per session ID (transaction). NOTE: The session id used in the DeviceCollector must be the same that is passed to RIS call when the purchase is being evaluated.
See the Reference Implementation for code examples on both Fragment and non-Fragment style implementations.
See the Reference Implementation for code examples on both Fragment and non-Fragment style implementations.
Calling Collect
Creating the Collector
Error Codes
Implement the SDK Inside Your Application
Minimum Requirements
Referencing Documentation
When to Call the SDK Methods