Skip to content

Commit

Permalink
Show non-integer prices when retrieving subscriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
neilco committed Apr 4, 2018
1 parent 9e719cb commit ea742ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion android/src/main/java/com/dooboolab/RNIap/RNIapModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public void onSkuDetailsResponse(int responseCode, List<SkuDetails> skuDetailsLi
for (SkuDetails skuDetails : skuDetailsList) {
WritableMap item = Arguments.createMap();
item.putString("productId", skuDetails.getSku());
item.putString("price", String.valueOf(skuDetails.getPriceAmountMicros() / 1000000));
item.putString("price", String.format("%.02f", skuDetails.getPriceAmountMicros() / 1000000f));
item.putString("currency", skuDetails.getPriceCurrencyCode());
item.putString("type", skuDetails.getType());
item.putString("localizedPrice", skuDetails.getPrice());
Expand Down

0 comments on commit ea742ef

Please sign in to comment.