Table of Contents

Class CanMakePaymentEvent

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
The CanMakePaymentEvent interface of the {{domxref(&quot;Payment Handler API&quot;, &quot;&quot;, &quot;&quot;, "nocode")}} is the event object for the ServiceWorkerGlobalScope.Canmakepayment event, fired on a payment app's service worker to check whether it is ready to handle a payment. Specifically, it is fired when the merchant website calls the PaymentRequest(List<PaymentMethodData>, PaymentDetailsInit, PaymentOptions) constructor.
[Value("CanMakePaymentEvent")]
public class CanMakePaymentEvent : ExtendableEvent
Inheritance
CanMakePaymentEvent
Inherited Members

Remarks

-{{domxref(&quot;Payment Handler API&quot;, &quot;Payment Handler API&quot;, &quot;&quot;, &quot;nocode&quot;)}}
-Web-based payment apps overview
-Setting up a payment method
-Life of a payment transaction
-Using the Payment Request API
-Payment processing concepts

See also on MDN

Constructors

CanMakePaymentEvent()

public CanMakePaymentEvent()

CanMakePaymentEvent(string)

NOTE
Experimental
The CanMakePaymentEvent() constructor creates a new CanMakePaymentEvent object instance.
public CanMakePaymentEvent(string type)

Parameters

type string

Remarks

-{{domxref(&quot;Payment Handler API&quot;, &quot;Payment Handler API&quot;, &quot;&quot;, &quot;nocode&quot;)}}
-Web-based payment apps overview
-Setting up a payment method
-Life of a payment transaction
-Using the Payment Request API
-Payment processing concepts

See also on MDN

Methods

RespondWith(Task<bool>)

NOTE
Experimental
The respondWith() method of the CanMakePaymentEvent interface enables the service worker to respond appropriately to signal whether it is ready to handle payments.
[Value("respondWith")]
public GlobalObject.Undefined RespondWith(Task<bool> canMakePaymentResponse)

Parameters

canMakePaymentResponse Task<bool>

Returns

GlobalObject.Undefined

None (undefined).

Remarks

-{{domxref(&quot;Payment Handler API&quot;, &quot;Payment Handler API&quot;, &quot;&quot;, &quot;nocode&quot;)}}
-Web-based payment apps overview
-Setting up a payment method
-Life of a payment transaction
-Using the Payment Request API
-Payment processing concepts

See also on MDN