blob: 71284189bf1531b1c9b8e6ddef88757c10ac2b73 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://w3c.github.io/browser-payment-api/#idl-def-paymentcomplete
enum PaymentComplete {
"success",
"fail",
"unknown"
};
// https://w3c.github.io/browser-payment-api/#paymentresponse-interface
[
RuntimeEnabled=PaymentRequest,
] interface PaymentResponse {
serializer = {attribute};
readonly attribute DOMString methodName;
[RuntimeEnabled=PaymentRequestPayerName] readonly attribute DOMString? payerName;
readonly attribute DOMString? payerEmail;
readonly attribute DOMString? payerPhone;
[CallWith=ScriptState, RaisesException] readonly attribute object details;
readonly attribute PaymentAddress? shippingAddress;
readonly attribute DOMString? shippingOption;
[CallWith=ScriptState] Promise<void> complete(optional PaymentComplete paymentResult = "unknown");
};