Loading dom/interfaces/payments/moz.build +1 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ XPIDL_SOURCES += [ 'nsIPaymentActionRequest.idl', 'nsIPaymentActionResponse.idl', 'nsIPaymentAddress.idl', 'nsIPaymentRequest.idl', 'nsIPaymentRequestService.idl', 'nsIPaymentUIService.idl', Loading dom/interfaces/payments/nsIPaymentActionRequest.idl +23 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ #include "nsIVariant.idl" #include "nsIPaymentRequest.idl" #include "nsIPaymentActionResponse.idl" #include "nsIPaymentAddress.idl" interface nsIArray; Loading @@ -14,6 +15,8 @@ interface nsIArray; interface nsIPaymentActionCallback : nsISupports { void respondPayment(in nsIPaymentActionResponse aResponse); void changeShippingAddress(in AString aRequestId, in nsIPaymentAddress aAddress); void changeShippingOption(in AString aRequestId, in AString aOption); }; [builtinclass, uuid(7ddbe8be-beac-4952-96f6-619981dff7a6)] Loading @@ -25,6 +28,7 @@ interface nsIPaymentActionRequest : nsISupports const uint32_t SHOW_ACTION = 3; const uint32_t ABORT_ACTION = 4; const uint32_t COMPLETE_ACTION = 5; const uint32_t UPDATE_ACTION = 6; /* * The payment request identifier. Loading Loading @@ -99,6 +103,21 @@ interface nsIPaymentCompleteActionRequest : nsIPaymentActionRequest in AString aCompleteStatus); }; [builtinclass, uuid(21f631e8-c047-4fd8-b3c6-68e26c62639a)] interface nsIPaymentUpdateActionRequest : nsIPaymentActionRequest { /* * The details information for updating the specified payment request. */ readonly attribute nsIPaymentDetails details; /* * Initialize function for this request. */ void initRequest(in AString aRequestId, in nsIPaymentActionCallback aCallback, in nsIPaymentDetails aDetails); }; %{C++ #define NS_PAYMENT_ACTION_REQUEST_CID \ Loading @@ -116,4 +135,8 @@ interface nsIPaymentCompleteActionRequest : nsIPaymentActionRequest #define NS_PAYMENT_COMPLETE_ACTION_REQUEST_CONTRACT_ID \ "@mozilla.org/dom/payments/payment-complete-action-request;1" #define NS_PAYMENT_UPDATE_ACTION_REQUEST_CID \ { 0x21f631e8, 0xc047, 0x4fd8, { 0xb3, 0xc6, 0x68, 0xe2, 0x6c, 0x62, 0x63, 0x9a } } #define NS_PAYMENT_UPDATE_ACTION_REQUEST_CONTRACT_ID \ "@mozilla.org/dom/payments/payment-update-action-request;1" %} dom/interfaces/payments/nsIPaymentAddress.idl 0 → 100644 +43 −0 Original line number Diff line number Diff line /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* 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 nsIArray; [builtinclass, scriptable, uuid(49a02241-7e48-477a-9345-9f246925dcb3)] interface nsIPaymentAddress : nsISupports { readonly attribute AString country; readonly attribute nsIArray addressLine; readonly attribute AString region; readonly attribute AString city; readonly attribute AString dependentLocality; readonly attribute AString postalCode; readonly attribute AString sortingCode; readonly attribute AString languageCode; readonly attribute AString organization; readonly attribute AString recipient; readonly attribute AString phone; void init(in AString aCountry, in nsIArray aAddressLine, in AString aRegion, in AString aCity, in AString aDependentLocality, in AString aPostalCode, in AString aSortingCode, in AString aLanguageCode, in AString aOrganization, in AString aRecipient, in AString aPhone); }; %{C++ #define NS_PAYMENT_ADDRESS_CID \ { 0x49a02241, 0x7e48, 0x477a, { 0x93, 0x45, 0x9f, 0x24, 0x69, 0x25, 0xdc, 0xb3 } } #define NS_PAYMENT_ADDRESS_CONTRACT_ID \ "@mozilla.org/dom/payments/payment-address;1" %} dom/interfaces/payments/nsIPaymentRequestService.idl +8 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ #include "nsIPaymentRequest.idl" #include "nsIPaymentActionRequest.idl" #include "nsIPaymentActionResponse.idl" #include "nsIPaymentAddress.idl" #include "nsISimpleEnumerator.idl" #include "nsIPaymentUIService.idl" Loading Loading @@ -40,6 +41,13 @@ interface nsIPaymentRequestService : nsISupports * respondPayment is used for payment UI to respond the asked action result. */ void respondPayment(in nsIPaymentActionResponse aResponse); /* * These methods are used for payment UI to inform merchant the shipping * address/option change. */ void changeShippingAddress(in AString requestId, in nsIPaymentAddress aAddress); void changeShippingOption(in AString requestId, in AString option); }; %{C++ Loading dom/interfaces/payments/nsIPaymentUIService.idl +1 −0 Original line number Diff line number Diff line Loading @@ -13,4 +13,5 @@ interface nsIPaymentUIService : nsISupports nsIPaymentActionResponse showPayment(in AString requestId); nsIPaymentActionResponse abortPayment(in AString requestId); nsIPaymentActionResponse completePayment(in AString requestId); nsIPaymentActionResponse updatePayment(in AString requestId); }; Loading
dom/interfaces/payments/moz.build +1 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ XPIDL_SOURCES += [ 'nsIPaymentActionRequest.idl', 'nsIPaymentActionResponse.idl', 'nsIPaymentAddress.idl', 'nsIPaymentRequest.idl', 'nsIPaymentRequestService.idl', 'nsIPaymentUIService.idl', Loading
dom/interfaces/payments/nsIPaymentActionRequest.idl +23 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ #include "nsIVariant.idl" #include "nsIPaymentRequest.idl" #include "nsIPaymentActionResponse.idl" #include "nsIPaymentAddress.idl" interface nsIArray; Loading @@ -14,6 +15,8 @@ interface nsIArray; interface nsIPaymentActionCallback : nsISupports { void respondPayment(in nsIPaymentActionResponse aResponse); void changeShippingAddress(in AString aRequestId, in nsIPaymentAddress aAddress); void changeShippingOption(in AString aRequestId, in AString aOption); }; [builtinclass, uuid(7ddbe8be-beac-4952-96f6-619981dff7a6)] Loading @@ -25,6 +28,7 @@ interface nsIPaymentActionRequest : nsISupports const uint32_t SHOW_ACTION = 3; const uint32_t ABORT_ACTION = 4; const uint32_t COMPLETE_ACTION = 5; const uint32_t UPDATE_ACTION = 6; /* * The payment request identifier. Loading Loading @@ -99,6 +103,21 @@ interface nsIPaymentCompleteActionRequest : nsIPaymentActionRequest in AString aCompleteStatus); }; [builtinclass, uuid(21f631e8-c047-4fd8-b3c6-68e26c62639a)] interface nsIPaymentUpdateActionRequest : nsIPaymentActionRequest { /* * The details information for updating the specified payment request. */ readonly attribute nsIPaymentDetails details; /* * Initialize function for this request. */ void initRequest(in AString aRequestId, in nsIPaymentActionCallback aCallback, in nsIPaymentDetails aDetails); }; %{C++ #define NS_PAYMENT_ACTION_REQUEST_CID \ Loading @@ -116,4 +135,8 @@ interface nsIPaymentCompleteActionRequest : nsIPaymentActionRequest #define NS_PAYMENT_COMPLETE_ACTION_REQUEST_CONTRACT_ID \ "@mozilla.org/dom/payments/payment-complete-action-request;1" #define NS_PAYMENT_UPDATE_ACTION_REQUEST_CID \ { 0x21f631e8, 0xc047, 0x4fd8, { 0xb3, 0xc6, 0x68, 0xe2, 0x6c, 0x62, 0x63, 0x9a } } #define NS_PAYMENT_UPDATE_ACTION_REQUEST_CONTRACT_ID \ "@mozilla.org/dom/payments/payment-update-action-request;1" %}
dom/interfaces/payments/nsIPaymentAddress.idl 0 → 100644 +43 −0 Original line number Diff line number Diff line /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* 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 nsIArray; [builtinclass, scriptable, uuid(49a02241-7e48-477a-9345-9f246925dcb3)] interface nsIPaymentAddress : nsISupports { readonly attribute AString country; readonly attribute nsIArray addressLine; readonly attribute AString region; readonly attribute AString city; readonly attribute AString dependentLocality; readonly attribute AString postalCode; readonly attribute AString sortingCode; readonly attribute AString languageCode; readonly attribute AString organization; readonly attribute AString recipient; readonly attribute AString phone; void init(in AString aCountry, in nsIArray aAddressLine, in AString aRegion, in AString aCity, in AString aDependentLocality, in AString aPostalCode, in AString aSortingCode, in AString aLanguageCode, in AString aOrganization, in AString aRecipient, in AString aPhone); }; %{C++ #define NS_PAYMENT_ADDRESS_CID \ { 0x49a02241, 0x7e48, 0x477a, { 0x93, 0x45, 0x9f, 0x24, 0x69, 0x25, 0xdc, 0xb3 } } #define NS_PAYMENT_ADDRESS_CONTRACT_ID \ "@mozilla.org/dom/payments/payment-address;1" %}
dom/interfaces/payments/nsIPaymentRequestService.idl +8 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ #include "nsIPaymentRequest.idl" #include "nsIPaymentActionRequest.idl" #include "nsIPaymentActionResponse.idl" #include "nsIPaymentAddress.idl" #include "nsISimpleEnumerator.idl" #include "nsIPaymentUIService.idl" Loading Loading @@ -40,6 +41,13 @@ interface nsIPaymentRequestService : nsISupports * respondPayment is used for payment UI to respond the asked action result. */ void respondPayment(in nsIPaymentActionResponse aResponse); /* * These methods are used for payment UI to inform merchant the shipping * address/option change. */ void changeShippingAddress(in AString requestId, in nsIPaymentAddress aAddress); void changeShippingOption(in AString requestId, in AString option); }; %{C++ Loading
dom/interfaces/payments/nsIPaymentUIService.idl +1 −0 Original line number Diff line number Diff line Loading @@ -13,4 +13,5 @@ interface nsIPaymentUIService : nsISupports nsIPaymentActionResponse showPayment(in AString requestId); nsIPaymentActionResponse abortPayment(in AString requestId); nsIPaymentActionResponse completePayment(in AString requestId); nsIPaymentActionResponse updatePayment(in AString requestId); };