collectDeviceData

Use to collects device data at the time of payment. Once a user initiates a payment from their device, PayPal uses the Client Metadata ID to verify that the payment is originating from a valid, user-consented device and application. This helps reduce fraud and decrease declines. This method MUST be called prior to initiating a pre-consented payment (a "future payment") from a mobile device. Pass the result to your server, to include in the payment request sent to PayPal. Do not otherwise cache or store this value.

Parameters

context

Android Context

request

Request object containing parameters to configure data collection


fun collectDeviceData(context: Context, clientMetadataId: String? = null, additionalData: HashMap<String, String>? = null): String

Deprecated

This method is no longer supported.

Collects device data at the time of payment activity. Once a user initiates a payment from their device, PayPal uses the Client Metadata ID to verify that the payment is originating from a valid, user-consented device and application. This helps reduce fraud and decrease declines. This method MUST be called prior to initiating a pre-consented payment (a "future payment") from a mobile device. Pass the result to your server, to include in the payment request sent to PayPal. Do not otherwise cache or store this value.

Return

clientMetadataId Your server will send this to PayPal

Parameters

context

Android Context

clientMetadataId

The desired data to pair to the request, trimmed to 32 characters.

additionalData

Additional data that should be associated with the data collection