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
| Signature | Description |
|---|---|
PaymentModifier() |
Creates a new instance |
| 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 |
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.,
readyStatebecomesReadyState)- Events use ActionEvent with
+=/-=(e.g.,addEventListener("click", fn)becomesOnClick += handler)- Async methods return
Task<T>instead ofPromise<T>- Objects should be disposed with
usingstatements- Access via
JS.Get<PaymentModifier>(...)or constructornew PaymentModifier(...)
self.addEventListener("paymentrequest", (e) => {
console.log(e.modifiers);
});