public static void collectPayPalDeviceData ( final BraintreeFragment fragment , final BraintreeResponseListener < String > listener ) { final JSONObject deviceData = new JSONObject ( ) ; try { String clientMetadataId = getPayPalClientMetadataId ( fragment . getApplicationContext ( ) ) ; if ( ! TextUtils . isEmpty ( clientMetadataId ) ) { deviceData . put ( CORRELATION_ID_KEY , clientMetadataId ) ; } } catch ( JSONException ignored ) { } listener . onResponse ( deviceData . toString ( ) ) ; }
Collect PayPal device information for fraud identification purposes .