- From: richardPAG <notifications@github.com>
- Date: Thu, 14 Mar 2019 18:17:03 -0700
- To: w3c/payment-handler <payment-handler@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/payment-handler/issues/335/473123433@github.com>
Thanks @ianbjacobs, The Payment Handler and Request APIs will be affected but only slightly: - The [PaymentRequestEvent](https://www.w3.org/TR/payment-handler/#dom-paymentrequestevent) and the [Details](https://www.w3.org/TR/payment-request/#the-details-argument) arguments will now contain a modified version of type [PaymentCurrencyAmount](https://www.w3.org/TR/payment-request/#paymentcurrencyamount-dictionary): - ``` total: { label: "Total due", amount: { currency: "USD", value: "65.00" }, disbursement: [ { payeeId: "XYZ", value: "5.00" }, { payeeId: "ABC", value: "60.00" } } ``` Please tell me if that is still not clear? The "disbursement" attribute can be optional but I suggest there should be someway of identifying the request so that non-supporting PMOs can throw an exception. It is up to the handler to validate that the sum of the disbursement items matches the total.value. Make sense? PS. I only read the specs in detail last night (again well done!) but am still at a loss as to why you are using a ServiceWorker for this implementation. I'm not saying it's an antipattern but: - 1) Client/UI is always present for payments. Essential for authorization. 2) No need for separate thread as UI has async capabilities and is waiting anyway 3) No background processing required or sanctioned 4) The UA will never receive an event or condition that would cause it to say "Hey better fire up that SW with a payment handler for this." Look, I know a bit about ServiceWorker extensibility (please see [Background Geolocation](https://github.com/RichardMaher/Brotkrumen)) just not enough to see the requirement here. Anyway I'm going to hit BobPay this w/e. (Hope you're getting the resources you deserve!) -- 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/payment-handler/issues/335#issuecomment-473123433
Received on Friday, 15 March 2019 01:17:26 UTC