@medipass/checkout-sdk 3.0.0-alpha.7 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Medipass Checkout SDK
2
2
 
3
- The Medipass Checkout SDK is a client-side JavaScript library which allows you to interact with Medipass from your web interface.
3
+ The Medipass Checkout SDK is a client-side TypeScript library which allows you to interact with Medipass from your web interface. It has full TypeScript support.
4
4
 
5
5
  ## Table of Contents
6
6
 
@@ -11,8 +11,8 @@ The Medipass Checkout SDK is a client-side JavaScript library which allows you t
11
11
  - [Basic Usage](#basic-usage)
12
12
  - [With a `<script>` tag](#with-a-script-tag)
13
13
  - [Request To Update Patient Card Details](#request-to-update-patient-card-details)
14
- - [Example](#example)
15
- - [Using `<script>` tag](#using-script-tag)
14
+ - [Example](#example)
15
+ - [Using `<script>` tag](#using-script-tag)
16
16
  - [API](#api)
17
17
  - [sdk.init(config)](#sdkinitconfig)
18
18
  - [config](#config)
@@ -33,7 +33,7 @@ npm install @medipass/checkout-sdk
33
33
 
34
34
  ## Create Checkout
35
35
 
36
- A payment request URL is passed to the createCheckout function, which opens a secure pop-up window to Medipass to take the payment.
36
+ A payment request URL is passed to the createCheckout function, which opens a secure pop-up window to Medipass to take the payment.
37
37
 
38
38
  ### Basic Usage
39
39
 
@@ -70,7 +70,7 @@ await medipassCheckoutSDK.createCheckout({
70
70
  ```html
71
71
  <html>
72
72
  <head>
73
- <script src="https://unpkg.com/@medipass/checkout-sdk/umd/@medipass/checkout-sdk.min.js"></script>
73
+ <script src="https://unpkg.com/@medipass/checkout-sdk/dist/umd/index.min.js"></script>
74
74
  </head>
75
75
  <body>
76
76
  <script>
@@ -101,9 +101,11 @@ await medipassCheckoutSDK.createCheckout({
101
101
  ```
102
102
 
103
103
  ## Request To Update Patient Card Details
104
+
104
105
  You can update a patient's payment details using the requestUpdatePaymentDetails function.
105
106
 
106
107
  ### Example
108
+
107
109
  ```jsx
108
110
  import medipassCheckoutSDK from '@medipass/checkout-sdk';
109
111
  // or: const medipassCheckoutSDK = require('@medipass/checkout-sdk');
@@ -128,7 +130,7 @@ await medipassCheckoutSDK.requestUpdatePaymentDetails({
128
130
  ```html
129
131
  <html>
130
132
  <head>
131
- <script src="https://unpkg.com/@medipass/checkout-sdk/umd/@medipass/checkout-sdk.min.js"></script>
133
+ <script src="https://unpkg.com/@medipass/checkout-sdk/dist/umd/index.min.js"></script>
132
134
  </head>
133
135
  <body>
134
136
  <script>
@@ -148,11 +150,12 @@ await medipassCheckoutSDK.requestUpdatePaymentDetails({
148
150
  </body>
149
151
  </html>
150
152
  ```
153
+
151
154
  Take note of the following:
155
+
152
156
  1. medipassCheckoutSDK.int() should not be called when using requestUpdatePaymentDetails
153
157
  2. it is required that you pass either an apiKey or a token
154
158
 
155
-
156
159
  ## API
157
160
 
158
161
  ### sdk.init(config)
@@ -182,12 +185,3 @@ Take note of the following:
182
185
  paymentRequestUrl: string,
183
186
  }
184
187
  ```
185
-
186
- [build-badge]: https://img.shields.io/travis/user/repo/master.png?style=flat-square
187
- [build]: https://travis-ci.org/user/repo
188
-
189
- [npm-badge]: https://img.shields.io/npm/v/npm-package.png?style=flat-square
190
- [npm]: https://www.npmjs.org/package/npm-package
191
-
192
- [coveralls-badge]: https://img.shields.io/coveralls/user/repo/master.png?style=flat-square
193
- [coveralls]: https://coveralls.io/github/user/repo