Namespace: SpawnDev.SpawnJS.JSObjects
Source: JSObjects/PaymentItem.cs
MDN Reference: PaymentItem on MDN
https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequestEvent/modifiers#total
| Property | Type | Access | Description |
|---|---|---|---|
PaymentItem |
class |
get/set | https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequestEvent/modifiers#total |
Amount |
PaymentCurrencyAmount |
get/set | A PaymentCurrencyAmount object (see total > Value). |
Pending |
bool |
get | A boolean. When set to true it means that the amount member is not final. This is commonly used to show items such as shipping or tax amounts that depend upon selection of shipping address or shipping option. |
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<PaymentItem>(...)or constructornew PaymentItem(...)
self.addEventListener("paymentrequest", (e) => {
console.log(e.modifiers);
});