Skip to content

Commit

Permalink
Update to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
zcorpan committed Mar 10, 2017
1 parent a809a76 commit 2e4713f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
4 changes: 4 additions & 0 deletions payment-request/historical.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
// https://github.com/w3c/browser-payment-api/pull/219
["totalAmount", "PaymentResponse"],

// https://github.com/w3c/browser-payment-api/pull/426
["paymentRequestId", "PaymentRequest"],
["paymentRequestId", "PaymentResponse"],

].forEach(([member, interf]) => {
test(() => {
assert_false(member in window[interf].prototype);
Expand Down
22 changes: 14 additions & 8 deletions payment-request/interfaces.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
interface EventTarget {};
</script>
<script type=text/plain>
[Constructor(sequence<PaymentMethodData> methodData, PaymentDetails details, optional PaymentOptions options),
[Constructor(sequence<PaymentMethodData> methodData, PaymentDetailsInit details, optional PaymentOptions options),
SecureContext]
interface PaymentRequest : EventTarget {
Promise<PaymentResponse> show();
Promise<void> abort();
Promise<boolean> canMakePayment();

readonly attribute DOMString? paymentRequestId;
readonly attribute DOMString id;
readonly attribute PaymentAddress? shippingAddress;
readonly attribute DOMString? shippingOption;
readonly attribute PaymentShippingType? shippingType;
Expand All @@ -37,12 +37,18 @@
required DOMString value;
DOMString currencySystem = "urn:iso:std:iso:4217";
};
dictionary PaymentDetails {
PaymentItem total;
dictionary PaymentDetailsBase {
sequence<PaymentItem> displayItems;
sequence<PaymentShippingOption> shippingOptions;
sequence<PaymentDetailsModifier> modifiers;
DOMString error;
};
dictionary PaymentDetailsInit : PaymentDetailsBase {
DOMString id;
required PaymentItem total;
};
dictionary PaymentDetailsUpdate : PaymentDetailsBase {
DOMString error;
PaymentItem total;
};
dictionary PaymentDetailsModifier {
required sequence<DOMString> supportedMethods;
Expand Down Expand Up @@ -91,13 +97,13 @@
enum PaymentComplete {
"fail",
"success",
"unknown",
"unknown"
};
[SecureContext]
interface PaymentResponse {
serializer = {attribute};

readonly attribute DOMString paymentRequestId;
readonly attribute DOMString requestId;
readonly attribute DOMString methodName;
readonly attribute object details;
readonly attribute PaymentAddress? shippingAddress;
Expand All @@ -111,7 +117,7 @@
[Constructor(DOMString type, optional PaymentRequestUpdateEventInit eventInitDict),
SecureContext]
interface PaymentRequestUpdateEvent : Event {
void updateWith(Promise<PaymentDetails> detailsPromise);
void updateWith(Promise<PaymentDetailsUpdate> detailsPromise);
};
dictionary PaymentRequestUpdateEventInit : EventInit {
};
Expand Down

0 comments on commit 2e4713f

Please sign in to comment.