Interface nsIPaymentUIServiceType

nsIPaymentUIService is the interface used by Gecko to communicate with the payment UI. In general, the implementation of this interface should be a service that manages all payment UI components and receives the requested payment actions from Gecko and perform the corresponding UI behavior.

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Abort the payment. The implementation must abort and close the showing payment UI then call nsIPaymentRequestService respondPayment with nsIPaymentAbortActionResponse to inform Gecko of the abort status.

    Parameters

    • requestId: string

      the request identify of the payment request. Notice that this requestId is an internal request Id generated by Gecko

    Returns void

  • Close the payment UI for the specified PaymentRequest. The implementation should clean up the PaymentRequest data saved in the UI component and close the UI if the specified PaymentRequest is showing to the user. Notice when the method is called, that means the PaymentRequest is invalid in nsIPaymentRequestService.

    Parameters

    • requestId: string

      the request identify of the payment request. Notice that this requestId is an internal request Id generated by Gecko

    Returns void

  • Complete the payment. The implementation should close the showing payment UI, then call nsIPaymentRequestService respondPayment with nsIPaymentCompleteActionResponse to inform Gecko of the complete status.

    Parameters

    • requestId: string

      the request identify of the payment request. Notice that this requestId is an internal request Id generated by Gecko

    Returns void

  • Show the payment UI to users. The implementation gets the payment data through nsIPaymentRequestService by the passed in requestId, then shows the payment UI and start to interact with users. According to user's action, nsIPaymentRequestService's APIs respondPayment, changeShippingAddress, or changeShippingOtpion is possible to called in the implementation.

    Parameters

    • requestId: string

      the request identify of the payment request. Notice that this requestId is an internal request Id generated by Gecko

    Returns void

  • Update the payment data in the payment UI. The implementation should get the updated payment data through the nsIPaymentRequestService again, and update the UI.

    Parameters

    • requestId: string

      the request identify of the payment request. Notice that this requestId is an internal request Id generated by Gecko

    Returns void

Generated using TypeDoc