@paydock/client-sdk
Version:
Paydock client sdk
44 lines (29 loc) • 1.11 kB
Markdown
To install with package manager, enter the following command:
`npm install @paydock/client-sdk`
You will be available such modules:
1. You can use UMD module as global lib
`@paydock/client-sdk/bundles/widget.umd.js`
`@paydock/client-sdk/bundles/widget.umd.min.js`
2. You can use ES2015 or TypeScript modules
`@paydock/client-sdk`
```javascript
// ES2015 / TypeScript
import { HtmlWidget } from '@paydock/client-sdk';
const widget = new HtmlWidget('#selector', 'publicKey', 'gatewayId');
widget.load();
```
```javascript
// UMD
const widget = new paydock.HtmlWidget('#selector', 'publicKey', 'gatewayId');
widget.load();
```
You can download and use UMD module as global lib [production version][min] or the [development version][max]
[]: https://widget.paydock.com/sdk/latest/widget.umd.min.js
[]: https://widget.paydock.com/sdk/latest/widget.umd.js
```html
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js"></script>
<script src="https://widget.paydock.com/sdk/latest/widget.umd.js"></script>
```