dom/payment/interfaces/nsIDOMPaymentRequestInfo.idl
author Fernando Jiménez <ferjmoreno@gmail.com>
Mon, 29 Oct 2012 10:52:44 +0100
changeset 111663 7035e54f92fc029ecaf168cb480e416e1a488e1e
parent 103831 fc63cbb13336802bfc294356d1a5cc067de5de67
child 112637 222f4185ecb56970684e04adcb3237f0065b4b3c
permissions -rw-r--r--
Bug 805123 - Remove country code validation from navigator.mozPay(); r=fabrice

/* 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"

[scriptable, uuid(2a9bc152-ce8d-4ac5-a2b0-7fb52501178e)]
interface nsIDOMPaymentProductPrice : nsISupports
{
  // Each price has a currency associated.
  readonly attribute DOMString currency;

  // Total amount of the product being sold.
  readonly attribute double amount;
};

[scriptable, uuid(95b89ed3-074d-4c31-a26d-5f0abed420a2)]
interface nsIDOMPaymentRequestInfo : nsISupports
{
  // Base64 encoded and digitally signed payment request.
  readonly attribute DOMString jwt;

  // JWT type that identifies the payment provider owner of the payment request
  // format.
  readonly attribute DOMString type;

  // Payment provider name.
  readonly attribute DOMString providerName;
};

[scriptable, uuid(7a9f78a6-84c6-4f8a-bb3e-3d9ae34727db)]
interface nsIDOMPaymentRequestPaymentInfo : nsIDOMPaymentRequestInfo
{
  // Name of the product being sold.
  readonly attribute DOMString productName;

  // Human readable description about the product being sold.
  readonly attribute DOMString productDescription;

  // Could be a single nsIDOMPaymentProductPrice or an array of them.
  readonly attribute jsval productPrice;
};

[scriptable, uuid(9759800a-7766-48c3-a6a6-efbe6ab54054)]
interface nsIDOMPaymentRequestRefundInfo : nsIDOMPaymentRequestInfo
{
  // If the requests is a refund request, it must contain a refund reason.
  readonly attribute DOMString reason;
};