1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/payment/interfaces/nsIPaymentUIGlue.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,30 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.6 + * You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#include "nsISupports.idl" 1.9 + 1.10 +interface nsIPaymentFlowInfo; 1.11 + 1.12 +[scriptable, function, uuid(b9afa678-71a5-4975-bcdb-0c4098730eff)] 1.13 +interface nsIPaymentUIGlueCallback : nsISupports 1.14 +{ 1.15 + void onresult(in DOMString requestId, in DOMString result); 1.16 +}; 1.17 + 1.18 +[scriptable, uuid(4dda9aa0-df88-4dcd-a583-199e516fa438)] 1.19 +interface nsIPaymentUIGlue : nsISupports 1.20 +{ 1.21 + // The 'paymentRequestsInfo' contains the payment request information 1.22 + // for each JWT provided via navigator.mozPay call. 1.23 + void confirmPaymentRequest(in DOMString requestId, 1.24 + in jsval paymentRequestsInfo, 1.25 + in nsIPaymentUIGlueCallback successCb, 1.26 + in nsIPaymentUIGlueCallback errorCb); 1.27 + 1.28 + void showPaymentFlow(in DOMString requestId, 1.29 + in nsIPaymentFlowInfo paymentFlowInfo, 1.30 + in nsIPaymentUIGlueCallback errorCb); 1.31 + 1.32 + void cleanup(); 1.33 +};