@paypal/merchant-onboarding-sdk 1.0.1 → 1.0.3
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 +112 -8
- package/dist/servicing.js +12961 -217
- package/dist/v1/js/development.partner.js +7989 -3
- package/dist/v1/js/development.servicing.js +15550 -1334
- package/dist/v1/js/partner.js +1 -1
- package/dist/v1/js/partner.js.LICENSE.txt +33 -0
- package/dist/v1/js/sandbox.partner.js +7989 -3
- package/dist/v1/js/sandbox.servicing.js +15550 -1334
- package/dist/v1/js/servicing.js +1 -1
- package/dist/v1/js/servicing.js.LICENSE.txt +33 -0
- package/dist/v1/js/staging.partner.js +7989 -3
- package/dist/v1/js/staging.servicing.js +15550 -1334
- package/dist/v1/js/te-e2e-embedded-path-testing.partner.js +7989 -3
- package/dist/v1/js/te-e2e-embedded-path-testing.servicing.js +15550 -1334
- package/dist/v1/js/te-eop-release.partner.js +7989 -3
- package/dist/v1/js/te-eop-release.servicing.js +15550 -1334
- package/dist/v1/js/te-hybrid-path-integration.partner.js +7989 -3
- package/dist/v1/js/te-hybrid-path-integration.servicing.js +15550 -1334
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -9,10 +9,17 @@ to manage the onboarding process, including:
|
|
|
9
9
|
- [Getting Started](#getting-started)
|
|
10
10
|
- [Installation](#installation)
|
|
11
11
|
- [Usage](#usage)
|
|
12
|
-
- [SDK Reference](#sdk-reference)
|
|
13
|
-
- [
|
|
14
|
-
- [
|
|
15
|
-
|
|
12
|
+
- [Onboarding SDK Reference](#onboarding-sdk-reference)
|
|
13
|
+
- [Install Onboarding SDK](#install-onboarding-sdk)
|
|
14
|
+
- [Initialize Onboarding SDK](#initialize-onboarding-sdk)
|
|
15
|
+
- [Onboarding Props Reference](#onboarding-props-reference)
|
|
16
|
+
- [Render Onboarding SDK](#render-onboarding-sdk)
|
|
17
|
+
- [Servicing SDK Reference](#servicing-sdk-reference)
|
|
18
|
+
- [Install Servicing SDK](#install-servicing-sdk)
|
|
19
|
+
- [Initialize and Render Servicing SDK](#initialize-and-render-servicing-sdk)
|
|
20
|
+
- [Supported Modules](#supported-modules)
|
|
21
|
+
- [Servicing Props Reference](#servicing-props-reference)
|
|
22
|
+
- [Styling Options](#styling-options)
|
|
16
23
|
|
|
17
24
|
## Getting Started
|
|
18
25
|
|
|
@@ -113,9 +120,21 @@ onboard
|
|
|
113
120
|
.render('root')
|
|
114
121
|
```
|
|
115
122
|
|
|
116
|
-
## SDK Reference
|
|
123
|
+
## Onboarding SDK Reference
|
|
117
124
|
|
|
118
|
-
###
|
|
125
|
+
### Install Onboarding SDK
|
|
126
|
+
|
|
127
|
+
```aiexclude
|
|
128
|
+
import { onboard } from "@paypal/merchant-onboarding-sdk/onboarding";
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Initialize Onboarding SDK
|
|
132
|
+
|
|
133
|
+
```aiexclude
|
|
134
|
+
Paypal.onboard.initialize(props)
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Onboarding Props Reference
|
|
119
138
|
|
|
120
139
|
| Parameter | Type | Description | Required |
|
|
121
140
|
| ----------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------- |
|
|
@@ -134,9 +153,94 @@ onboard
|
|
|
134
153
|
| `onContactUs` | `function` | Async Callback function to display contact information when appropriate. | No |
|
|
135
154
|
| `onLoginRequested` | `function` | Async Callback function to fetch access token for STANDALONE_HYBRID merchant. | Yes (only for spoke-only partners) |
|
|
136
155
|
|
|
137
|
-
###
|
|
156
|
+
### Render Onboarding SDK
|
|
157
|
+
|
|
158
|
+
```aiexclude
|
|
159
|
+
Paypal.onboard.render(<containerId>)
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
`containerId` is the id of the html container to render the onboarding flow
|
|
163
|
+
|
|
164
|
+
#### Example
|
|
165
|
+
|
|
166
|
+
To render Onboarding in the following div:
|
|
167
|
+
|
|
168
|
+
```aiexclude
|
|
169
|
+
<div id="container"></div>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Render the SDK like:
|
|
173
|
+
|
|
174
|
+
```aiexclude
|
|
175
|
+
Paypal.onboard.render('container')
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Servicing SDK Reference
|
|
179
|
+
|
|
180
|
+
### Install Servicing SDK
|
|
181
|
+
|
|
182
|
+
```aiexclude
|
|
183
|
+
import { servicing } from "@paypal/merchant-onboarding-sdk/servicing";
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Initialize And Render Servicing SDK
|
|
187
|
+
|
|
188
|
+
`PayPal.servicing.<MODULE_NAME>.initialize(props)`
|
|
189
|
+
|
|
190
|
+
```aiexclude
|
|
191
|
+
servicing.ACTION_WIDGETS.initialize({
|
|
192
|
+
targetElementId: 'container',
|
|
193
|
+
getAccessToken: async () => { // implementation here to get spoke access token} ,
|
|
194
|
+
style: {
|
|
195
|
+
color: {
|
|
196
|
+
primary: {
|
|
197
|
+
main: 'red',
|
|
198
|
+
},
|
|
199
|
+
secondary: {
|
|
200
|
+
main: 'green',
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
partnerName: 'partner',
|
|
205
|
+
partnerHostedModuleUrls: {
|
|
206
|
+
MONEY: 'www.partner.com/balance', // Partner web url where money SDK is used
|
|
207
|
+
ACTION_WIDGETS: 'www.partner.com/notification' // Partner web url where action widget SDK is used
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
#### Supported modules
|
|
213
|
+
|
|
214
|
+
| Supported Module Names |
|
|
215
|
+
| ------------------------------------ |
|
|
216
|
+
| MONEY |
|
|
217
|
+
| BANKS |
|
|
218
|
+
| ACTION_WIDGETS |
|
|
219
|
+
| PAID_FEATURES |
|
|
220
|
+
| PHONE |
|
|
221
|
+
| LIFT_LIMITS |
|
|
222
|
+
| LANGUAGE_EDIT |
|
|
223
|
+
| TIMEZONE_EDIT |
|
|
224
|
+
| INSIGHTS |
|
|
225
|
+
| REPORT |
|
|
226
|
+
| PAYMENT_PREFERENCES |
|
|
227
|
+
| VIEW_BUSINESS_PROFILE |
|
|
228
|
+
| CSM |
|
|
229
|
+
| ACCOUNT_SETTINGS_PAYMENT_PREFERENCES |
|
|
230
|
+
| MERCHANT_LISTING |
|
|
231
|
+
| ACTIVITY_REFUND |
|
|
232
|
+
| WORKING_CAPITAL |
|
|
233
|
+
|
|
234
|
+
### Servicing Props Reference
|
|
138
235
|
|
|
139
|
-
|
|
236
|
+
| Parameter | Type | Description | Required |
|
|
237
|
+
| ------------------------- | ---------- | -------------------------------------------------------------------------- | -------------------------------------------------- |
|
|
238
|
+
| `targetElementId` | `string` | The id of the HTML container to render the Servicing SDK | Yes |
|
|
239
|
+
| `getAccessToken` | `function` | Async Callback function that returns spoke account access token | Yes |
|
|
240
|
+
| `env` | `string` | The env that should be used. Possible values are 'sandbox' or 'production' | No (defaults to 'production' for npm integrations) |
|
|
241
|
+
| `partnerName` | `string` | The Partner's name | No |
|
|
242
|
+
| `partnerHostedModuleUrls` | `object` | The URL to return from onboarding on cancel. | No |
|
|
243
|
+
| `style` | `object` | Styling options (see below, same as onboarding). | No |
|
|
140
244
|
|
|
141
245
|
### Styling Options
|
|
142
246
|
|