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:
parent
a656bb8288
commit
ddfa0bf0c6
2 changed files with 16 additions and 12 deletions
|
@ -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() }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue