@paypal/merchant-onboarding-sdk 1.0.1 → 1.0.2

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
@@ -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
- - [`Paypal.onboard.initialize()`](#paypalonboardinitialize)
14
- - [`Paypal.onboard.render()`](#paypalonboardrender)
15
- - [Styling Options](#styling-options)
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
- ### `Paypal.onboard.initialize(props)`
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,76 @@ 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
- ### `Paypal.onboard.render(containerId)`
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
+ ```aiexclude
189
+ PayPal.servicing.<MODULE>.initialize(props)
190
+ ```
138
191
 
139
- This will render the PayPal Merchant Onboarding flow inside the container
192
+ example: `PayPal.servicing.ACTION_WIDGETS.initialize(props)`
193
+
194
+ #### Supported modules
195
+
196
+ | Supported Module Names |
197
+ | ------------------------------------ |
198
+ | MONEY |
199
+ | BANKS |
200
+ | ACTION_WIDGETS |
201
+ | PAID_FEATURES |
202
+ | PHONE |
203
+ | LIFT_LIMITS |
204
+ | LANGUAGE_EDIT |
205
+ | TIMEZONE_EDIT |
206
+ | INSIGHTS |
207
+ | REPORT |
208
+ | PAYMENT_PREFERENCES |
209
+ | VIEW_BUSINESS_PROFILE |
210
+ | CSM |
211
+ | ACCOUNT_SETTINGS_PAYMENT_PREFERENCES |
212
+ | MERCHANT_LISTING |
213
+ | ACTIVITY_REFUND |
214
+ | WORKING_CAPITAL |
215
+
216
+ ### Servicing Props Reference
217
+
218
+ | Parameter | Type | Description | Required |
219
+ | ------------------------- | ---------- | -------------------------------------------------------------------------- | -------------------------------------------------- |
220
+ | `targetElementId` | `string` | The id of the HTML container to render the Servicing SDK | Yes |
221
+ | `getAccessToken` | `function` | Async Callback function that returns spoke account access token | Yes |
222
+ | `env` | `string` | The env that should be used. Possible values are 'sandbox' or 'production' | No (defaults to 'production' for npm integrations) |
223
+ | `partnerName` | `string` | The Partner's name | No |
224
+ | `partnerHostedModuleUrls` | `object` | The URL to return from onboarding on cancel. | No |
225
+ | `style` | `object` | Styling options (see below, same as onboarding). | No |
140
226
 
141
227
  ### Styling Options
142
228