dom/payment/interfaces/nsIPaymentUIGlue.idl
author Rafael Ávila de Espíndola <respindola@mozilla.org>
Fri, 07 Dec 2012 01:06:33 -0500
changeset 120858 8df4ccd2fc0d48cb48a0c4878c89de412f916cec
parent 120408 c304d3db90e2d85c79e5b3cde746a2f563a50b41
permissions -rw-r--r--
Bug 818565 - Replace test-ping with a function. r=vladan.

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"

interface nsIPaymentFlowInfo;

[scriptable, function, uuid(b9afa678-71a5-4975-bcdb-0c4098730eff)]
interface nsIPaymentUIGlueCallback : nsISupports
{
    void onresult(in DOMString requestId, in DOMString result);
};

[scriptable, uuid(4dda9aa0-df88-4dcd-a583-199e516fa438)]
interface nsIPaymentUIGlue : nsISupports
{
    // The 'paymentRequestsInfo' contains the payment request information
    // for each JWT provided via navigator.mozPay call.
    void confirmPaymentRequest(in DOMString requestId,
                               in jsval paymentRequestsInfo,
                               in nsIPaymentUIGlueCallback successCb,
                               in nsIPaymentUIGlueCallback errorCb);

    void showPaymentFlow(in DOMString requestId,
                         in nsIPaymentFlowInfo paymentFlowInfo,
                         in nsIPaymentUIGlueCallback errorCb);

    void cleanup();
};