Skip to content

Commit 6f46b86

Browse files
committed
doc(README): Improve README
1 parent 2bd545e commit 6f46b86

File tree

1 file changed

+62
-3
lines changed

1 file changed

+62
-3
lines changed

README.md

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,45 @@
22

33
[Payment Request API](https://w3c.github.io/browser-payment-api/) implementation in Polymer. You can take a look the [demo page](https://jorgecasar.github.io/payment-request/components/payment-request/demo/)
44

5-
## Install the Polymer-CLI
5+
## Installation
66

7-
First, make sure you have the [Polymer CLI](https://www.npmjs.com/package/polymer-cli) installed. Then run `polymer serve` to serve your application locally.
7+
Install the component using [Bower](http://bower.io/):
88

9-
## Viewing component docs
9+
```sh
10+
$ bower install payment-request --save
11+
```
12+
13+
Or [download as ZIP](https://github.com/jorgecasar/payment-request/archive/master.zip).
14+
15+
## Usage
16+
17+
1. Import Web Components' polyfill:
18+
19+
```html
20+
<script src="bower_components/webcomponentsjs/webcomponents.js"></script>
21+
```
22+
23+
2. Import Custom Elements:
24+
25+
```html
26+
<link rel="import" href="bower_components/payment-request/payment-request.html">
27+
<link rel="import" href="bower_components/payment-request/payment-item.html">
28+
```
29+
30+
3. Start using it!
31+
32+
```html
33+
<payment-request
34+
networks='["amex", "diners", "discover", "jcb", "mastercard", "unionpay", "visa", "mir"]'
35+
types='["debit", "credit", "prepaid"]'>
36+
<payment-item class="item" label="Item 1" currency="EUR" value="1337"></payment-item>
37+
<button id="buyButton">Buy</button>
38+
</payment-request>
39+
```
40+
41+
## Viewing component docs & demo
42+
43+
First, make sure you have the [Polymer CLI](https://www.npmjs.com/package/polymer-cli) installed and serve the component:
1044

1145
```
1246
$ polymer serve
@@ -19,3 +53,28 @@ $ polymer test
1953
```
2054

2155
Your application is already set up to be tested via [web-component-tester](https://github.com/Polymer/web-component-tester). Run `polymer test` to run your application's test suite locally.
56+
57+
## Contributing
58+
59+
1. Fork it!
60+
2. Create your feature branch: `git checkout -b my-new-feature`
61+
3. Commit your changes: `git commit -am 'Add some feature'`
62+
4. Push to the branch: `git push origin my-new-feature`
63+
5. Submit a pull request :D
64+
65+
## History
66+
67+
68+
## Credits
69+
70+
- [Payment Request API](https://w3c.github.io/browser-payment-api/)
71+
72+
## License
73+
74+
Copyright 2017
75+
76+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
77+
78+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
79+
80+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)