1/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2/* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 4 * You can obtain one at http://mozilla.org/MPL/2.0/. 5 * 6 * The origin of this WebIDL file is 7 * https://www.w3.org/TR/payment-request/#paymentresponse-interface 8 */ 9 10enum PaymentComplete { 11 "success", 12 "fail", 13 "unknown" 14}; 15 16[SecureContext, 17 Func="mozilla::dom::PaymentRequest::PrefEnabled"] 18interface PaymentResponse { 19 [Default] object toJSON(); 20 21 readonly attribute DOMString requestId; 22 readonly attribute DOMString methodName; 23 readonly attribute object details; 24 readonly attribute PaymentAddress? shippingAddress; 25 readonly attribute DOMString? shippingOption; 26 readonly attribute DOMString? payerName; 27 readonly attribute DOMString? payerEmail; 28 readonly attribute DOMString? payerPhone; 29 30 [NewObject] 31 Promise<void> complete(optional PaymentComplete result = "unknown"); 32}; 33