Re: [w3c/payment-request] Revert "Drop PaymentAddress, shipping + billing address support (#955)" (PR #996)

@marcoscaceres commented on this pull request.



> +              currency: "USD",
+              label: "Total due",
+              value: calculateNewTotal(shippingOption),
+            };
+            ev.updateWith({ total: newTotal });
+          };
+          async function checkShipping(request) {
+            try {
+              const { shippingAddress } = request;
+
+              await ensureCanShipTo(shippingAddress);
+              const { shippingOptions, total } = await calculateShipping(shippingAddress);
+
+              return { shippingOptions, total };
+            } catch (err) {
+              return { error: `Sorry! we can't ship to your address.` };

```suggestion
              // Shows error to user in the payment sheet. 
              return { error: `Sorry! we can't ship to your address.` };
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-request/pull/996#pullrequestreview-2032727691
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/payment-request/pull/996/review/2032727691@github.com>

Received on Tuesday, 30 April 2024 22:42:31 UTC