Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.52 KB

File metadata and controls

40 lines (29 loc) · 1.52 KB

PaymentModifier

Namespace: SpawnDev.SpawnJS.JSObjects
Inherits: SpawnJSObject
Source: JSObjects/PaymentModifier.cs
MDN Reference: PaymentModifier on MDN

https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequestEvent/modifiers#value

Constructors

Signature Description
PaymentModifier() Creates a new instance

Properties

Property Type Access Description
SupportedMethods string? get/set A payment method identifier. The members of the object only apply to the payment if the user selects this payment method.
Total PaymentItem? get A PaymentItem object

Examples

SpawnDev.SpawnJS Mapping Note: The JavaScript examples below show the standard Web API usage. In SpawnDev.SpawnJS, the same API is available with C# conventions:

  • Properties and methods use PascalCase (e.g., readyState becomes ReadyState)
  • Events use ActionEvent with +=/-= (e.g., addEventListener("click", fn) becomes OnClick += handler)
  • Async methods return Task<T> instead of Promise<T>
  • Objects should be disposed with using statements
  • Access via JS.Get<PaymentModifier>(...) or constructor new PaymentModifier(...)
self.addEventListener("paymentrequest", (e) => {
  console.log(e.modifiers);
});

See full example on MDN