Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update patch for ed/idl/payment-handler.idl #1314

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 12 additions & 50 deletions ed/idlpatches/payment-handler.idl.patch
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
From a651ec2cd18532034bfdd512aafa8cfb2d160e6a Mon Sep 17 00:00:00 2001
From e6179dbe95efd530dbeca7ccc474aafc249a340b Mon Sep 17 00:00:00 2001
From: Francois Daoust <[email protected]>
Date: Fri, 13 Jan 2023 15:07:47 +0100
Subject: [PATCH] Add missing Payment Request IDL dfns
Date: Mon, 19 Aug 2024 10:45:38 +0200
Subject: [PATCH] Add missing AddressInit dictionary

Payment Handler re-introduced billing address support, expecting Payment Request
to do the same, but Payment Request has not yet been updated. This patch adds
missing dictionary definitions to Payment Handler.

Tests will fail once Payment Request gets updated, signaling it is time to drop
the patch:
https://github.com/w3c/payment-request/pull/996
Payment Request re-introduced most of the missing interfaces, except the
`AddressInit` dictionary. This patch adds it pending proper resolution of the
underlying problem, see:
https://github.com/w3c/payment-handler/issues/412
---
ed/idl/payment-handler.idl | 48 ++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
ed/idl/payment-handler.idl | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/ed/idl/payment-handler.idl b/ed/idl/payment-handler.idl
index e039dd809..d0e5bd9fd 100644
index 1f6eaae2b..8aa55e9e9 100644
--- a/ed/idl/payment-handler.idl
+++ b/ed/idl/payment-handler.idl
@@ -104,3 +104,51 @@ DOMString? payerPhone;
@@ -81,3 +81,16 @@ DOMString? payerPhone;
AddressInit shippingAddress;
DOMString? shippingOption;
};
Expand All @@ -35,41 +32,6 @@ index e039dd809..d0e5bd9fd 100644
+ DOMString recipient = "";
+ DOMString phone = "";
+};
+
+dictionary PaymentOptions {
+ boolean requestPayerName = false;
+ boolean requestBillingAddress = false;
+ boolean requestPayerEmail = false;
+ boolean requestPayerPhone = false;
+ boolean requestShipping = false;
+ PaymentShippingType shippingType = "shipping";
+};
+
+dictionary PaymentShippingOption {
+ required DOMString id;
+ required DOMString label;
+ required PaymentCurrencyAmount amount;
+ boolean selected = false;
+};
+
+enum PaymentShippingType {
+ "shipping",
+ "delivery",
+ "pickup"
+};
+
+dictionary AddressErrors {
+ DOMString addressLine;
+ DOMString city;
+ DOMString country;
+ DOMString dependentLocality;
+ DOMString organization;
+ DOMString phone;
+ DOMString postalCode;
+ DOMString recipient;
+ DOMString region;
+ DOMString sortingCode;
+};
--
2.39.0.windows.2
2.37.1.windows.1

Loading