paymentservice: money proto migration

the logs will reflect full nanos representation, I'm not sure how to
divide this by 10000000 and left pad a zero (%02d).

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
Ahmet Alp Balkan 2018-06-27 12:42:00 -07:00 committed by Simon Zeltser
parent a656bb8288
commit ddfa0bf0c6
2 changed files with 16 additions and 12 deletions

View file

@ -58,7 +58,7 @@ module.exports = function charge(request) {
throw new ExpiredCreditCard(cardNumber.replace('-', ''), month, year);
console.log(`Transaction processed: ${cardType} ending ${cardNumber.substr(-4)} \
Amount: ${amount.currency_code}${amount.amount.decimal}.${amount.amount.fractional}`)
Amount: ${amount.currency_code}${amount.units}.${amount.nanos}`)
return { transaction_id: uuid() }
}