use of com.braintreepayments.api.models.MetadataBuilder in project braintree_android by braintree.
the class Venmo method getLaunchIntent.
static Intent getLaunchIntent(VenmoConfiguration venmoConfiguration, String profileId, BraintreeFragment fragment) {
Intent venmoIntent = getVenmoIntent().putExtra(EXTRA_MERCHANT_ID, profileId).putExtra(EXTRA_ACCESS_TOKEN, venmoConfiguration.getAccessToken()).putExtra(EXTRA_ENVIRONMENT, venmoConfiguration.getEnvironment());
try {
JSONObject braintreeData = new JSONObject();
JSONObject meta = new MetadataBuilder().sessionId(fragment.getSessionId()).integration(fragment.getIntegrationType()).version().build();
braintreeData.put(META_KEY, meta);
venmoIntent.putExtra(EXTRA_BRAINTREE_DATA, braintreeData.toString());
} catch (JSONException ignored) {
}
return venmoIntent;
}
Aggregations