- From: Marcos Cáceres <notifications@github.com>
- Date: Tue, 30 Apr 2024 15:40:38 -0700
- To: w3c/payment-request <payment-request@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 30 April 2024 22:40:42 UTC
@marcoscaceres commented on this pull request.
> + const json = request.shippingAddress.toJSON();
+
+ await ensureCanShipTo(json);
+ const { shippingOptions, total } = await calculateShipping(json);
+
+ return { shippingOptions, total };
+ } catch (err) {
+ return { error: `Sorry! we can't ship to your address.` };
+ }
```suggestion
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.` };
}
```
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-request/pull/996#pullrequestreview-2032723308
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/payment-request/pull/996/review/2032723308@github.com>
Received on Tuesday, 30 April 2024 22:40:42 UTC