[Webkit-unassigned] [Bug 219254] New: Update promise doesn't update the currency

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 23 04:50:13 PST 2020


https://bugs.webkit.org/show_bug.cgi?id=219254

            Bug ID: 219254
           Summary: Update promise doesn't update the currency
           Product: WebKit
           Version: Safari 14
          Hardware: Macintosh
                OS: macOS 10.15
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: aurokkez at gmail.com

Hello!
According to the docs — https://www.w3.org/TR/payment-request/#paymentdetailsupdate-dictionary — I can fetch a new total (amount and currency) if I need it. But there is a problem — the sum is updated, but the currency is not, and I end up with an incorrect payment request.


Use case / steps to reproduce:
1. I call PaymentRequest.show(fetchItemsFromServer) with a stub total like { amount: "0.00", currency: "USD" }. Because of the design of my system, I need to register each payment attempt in the payment service at the moment when a user clicks on the checkout button, then the service gives me exact settings like allowed card networks, tokenization specification, total amount and currency. 
2. I fetch order items and the total from the server like { amount: "100.00", currency: "RUB" }.
3. I end up with payment request containing { amount "100.00", currency: "USD" }. The amount is received from the server, and the currency is stuck from the stub.

Exact version of safari: 14.0.1 (16610.2.11.51.8).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201123/68c42b57/attachment.htm>


More information about the webkit-unassigned mailing list