Skip to content

Commit 6454ac1

Browse files
committed
docs(README): improve webcomponets.org readme
1 parent 712f735 commit 6454ac1

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

README.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/jorgecasar/payment-request)
2+
3+
14
# \<payment-request\> API component
25

36
[Payment Request API](https://w3c.github.io/browser-payment-api/) web component build with using Polymer. You can take a look the [demo page](https://jorgecasar.github.io/payment-request/components/payment-request/demo/) to see how it works.
@@ -31,18 +34,28 @@ Or [download as ZIP](https://github.com/jorgecasar/payment-request/archive/maste
3134

3235
3. Start using it!
3336

37+
<!--
38+
```
39+
<custom-element-demo>
40+
<template>
41+
<base href="https://user-content-dot-custom-elements.appspot.com/jorgecasar/payment-request/bb725682888fabeab331f4be9dd8f0ed324f8048/payment-request/">
42+
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
43+
<link rel="import" href="payment-request.html">
44+
<next-code-block></next-code-block>
45+
</template>
46+
</custom-element-demo>
47+
```
48+
-->
3449
```html
35-
<payment-request last-response="{{paymentResponse}}">
36-
<payment-method
37-
supported='["basic-card"]'
38-
data='{
50+
<payment-request>
51+
<payment-method supported='["basic-card"]' data='{
3952
"supportedNetwork": ["amex", "mastercard", "visa" ],
4053
"supportedTypes": ["debit", "credit"]
4154
}'></payment-method>
42-
<payment-item class="item" label="Item 1" currency="EUR" value="1337"></payment-item>
43-
<button id="buyButton">Buy</button>
55+
<payment-item class="item" label="Item 1" currency="EUR" value="1337"></payment-item>
56+
<button id="buyButton">Buy</button>
4457
</payment-request>
45-
```
58+
```
4659

4760
4. Validate payment data and complete payment request.
4861

0 commit comments

Comments
 (0)