Re: [w3c/browser-payment-api] Currency amount (#101)

@dlongley 

> I'm a general -1 to any modeling of data that uses extremely generic properties that change their meaning based upon the position of a particular object -- when that data is intended to be serialized to a JSON representation and transmitted as such.

Can you provide a proposal for this interface that meets the criteria you have defined? Yours was the only objection to reverting amount back to value but I suspect you would like to propose an entirely different set of less generic names.

@adrianba 

> I don't support having the spec say amount.amount - I don't believe that was what the group intended when this discussion happened in January

I agree, but this could also be fixed by changing the PaymentItem interface to use a different attribute name. My proposal above to revert back to _amount.value_ has not got consensus.

> I believe the current API shape, context, and @dlongley's comments are new information.

Again I agree, and I think this is sufficient grounds to stick with the original resolution of the group until the new information has been discussed and we have a new proposal that is accepted by the WG.

> I'm not sure that I support the idea that currency amounts can't be negative numbers. Every finance application I've worked with supports the notion of negative amounts.

This is the norm in financial messaging (see ISO20022 and ISO8583). Using a signed amount infers "settlement impact" which gets very confusing when combined with a transaction type. Example, what does a -$50 credit mean? Is it actually a debit. The UI is expected to abstract this complexity away and can use a whole host of heuristics to make this easier for the user to understand such as context, transaction type, locale etc.

There are three issues addressed in this PR:
 1. naming the amount/value attribute of this compound type
 1. allowing negative numbers
 1. allowing more free form currency identifiers

I believe we only have strong objections to the way the first is handled (although no consensus and one supporter). I hear reservations (but mostly questions) about the second and no further issues with the last.

The first feels a little like bike-shedding to me and while I hear @dlongley 's concerns it seems to me he is proposing a far more sweeping change to all attribute names which could be addressed in it's own subsequent PR.

On that basis I have edited the PR to revert to "value" instead of "amount" and request that the editors merge the PR as is (which reflects the previous consensus of the group and a minor terminology change which I expect @dlongley to propose major changes to anyway). 

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/browser-payment-api/pull/101#issuecomment-204583202

Received on Friday, 1 April 2016 21:56:44 UTC