Skip to content

Instantly share code, notes, and snippets.

@kmclaugh
Last active December 21, 2020 17:10
Show Gist options
  • Save kmclaugh/f87864199e77b605ee114e2f3049ac7a to your computer and use it in GitHub Desktop.
Save kmclaugh/f87864199e77b605ee114e2f3049ac7a to your computer and use it in GitHub Desktop.
/**
* logger is an instance of AppEventsLogger and has been
* created using AppEventsLogger.newLogger() call.
* purchaseAmount is BigDecimal, e.g. BigDecimal.valueOf(4.32).
* currency is Currency, e.g. Currency.getInstance("USD"),
* where the string is from http://en.wikipedia.org/wiki/ISO_4217.
* parameters is Bundle.
*/
logger.logPurchase(purchaseAmount, 'USD', {
contents: itemsArray, // Same array as firebase
num_items: 1,
content_type: "product"
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment