You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Purchasing an item (`PaymentRequest.show` method)
164
+
## Purchasing an item (`PaymentRequest` constructor and `show` method)
165
165
166
-
Use the `show` method of the `PaymentRequest` interface to purchase an item, after you construct a request that contains the item details.
166
+
After your products and details are displayed to the user, implement the purchase flow by using the Payment Request API. To purchase an item, construct a request that contains the item details by using the `PaymentRequest` constructor, and then use the `show` method of the `PaymentRequest` object.
167
167
168
-
Once your products and details are displayed to the user, you can implement the purchase flow by using the Payment Request API. When combined with the Digital Goods API, the only required input parameter is `methodData`.
169
-
170
-
In the `PaymentRequest` constructor's `methodData` parameter:
168
+
When combined with the Digital Goods API, the only required input parameter for the `PaymentRequest` constructor is `methodData`. In that parameter:
171
169
* Use the `supportedMethods` member to identify Microsoft Store Billing as the payment method with the string `"https://store.microsoft.com/billing"`.
172
-
* In the `data` member, pass along the item ID as the `sku`:
173
-
174
-
<!-- todo: in PaymentRequest ctor, the 2nd param (details) is missing, per ctor docs: https://developer.mozilla.org/docs/Web/API/PaymentRequest/PaymentRequest - the 3rd param, "options", says "optional" next to it, unlike "details" param - is that page missing a 1-param overload? new PaymentRequest(methodData)
175
-
-->
170
+
* In the `data` member, pass along the item ID as the `sku`.
0 commit comments