public void logPurchase(BigDecimal purchaseAmount,Currency currency,Bundle parameters){
  if (purchaseAmount == null) {
    notifyDeveloperError("purchaseAmount cannot be null");
    return;
  }
 else   if (currency == null) {
    notifyDeveloperError("currency cannot be null");
    return;
  }
  if (parameters == null) {
    parameters=new Bundle();
  }
  parameters.putString(AppEventsConstants.EVENT_PARAM_CURRENCY,currency.getCurrencyCode());
  logEvent(AppEventsConstants.EVENT_NAME_PURCHASED,purchaseAmount.doubleValue(),parameters);
  eagerFlush();
}

public void logPurchase ( BigDecimal purchaseAmount , Currency currency , Bundle parameters ) { if ( purchaseAmount == null ) { notifyDeveloperError ( "purchaseAmount cannot be null" ) ; return ; } else if ( currency == null ) { notifyDeveloperError ( "currency cannot be null" ) ; return ; } if ( parameters == null ) { parameters = new Bundle ( ) ; } parameters . putString ( AppEventsConstants . EVENT_PARAM_CURRENCY , currency . getCurrencyCode ( ) ) ; logEvent ( AppEventsConstants . EVENT_NAME_PURCHASED , purchaseAmount . doubleValue ( ) , parameters ) ; eagerFlush ( ) ; }
logs a purchase event with facebook , in the specified amount and with the specified currency . additional detail about the purchase can be passed in through the parameters bundle .
