@paydock/client-sdk 1.103.1 → 1.103.24-beta
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 +245 -199
- package/bundles/widget.umd.js +144 -214
- package/bundles/widget.umd.min.js +1 -1
- package/lib/api/api-service-internal.d.ts +2 -1
- package/lib/api/api-service-internal.js +1 -0
- package/lib/api/api-service-internal.js.map +1 -1
- package/lib/components/iframe-event.d.ts +2 -0
- package/lib/components/iframe-event.js +2 -0
- package/lib/components/iframe-event.js.map +1 -1
- package/lib/components/link.d.ts +3 -2
- package/lib/components/link.js +1 -0
- package/lib/components/link.js.map +1 -1
- package/lib/components/param.d.ts +2 -2
- package/lib/components/param.js.map +1 -1
- package/lib/configs/env/env.d.ts +3 -0
- package/lib/configs/env/env.js +9 -0
- package/lib/configs/env/env.js.map +1 -1
- package/lib/configs/sdk.js +1 -1
- package/lib/secure-remote-commerce/index.d.ts +102 -1
- package/lib/secure-remote-commerce/index.js +102 -1
- package/lib/secure-remote-commerce/index.js.map +1 -1
- package/lib/secure-remote-commerce/interfaces.d.ts +109 -32
- package/lib/secure-remote-commerce/interfaces.js +31 -11
- package/lib/secure-remote-commerce/interfaces.js.map +1 -1
- package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts +30 -0
- package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.js +39 -0
- package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.js.map +1 -0
- package/lib/secure-remote-commerce/providers/mastercard-src/index.d.ts +1 -0
- package/lib/secure-remote-commerce/providers/mastercard-src/index.js +2 -0
- package/lib/secure-remote-commerce/providers/mastercard-src/index.js.map +1 -0
- package/lib/secure-remote-commerce/providers/{visa-src/visa-src.d.ts → mastercard-src/mastercard-src.d.ts} +4 -7
- package/lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.js +88 -0
- package/lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.js.map +1 -0
- package/lib/secure-remote-commerce/secure-remote-commerce.d.ts +13 -91
- package/lib/secure-remote-commerce/secure-remote-commerce.js +15 -98
- package/lib/secure-remote-commerce/secure-remote-commerce.js.map +1 -1
- package/lib/wallet-buttons/flypay-v2.wallet-service.js +1 -1
- package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +1 -1
- package/package.json +1 -1
- package/slate.md +59 -84
- package/lib/secure-remote-commerce/providers/visa-src/helper.d.ts +0 -7
- package/lib/secure-remote-commerce/providers/visa-src/helper.js +0 -36
- package/lib/secure-remote-commerce/providers/visa-src/helper.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/index.d.ts +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/index.js +0 -2
- package/lib/secure-remote-commerce/providers/visa-src/index.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js +0 -113
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +0 -8
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js +0 -10
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js.map +0 -1
package/README.md
CHANGED
|
@@ -6105,26 +6105,22 @@ List of available event's name in the wallet button lifecycle
|
|
|
6105
6105
|
## Secure Remote Commerce
|
|
6106
6106
|
You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#SRC).
|
|
6107
6107
|
|
|
6108
|
-
This widget provides you with the ability to easily integrate with
|
|
6108
|
+
This widget provides you with the ability to easily integrate with Mastercard SRC.
|
|
6109
6109
|
|
|
6110
6110
|
## SRC simple example
|
|
6111
6111
|
|
|
6112
6112
|
### Container
|
|
6113
|
+
To integrate the SRC checkout iFrame you first need to create a container within your HTML code. This container will serve as the placeholder for the iFrame.
|
|
6113
6114
|
|
|
6114
6115
|
```html
|
|
6115
|
-
<div id="checkoutButton"></div>
|
|
6116
6116
|
<div id="checkoutIframe"></div>
|
|
6117
6117
|
```
|
|
6118
6118
|
|
|
6119
|
-
You must create a container for the initial checkout button, and a different one for the checkout iFrame. Inside the first tag the button will be initialized, and inside the second one the iFrame will be loaded once the button is clicked.
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
6119
|
### Initialization
|
|
6123
6120
|
```javascript
|
|
6124
|
-
var src = new paydock.
|
|
6125
|
-
"#checkoutButton",
|
|
6121
|
+
var src = new paydock.MastercardSRCClickToPay(
|
|
6126
6122
|
"#checkoutIframe",
|
|
6127
|
-
"
|
|
6123
|
+
"service_id",
|
|
6128
6124
|
"paydock_public_key_or_access_token",
|
|
6129
6125
|
{}, // meta
|
|
6130
6126
|
);
|
|
@@ -6134,19 +6130,18 @@ src.load();
|
|
|
6134
6130
|
```javascript--es2015
|
|
6135
6131
|
// ES2015 | TypeScript
|
|
6136
6132
|
|
|
6137
|
-
import {
|
|
6133
|
+
import { MastercardSRCClickToPay } from '@paydock/client-sdk';
|
|
6138
6134
|
|
|
6139
|
-
var src = new
|
|
6140
|
-
"#checkoutButton",
|
|
6135
|
+
var src = new MastercardSRCClickToPay(
|
|
6141
6136
|
"#checkoutIframe",
|
|
6142
|
-
"
|
|
6137
|
+
"service_id",
|
|
6143
6138
|
"paydock_public_key_or_access_token",
|
|
6144
6139
|
{}, // meta
|
|
6145
6140
|
);
|
|
6146
6141
|
src.load();
|
|
6147
6142
|
```
|
|
6148
6143
|
|
|
6149
|
-
*NOTE:* it's highly recommended to use a Paydock Access Token instead of the public key for security reasons. When creating it, you will need to enable the `Secure Remote Commerce` and add a
|
|
6144
|
+
*NOTE:* it's highly recommended to use a Paydock Access Token instead of the public key for security reasons in production environments. When creating it, you will need to enable the `Secure Remote Commerce` and add a whitelist for the domain of your checkout screen.
|
|
6150
6145
|
|
|
6151
6146
|
### Full example
|
|
6152
6147
|
|
|
@@ -6159,14 +6154,12 @@ src.load();
|
|
|
6159
6154
|
<style>iframe {border: 0;width: 40%;height: 300px;}</style>
|
|
6160
6155
|
</head>
|
|
6161
6156
|
<body>
|
|
6162
|
-
<div id="checkoutButton"></div>
|
|
6163
6157
|
<div id="checkoutIframe"></div>
|
|
6164
6158
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
6165
6159
|
<script>
|
|
6166
|
-
var src = new paydock.
|
|
6167
|
-
"#checkoutButton",
|
|
6160
|
+
var src = new paydock.MastercardSRCClickToPay(
|
|
6168
6161
|
"#checkoutIframe",
|
|
6169
|
-
"
|
|
6162
|
+
"service_id",
|
|
6170
6163
|
"paydock_public_key_or_access_token",
|
|
6171
6164
|
{},
|
|
6172
6165
|
);
|
|
@@ -6182,25 +6175,12 @@ src.load();
|
|
|
6182
6175
|
### Settings
|
|
6183
6176
|
|
|
6184
6177
|
```javascript
|
|
6185
|
-
|
|
6186
|
-
src.setEnv('sandbox'); // set enviroment
|
|
6187
|
-
|
|
6188
|
-
src.hideButton(); // hide button
|
|
6189
|
-
|
|
6190
|
-
src.showButton(); // show button
|
|
6178
|
+
src.setEnv('sandbox'); // set environment
|
|
6191
6179
|
|
|
6192
6180
|
src.hideCheckout(); // hide checkout iframe
|
|
6193
6181
|
|
|
6194
6182
|
src.showCheckout(); // show checkout iframe
|
|
6195
6183
|
|
|
6196
|
-
src.on('checkoutButtonLoaded', () => {
|
|
6197
|
-
console.log("Button loaded");
|
|
6198
|
-
});
|
|
6199
|
-
|
|
6200
|
-
src.on('checkoutButtonClicked', () => {
|
|
6201
|
-
console.log("Button clicked");
|
|
6202
|
-
});
|
|
6203
|
-
|
|
6204
6184
|
src.on('iframeLoaded', () => {
|
|
6205
6185
|
console.log("Initial iframe loaded");
|
|
6206
6186
|
});
|
|
@@ -6231,18 +6211,20 @@ Here you can see how you can use this methods to customize your checkout experie
|
|
|
6231
6211
|
<style>iframe {border: 0;width: 40%;height: 450px;}</style>
|
|
6232
6212
|
</head>
|
|
6233
6213
|
<body>
|
|
6234
|
-
<div id="checkoutButton"></div>
|
|
6235
6214
|
<div id="checkoutIframe"></div>
|
|
6236
6215
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
6237
6216
|
<script>
|
|
6238
|
-
var src = new paydock.
|
|
6239
|
-
"#checkoutButton",
|
|
6217
|
+
var src = new paydock.MastercardSRCClickToPay(
|
|
6240
6218
|
"#checkoutIframe",
|
|
6241
|
-
"
|
|
6219
|
+
"service_id",
|
|
6242
6220
|
"paydock_public_key_or_access_token",
|
|
6243
6221
|
{},
|
|
6244
6222
|
);
|
|
6245
6223
|
|
|
6224
|
+
src.on('iframeLoaded', () => {
|
|
6225
|
+
console.log("Initial iframe loaded");
|
|
6226
|
+
});
|
|
6227
|
+
|
|
6246
6228
|
src.on('checkoutReady', () => {
|
|
6247
6229
|
console.log("Checkout ready to be used");
|
|
6248
6230
|
});
|
|
@@ -6250,34 +6232,37 @@ Here you can see how you can use this methods to customize your checkout experie
|
|
|
6250
6232
|
src.on('checkoutCompleted', (token) => {
|
|
6251
6233
|
console.log(token);
|
|
6252
6234
|
});
|
|
6235
|
+
|
|
6236
|
+
src.on('checkoutError', (error) => {
|
|
6237
|
+
console.log(error);
|
|
6238
|
+
});
|
|
6239
|
+
|
|
6253
6240
|
src.load();
|
|
6254
6241
|
</script>
|
|
6255
6242
|
</body>
|
|
6256
6243
|
</html>
|
|
6257
6244
|
```
|
|
6258
6245
|
|
|
6259
|
-
## Customization options for address fields
|
|
6260
|
-
### Shipping address:
|
|
6246
|
+
## Customization options for billing address fields
|
|
6261
6247
|
|
|
6262
|
-
To customize
|
|
6248
|
+
To customize billing address experience we use a flag that manages how MastercardSRC requires or not billing address to the customer. Options are NONE (default option), POSTAL_COUNTRY or FULL.
|
|
6263
6249
|
|
|
6264
6250
|
```
|
|
6265
|
-
var src = new paydock.
|
|
6266
|
-
"#checkoutButton",
|
|
6251
|
+
var src = new paydock.MastercardSRCClickToPay(
|
|
6267
6252
|
"#checkoutIframe",
|
|
6268
|
-
"
|
|
6253
|
+
"service_id",
|
|
6269
6254
|
"paydock_public_key_or_access_token",
|
|
6270
6255
|
{
|
|
6271
6256
|
"dpa_transaction_options": {
|
|
6272
|
-
"
|
|
6257
|
+
"dpa_billing_preference": "FULL"
|
|
6273
6258
|
}
|
|
6274
6259
|
},
|
|
6275
6260
|
);
|
|
6276
6261
|
```
|
|
6277
6262
|
|
|
6278
|
-
With this the
|
|
6263
|
+
With this the SRC checkout will require the billing address from consumer and be returned as part of the checkout data. These information will be stored and leveraged in the Paydock charge as well.
|
|
6279
6264
|
|
|
6280
|
-
Another option is at time of creating the charge. Say that you have a different way of collecting the
|
|
6265
|
+
Another option is to provide it at the time of creating the charge. Say that you have a different way of collecting the billing address (outside SRC checkout), you can then disable the shipping address on our SRC widget and send it when creating the charge after getting the One Time Token out of the SRC widget, alongside other details that may have been collected outside the SRC checkout as the shipping address.
|
|
6281
6266
|
|
|
6282
6267
|
```
|
|
6283
6268
|
POST v1/charges
|
|
@@ -6285,10 +6270,16 @@ POST v1/charges
|
|
|
6285
6270
|
{
|
|
6286
6271
|
"amount": "10.00",
|
|
6287
6272
|
"currency": "AUD",
|
|
6288
|
-
"token": "
|
|
6273
|
+
"token": "one_time_token",
|
|
6289
6274
|
"customer": {
|
|
6290
6275
|
"payment_source": {
|
|
6291
|
-
"gateway_id": "gateway_id"
|
|
6276
|
+
"gateway_id": "gateway_id",
|
|
6277
|
+
"address_line1": "address_line1",
|
|
6278
|
+
"address_line2": "address_line2",
|
|
6279
|
+
"address_city": "address_city",
|
|
6280
|
+
"address_postcode": "address_postcode",
|
|
6281
|
+
"address_state": "address_state",
|
|
6282
|
+
"address_country": "address_country"
|
|
6292
6283
|
}
|
|
6293
6284
|
},
|
|
6294
6285
|
"shipping": {
|
|
@@ -6303,201 +6294,262 @@ POST v1/charges
|
|
|
6303
6294
|
}
|
|
6304
6295
|
```
|
|
6305
6296
|
|
|
6306
|
-
|
|
6297
|
+
## Customization options for accepted cards
|
|
6307
6298
|
|
|
6308
|
-
|
|
6299
|
+
To improve the experience in the use of the widget, it is allowed to send a flag `unaccepted_card_type` to block the usage of an specific card type. The available options are 'DEBIT' and 'CREDIT'.
|
|
6300
|
+
|
|
6301
|
+
### Example code
|
|
6309
6302
|
|
|
6310
6303
|
```
|
|
6311
|
-
var src = new paydock.
|
|
6312
|
-
"#checkoutButton",
|
|
6304
|
+
var src = new paydock.MastercardSRCClickToPay(
|
|
6313
6305
|
"#checkoutIframe",
|
|
6314
|
-
"
|
|
6315
|
-
"
|
|
6306
|
+
"service_id",
|
|
6307
|
+
"paydock_public_key",
|
|
6316
6308
|
{
|
|
6317
|
-
|
|
6318
|
-
"email": "test@email.com",
|
|
6319
|
-
"first_name": "Name",
|
|
6320
|
-
"last_name": "Surname",
|
|
6321
|
-
"phone": {
|
|
6322
|
-
"country_code": "1",
|
|
6323
|
-
"phone": "2124567890"
|
|
6324
|
-
},
|
|
6325
|
-
"payment_source": {
|
|
6326
|
-
"address_line1": "Line 1",
|
|
6327
|
-
"address_line2": "Line 2",
|
|
6328
|
-
"address_city": "Miami",
|
|
6329
|
-
"address_postcode": "33126",
|
|
6330
|
-
"address_state": "FL",
|
|
6331
|
-
"address_country": "US"
|
|
6332
|
-
}
|
|
6333
|
-
}
|
|
6309
|
+
unaccepted_card_type: 'DEBIT'
|
|
6334
6310
|
},
|
|
6335
6311
|
);
|
|
6312
|
+
|
|
6336
6313
|
```
|
|
6337
6314
|
|
|
6338
|
-
## Personalization
|
|
6315
|
+
## Styling Personalization
|
|
6339
6316
|
|
|
6340
|
-
To improve the experience in the use of the widget, it is allowed to send props that customize the UI.
|
|
6317
|
+
To improve the experience in the use of the widget, it is allowed to send props that customize the UI look and feel.
|
|
6341
6318
|
|
|
6342
6319
|
### Example code
|
|
6343
6320
|
|
|
6344
6321
|
```
|
|
6345
|
-
var src = new paydock.
|
|
6346
|
-
"#checkoutButton",
|
|
6322
|
+
var src = new paydock.MastercardSRCClickToPay(
|
|
6347
6323
|
"#checkoutIframe",
|
|
6348
|
-
"
|
|
6324
|
+
"service_id",
|
|
6349
6325
|
"paydock_public_key",
|
|
6326
|
+
{},
|
|
6350
6327
|
);
|
|
6351
6328
|
|
|
6352
|
-
|
|
6353
|
-
|
|
6329
|
+
src.setStyles({
|
|
6330
|
+
enable_src_popup: true,
|
|
6331
|
+
primary_button_color: 'red',
|
|
6332
|
+
secondary_button_color: 'red',
|
|
6333
|
+
primary_button_text_color: 'red',
|
|
6334
|
+
secondary_button_text_color: 'red',
|
|
6335
|
+
font_family: 'Arial',
|
|
6336
|
+
});
|
|
6354
6337
|
```
|
|
6355
|
-
## Event and Values
|
|
6356
|
-
|
|
6357
|
-
| Event Value | Type | Description |
|
|
6358
|
-
| ------------------- | ------------------- | -------------------------------------------------------------- |
|
|
6359
|
-
| primary_color | <code>string</code> | HEX color for the principal buttons, example : #32a852 |
|
|
6360
|
-
| button_text_color | <code>string</code> | HEX color for the text of the buttons, example : #32a852|
|
|
6361
|
-
| font_family | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family)|
|
|
6362
|
-
| card_schemes | <code>[string] - array of string</code> | Possible values "visa", "mastercard", "amex" and "discover" - Default show all logos
|
|
6363
6338
|
|
|
6364
6339
|
## Classes
|
|
6365
6340
|
|
|
6366
6341
|
<dl>
|
|
6367
|
-
<dt><a href="#
|
|
6368
|
-
<dd><p>Class
|
|
6342
|
+
<dt><a href="#MastercardSRCClickToPay">MastercardSRCClickToPay</a> ⇐ <code>SRC</code></dt>
|
|
6343
|
+
<dd><p>Class MastercardSRCClickToPay include methods for interacting with the MastercardSRC checkout and Manual Card option</p>
|
|
6369
6344
|
</dd>
|
|
6370
6345
|
</dl>
|
|
6371
6346
|
|
|
6372
6347
|
## Interfaces
|
|
6373
6348
|
|
|
6374
6349
|
<dl>
|
|
6375
|
-
<dt><a href="#
|
|
6376
|
-
<dd><p>Interface of data used for the
|
|
6350
|
+
<dt><a href="#IMastercardSRCMeta">IMastercardSRCMeta</a> : <code>object</code></dt>
|
|
6351
|
+
<dd><p>Interface of data used for the Mastercard Checkout. For further information refer to <a href="https://developer.mastercard.com/unified-checkout-solutions/documentation/sdk-reference/init">the documentation</a>.</p>
|
|
6352
|
+
</dd>
|
|
6353
|
+
<dt><a href="#EventData">EventData</a> : <code>object</code></dt>
|
|
6354
|
+
<dd><p>Interface for data returned in callbacks</p>
|
|
6355
|
+
</dd>
|
|
6356
|
+
<dt><a href="#EventDataCheckoutCompletedData">EventDataCheckoutCompletedData</a> : <code>object</code></dt>
|
|
6357
|
+
<dd><p>Event data returned for checkoutCompleted callback, holding the One Time Token and the flow type completed.
|
|
6358
|
+
When the flow type is src, masked checkoutData available is also returned</p>
|
|
6359
|
+
</dd>
|
|
6360
|
+
<dt><a href="#IStyles">IStyles</a> : <code>object</code></dt>
|
|
6361
|
+
<dd><p>Interface for style configs inyected to the SRC checkout</p>
|
|
6377
6362
|
</dd>
|
|
6378
6363
|
</dl>
|
|
6379
6364
|
|
|
6380
|
-
<a name="
|
|
6365
|
+
<a name="IMastercardSRCMeta" id="IMastercardSRCMeta" href="#IMastercardSRCMeta"> </a>
|
|
6381
6366
|
|
|
6382
|
-
##
|
|
6383
|
-
Interface of data used for the
|
|
6367
|
+
## IMastercardSRCMeta : <code>object</code>
|
|
6368
|
+
Interface of data used for the Mastercard Checkout. For further information refer to [the documentation](https://developer.mastercard.com/unified-checkout-solutions/documentation/sdk-reference/init).
|
|
6384
6369
|
|
|
6385
6370
|
**Kind**: global interface
|
|
6386
6371
|
|
|
6387
6372
|
| Param | Type | Description |
|
|
6388
6373
|
| --- | --- | --- |
|
|
6389
|
-
| [
|
|
6374
|
+
| [disable_summary_screen] | <code>boolean</code> | Boolean flag that controls if a final summary screen is presented in the checkout flow. |
|
|
6390
6375
|
| [dpa_data] | <code>object</code> | Object where the DPA creation data is stored. |
|
|
6391
|
-
| [dpa_data.dpa_presentation_name] | <code>string</code> | Name in which the DPA is presented
|
|
6376
|
+
| [dpa_data.dpa_presentation_name] | <code>string</code> | Name in which the DPA is presented. |
|
|
6392
6377
|
| [dpa_data.dpa_uri] | <code>string</code> | Used for indicating the DPA URI. |
|
|
6393
|
-
| [
|
|
6378
|
+
| [dpa_data.dpa_address] | <code>string</code> | Address associated with the DPA. |
|
|
6379
|
+
| [dpa_data.dpa_email_address] | <code>string</code> | Email address for DPA communication. |
|
|
6380
|
+
| [dpa_data.dpa_phone_number] | <code>object</code> | Phone number structure for DPA communication. |
|
|
6381
|
+
| [dpa_data.dpa_phone_number.country_code] | <code>string</code> | The country code of the phone number. |
|
|
6382
|
+
| [dpa_data.dpa_phone_number.phone_number] | <code>string</code> | The phone number part of the phone number. |
|
|
6383
|
+
| [dpa_data.dpa_logo_uri] | <code>string</code> | URI for the DPA logo. |
|
|
6384
|
+
| [dpa_data.dpa_supported_email_address] | <code>string</code> | Supported email address for DPA support. |
|
|
6385
|
+
| [dpa_data.dpa_supported_phone_number] | <code>object</code> | Supported phone number for DPA support. |
|
|
6386
|
+
| [dpa_data.dpa_supported_phone_number.country_code] | <code>string</code> | The country code of the phone number. |
|
|
6387
|
+
| [dpa_data.dpa_supported_phone_number.phone_number] | <code>string</code> | The phone number part of the phone number. |
|
|
6388
|
+
| [dpa_data.dpa_support_uri] | <code>string</code> | URI for DPA support. |
|
|
6389
|
+
| [dpa_data.application_type] | <code>string</code> | Application type, either 'WEB_BROWSER' or 'MOBILE_APP'. |
|
|
6390
|
+
| [co_brand_names] | <code>Array.<string></code> | List of co-brand names associated with the SRC experience. |
|
|
6391
|
+
| [checkout_experience] | <code>string</code> | Checkout experience type, either 'WITHIN_CHECKOUT' or 'PAYMENT_SETTINGS'. |
|
|
6392
|
+
| [services] | <code>string</code> | Services offered, such as 'INLINE_CHECKOUT' or 'INLINE_INSTALLMENTS'. |
|
|
6393
|
+
| [dpa_transaction_options] | <code>object</code> | Object that stores options for creating a transaction with DPA. |
|
|
6394
6394
|
| [dpa_transaction_options.dpa_locale] | <code>string</code> | DPA’s preferred locale, example en_US. |
|
|
6395
|
-
| [dpa_transaction_options.dpa_accepted_billing_countries] | <code>Array
|
|
6396
|
-
| [dpa_transaction_options.
|
|
6397
|
-
| [dpa_transaction_options.
|
|
6398
|
-
| [dpa_transaction_options.
|
|
6399
|
-
| [dpa_transaction_options.
|
|
6400
|
-
| [dpa_transaction_options.
|
|
6401
|
-
| [dpa_transaction_options.
|
|
6402
|
-
| [dpa_transaction_options.
|
|
6403
|
-
| [dpa_transaction_options.
|
|
6404
|
-
| [dpa_transaction_options.
|
|
6405
|
-
| [dpa_transaction_options.
|
|
6406
|
-
| [dpa_transaction_options.
|
|
6407
|
-
| [dpa_transaction_options.
|
|
6408
|
-
| [dpa_transaction_options.
|
|
6409
|
-
| [dpa_transaction_options.
|
|
6410
|
-
| [dpa_transaction_options.
|
|
6411
|
-
| [dpa_transaction_options.transaction_amount.transaction_amount] | <code>number</code> | Used to indicate the amount of the transaction. |
|
|
6412
|
-
| [dpa_transaction_options.transaction_amount.transaction_currency_code] | <code>string</code> | Used to indicate the currency code of the transaction. 3 letter ISO code format. |
|
|
6413
|
-
| [dpa_transaction_options.merchant_order_id] | <code>string</code> | Used to indicate the merchants order Id. |
|
|
6414
|
-
| [dpa_transaction_options.merchant_category_code] | <code>string</code> | Used to indicate the merchants category code. |
|
|
6415
|
-
| [dpa_transaction_options.merchant_country_code] | <code>string</code> | Used to indicate the merchants country code. 2 letter ISO code format. |
|
|
6395
|
+
| [dpa_transaction_options.dpa_accepted_billing_countries] | <code>Array.<string></code> | List of accepted billing countries for DPA in ISO 3166-1 alpha-2 format. |
|
|
6396
|
+
| [dpa_transaction_options.dpa_billing_preference] | <code>string</code> | Billing preferences for DPA, options are 'FULL', 'POSTAL_COUNTRY', 'NONE'. |
|
|
6397
|
+
| [dpa_transaction_options.payment_options] | <code>Array.<object></code> | Payment options included in the transaction. |
|
|
6398
|
+
| [dpa_transaction_options.payment_options.dynamic_data_type] | <code>string</code> | Dynamic data types. |
|
|
6399
|
+
| [dpa_transaction_options.order_type] | <code>string</code> | Type of the order, options are 'SPLIT_SHIPMENT', 'PREFERRED_CARD'. |
|
|
6400
|
+
| [dpa_transaction_options.three_ds_preference] | <code>string</code> | Preference for 3DS usage in the transaction. |
|
|
6401
|
+
| [dpa_transaction_options.confirm_payment] | <code>boolean</code> | Indicates if payment confirmation is required. |
|
|
6402
|
+
| [dpa_transaction_options.consumer_name_requested] | <code>boolean</code> | Indicates if consumer name is requested. |
|
|
6403
|
+
| [dpa_transaction_options.consumer_email_address_requested] | <code>boolean</code> | Indicates if consumer email address is requested. |
|
|
6404
|
+
| [dpa_transaction_options.consumer_phone_number_requested] | <code>boolean</code> | Indicates if consumer phone number is requested. |
|
|
6405
|
+
| [dpa_transaction_options.transaction_amount] | <code>object</code> | Details of the transaction amount. |
|
|
6406
|
+
| [dpa_transaction_options.transaction_amount.transaction_amount] | <code>number</code> | Amount of the transaction. |
|
|
6407
|
+
| [dpa_transaction_options.transaction_amount.transaction_currency_code] | <code>string</code> | Currency code of the transaction in 3 letter ISO code format. |
|
|
6408
|
+
| [dpa_transaction_options.merchant_order_id] | <code>string</code> | Merchant's order ID. |
|
|
6409
|
+
| [dpa_transaction_options.merchant_category_code] | <code>string</code> | Merchant's category code. |
|
|
6410
|
+
| [dpa_transaction_options.merchant_country_code] | <code>string</code> | Merchant's country code in ISO 3166-1 alpha-2 format. |
|
|
6416
6411
|
| [customer] | <code>object</code> | Object where the customer data is stored to prefill in the checkout. |
|
|
6417
6412
|
| [customer.email] | <code>string</code> | Customer email. |
|
|
6418
6413
|
| [customer.first_name] | <code>string</code> | Customer first name. |
|
|
6419
6414
|
| [customer.last_name] | <code>string</code> | Customer last name. |
|
|
6420
6415
|
| [customer.phone] | <code>object</code> | Object where the customer phone is stored. |
|
|
6421
|
-
| [customer.phone.country_code] | <code>string</code> | Customer phone country code (example "1" for US). |
|
|
6416
|
+
| [customer.phone.country_code] | <code>string</code> | Customer phone country code (example "1" for US). // TODO: Confirm if it can be removed! |
|
|
6422
6417
|
| [customer.phone.phone] | <code>string</code> | Customer phone number. |
|
|
6423
|
-
| [
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6418
|
+
| [unaccepted_card_type] | <code>string</code> | Used to block a specific card type. Options are 'CREDIT', 'DEBIT'. |
|
|
6419
|
+
|
|
6420
|
+
<a name="EventData" id="EventData" href="#EventData"> </a>
|
|
6421
|
+
|
|
6422
|
+
## EventData : <code>object</code>
|
|
6423
|
+
Interface for data returned in callbacks
|
|
6424
|
+
|
|
6425
|
+
**Kind**: global interface
|
|
6426
|
+
|
|
6427
|
+
| Param | Type | Description |
|
|
6428
|
+
| --- | --- | --- |
|
|
6429
|
+
| type | [<code>EVENT\_DATA\_TYPE</code>](#EVENT_DATA_TYPE) | Event type of type [EVENT_DATA_TYPE](#EVENT_DATA_TYPE) |
|
|
6430
|
+
| data | <code>string</code> \| [<code>EventDataCheckoutCompletedData</code>](#EventDataCheckoutCompletedData) | optional data returning a string for checkoutError event or [EventDataCheckoutCompletedData](#EventDataCheckoutCompletedData) for checkoutCompleted |
|
|
6431
|
+
|
|
6432
|
+
<a name="EventDataCheckoutCompletedData" id="EventDataCheckoutCompletedData" href="#EventDataCheckoutCompletedData"> </a>
|
|
6433
|
+
|
|
6434
|
+
## EventDataCheckoutCompletedData : <code>object</code>
|
|
6435
|
+
Event data returned for checkoutCompleted callback, holding the One Time Token and the flow type completed.
|
|
6436
|
+
When the flow type is src, masked checkoutData available is also returned
|
|
6437
|
+
|
|
6438
|
+
**Kind**: global interface
|
|
6439
|
+
|
|
6440
|
+
| Param | Type | Description |
|
|
6441
|
+
| --- | --- | --- |
|
|
6442
|
+
| type | <code>string</code> | type of the checkout, can be `src` or `manual`. |
|
|
6443
|
+
| token | <code>string</code> | one time token value. |
|
|
6444
|
+
| [checkoutData] | <code>object</code> | Optional checkout data related to the checkout information. Only available on src flow. |
|
|
6445
|
+
| [checkoutData.card_number_bin] | <code>string</code> | The BIN of the card used for the transaction. |
|
|
6446
|
+
| [checkoutData.card_number_last4] | <code>string</code> | The last four digits of the card number. |
|
|
6447
|
+
| [checkoutData.card_scheme] | <code>string</code> | The card scheme. Values: visa, mastercard, amex, diners, discover. |
|
|
6448
|
+
| [checkoutData.card_type] | <code>string</code> | The type of card. Values: credit, debit, prepaid, combo, flex. |
|
|
6449
|
+
| [checkoutData.address_line1] | <code>string</code> | Address line 1 for billing address. |
|
|
6450
|
+
| [checkoutData.address_line2] | <code>string</code> | Address line 2 for billing address. |
|
|
6451
|
+
| [checkoutData.address_line3] | <code>string</code> | Address line 3 for billing address. |
|
|
6452
|
+
| [checkoutData.address_city] | <code>string</code> | City for billing address. |
|
|
6453
|
+
| [checkoutData.address_postcode] | <code>string</code> | Postal code for billing address. |
|
|
6454
|
+
| [checkoutData.address_state] | <code>string</code> | State or province for billing address. |
|
|
6455
|
+
| [checkoutData.address_country] | <code>string</code> | Country for billing address. |
|
|
6456
|
+
| [checkoutData.shipping] | <code>object</code> | Optional shipping information. |
|
|
6457
|
+
| [checkoutData.shipping.address_line1] | <code>string</code> | Address line 1 for shipping address. |
|
|
6458
|
+
| [checkoutData.shipping.address_line2] | <code>string</code> | Address line 2 for shipping address. |
|
|
6459
|
+
| [checkoutData.shipping.address_line3] | <code>string</code> | Address line 3 for shipping address. |
|
|
6460
|
+
| [checkoutData.shipping.address_city] | <code>string</code> | City for shipping address. |
|
|
6461
|
+
| [checkoutData.shipping.address_postcode] | <code>string</code> | Postal code for shipping address. |
|
|
6462
|
+
| [checkoutData.shipping.address_state] | <code>string</code> | State or province for shipping address. |
|
|
6463
|
+
| [checkoutData.shipping.address_country] | <code>string</code> | Country for shipping address. |
|
|
6464
|
+
|
|
6465
|
+
<a name="IStyles" id="IStyles" href="#IStyles"> </a>
|
|
6466
|
+
|
|
6467
|
+
## IStyles : <code>object</code>
|
|
6468
|
+
Interface for style configs inyected to the SRC checkout
|
|
6469
|
+
|
|
6470
|
+
**Kind**: global interface
|
|
6430
6471
|
|
|
6431
|
-
|
|
6472
|
+
| Param | Type | Description |
|
|
6473
|
+
| --- | --- | --- |
|
|
6474
|
+
| [primary_button_color] | <code>string</code> | Color Code for primary button. |
|
|
6475
|
+
| [primary_button_text_color] | <code>string</code> | Color Code for primary button text. |
|
|
6476
|
+
| [secondary_button_color] | <code>string</code> | Color Code for secondary button. |
|
|
6477
|
+
| [secondary_button_text_color] | <code>string</code> | Color Code for secondary button text. |
|
|
6478
|
+
| [font_family] | <code>string</code> | Font family to be used. |
|
|
6479
|
+
| [enable_src_popup] | <code>boolean</code> | Boolean flag to make the SRC checkout show in a popup window instead of embedded in iframe. |
|
|
6432
6480
|
|
|
6433
|
-
|
|
6434
|
-
|
|
6481
|
+
<a name="MastercardSRCClickToPay" id="MastercardSRCClickToPay" href="#MastercardSRCClickToPay"> </a>
|
|
6482
|
+
|
|
6483
|
+
## MastercardSRCClickToPay ⇐ <code>SRC</code>
|
|
6484
|
+
Class MastercardSRCClickToPay include methods for interacting with the MastercardSRC checkout and Manual Card option
|
|
6435
6485
|
|
|
6436
6486
|
**Kind**: global class
|
|
6487
|
+
**Extends**: <code>SRC</code>
|
|
6437
6488
|
|
|
6438
|
-
* [
|
|
6439
|
-
* [new
|
|
6489
|
+
* [MastercardSRCClickToPay](#MastercardSRCClickToPay) ⇐ <code>SRC</code>
|
|
6490
|
+
* [new MastercardSRCClickToPay(iframe_selector, service_id, public_key_or_access_token, meta)](#new_MastercardSRCClickToPay_new)
|
|
6491
|
+
* [.load()](#MastercardSRCClickToPay+load)
|
|
6440
6492
|
* [.setStyles(fields)](#SRC+setStyles)
|
|
6441
|
-
* [.load()](#SRC+load)
|
|
6442
6493
|
* [.setEnv(env, [alias])](#SRC+setEnv)
|
|
6443
6494
|
* [.getEnv()](#SRC+getEnv)
|
|
6444
6495
|
* [.on(eventName, [cb])](#SRC+on) ⇒ <code>Promise.<any></code> \| <code>void</code>
|
|
6445
|
-
* [.hideButton([saveSize])](#SRC+hideButton)
|
|
6446
|
-
* [.showButton()](#SRC+showButton)
|
|
6447
6496
|
* [.hideCheckout([saveSize])](#SRC+hideCheckout)
|
|
6448
6497
|
* [.showCheckout()](#SRC+showCheckout)
|
|
6449
6498
|
* [.reload()](#SRC+reload)
|
|
6450
6499
|
* [.useAutoResize()](#SRC+useAutoResize)
|
|
6451
6500
|
|
|
6452
|
-
<a name="
|
|
6501
|
+
<a name="new_MastercardSRCClickToPay_new" id="new_MastercardSRCClickToPay_new" href="#new_MastercardSRCClickToPay_new"> </a>
|
|
6453
6502
|
|
|
6454
|
-
### new
|
|
6503
|
+
### new MastercardSRCClickToPay(iframe_selector, service_id, public_key_or_access_token, meta)
|
|
6455
6504
|
|
|
6456
6505
|
| Param | Type | Description |
|
|
6457
6506
|
| --- | --- | --- |
|
|
6458
|
-
| button_selector | <code>string</code> | Selector of html element. Container for SRC checkout button. |
|
|
6459
6507
|
| iframe_selector | <code>string</code> | Selector of html element. Container for SRC checkout iFrame. |
|
|
6460
6508
|
| service_id | <code>string</code> | Card Scheme Service ID |
|
|
6461
6509
|
| public_key_or_access_token | <code>string</code> | Paydock public key or Access Token |
|
|
6462
|
-
| meta | [<code>
|
|
6510
|
+
| meta | [<code>IMastercardSRCMeta</code>](#IMastercardSRCMeta) | Data that configures the SRC checkout |
|
|
6463
6511
|
|
|
6464
6512
|
**Example**
|
|
6465
6513
|
```js
|
|
6466
|
-
var
|
|
6514
|
+
var mastercardSRC = new MastercardSRCClickToPay('#checkoutIframe', 'service_id', 'public_key', {});
|
|
6467
6515
|
```
|
|
6516
|
+
<a name="MastercardSRCClickToPay+load" id="MastercardSRCClickToPay+load" href="#MastercardSRCClickToPay+load"> </a>
|
|
6517
|
+
|
|
6518
|
+
### mastercardSRCClickToPay.load()
|
|
6519
|
+
The final method after configuring the SRC to start the load process of SRC checkout
|
|
6520
|
+
|
|
6521
|
+
**Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
|
|
6468
6522
|
<a name="SRC+setStyles" id="SRC+setStyles" href="#SRC+setStyles"> </a>
|
|
6469
6523
|
|
|
6470
|
-
###
|
|
6524
|
+
### mastercardSRCClickToPay.setStyles(fields)
|
|
6471
6525
|
Object contain styles for widget - call before `.load()`.
|
|
6472
6526
|
|
|
6473
|
-
**Kind**: instance method of [<code>
|
|
6527
|
+
**Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
|
|
6528
|
+
**Overrides**: [<code>setStyles</code>](#SRC+setStyles)
|
|
6474
6529
|
|
|
6475
6530
|
| Param | Type | Description |
|
|
6476
6531
|
| --- | --- | --- |
|
|
6477
|
-
| fields | <code>IStyles</code> | name of styles which can be shown in widget [STYLE](STYLE) |
|
|
6532
|
+
| fields | [<code>IStyles</code>](#IStyles) | name of styles which can be shown in widget [STYLE](STYLE) |
|
|
6478
6533
|
|
|
6479
6534
|
**Example**
|
|
6480
6535
|
```js
|
|
6481
6536
|
widget.setStyles({
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6537
|
+
enable_src_popup: true
|
|
6538
|
+
primary_button_color: 'red',
|
|
6539
|
+
secondary_button_color: 'blue',
|
|
6540
|
+
primary_button_text_color: 'white',
|
|
6541
|
+
secondary_button_text_color: 'white',
|
|
6542
|
+
font_family: 'Arial',
|
|
6543
|
+
});
|
|
6487
6544
|
```
|
|
6488
|
-
<a name="SRC+load" id="SRC+load" href="#SRC+load"> </a>
|
|
6489
|
-
|
|
6490
|
-
### srC.load()
|
|
6491
|
-
The final method after configuring the SRC to start the load process of SRC checkout
|
|
6492
|
-
|
|
6493
|
-
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6494
6545
|
<a name="SRC+setEnv" id="SRC+setEnv" href="#SRC+setEnv"> </a>
|
|
6495
6546
|
|
|
6496
|
-
###
|
|
6547
|
+
### mastercardSRCClickToPay.setEnv(env, [alias])
|
|
6497
6548
|
Current method can change environment. By default environment = sandbox.
|
|
6498
6549
|
Also we can change domain alias for this environment. By default domain_alias = paydock.com
|
|
6499
6550
|
|
|
6500
|
-
**Kind**: instance method of [<code>
|
|
6551
|
+
**Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
|
|
6552
|
+
**Overrides**: [<code>setEnv</code>](#SRC+setEnv)
|
|
6501
6553
|
|
|
6502
6554
|
| Param | Type | Description |
|
|
6503
6555
|
| --- | --- | --- |
|
|
@@ -6510,25 +6562,27 @@ SRC.setEnv('production');
|
|
|
6510
6562
|
```
|
|
6511
6563
|
<a name="SRC+getEnv" id="SRC+getEnv" href="#SRC+getEnv"> </a>
|
|
6512
6564
|
|
|
6513
|
-
###
|
|
6565
|
+
### mastercardSRCClickToPay.getEnv()
|
|
6514
6566
|
Method to read the current environment
|
|
6515
6567
|
|
|
6516
|
-
**Kind**: instance method of [<code>
|
|
6568
|
+
**Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
|
|
6569
|
+
**Overrides**: [<code>getEnv</code>](#SRC+getEnv)
|
|
6517
6570
|
**Example**
|
|
6518
6571
|
```js
|
|
6519
6572
|
SRC.getEnv();
|
|
6520
6573
|
```
|
|
6521
6574
|
<a name="SRC+on" id="SRC+on" href="#SRC+on"> </a>
|
|
6522
6575
|
|
|
6523
|
-
###
|
|
6576
|
+
### mastercardSRCClickToPay.on(eventName, [cb]) ⇒ <code>Promise.<any></code> \| <code>void</code>
|
|
6524
6577
|
Listen to events of SRC
|
|
6525
6578
|
|
|
6526
|
-
**Kind**: instance method of [<code>
|
|
6579
|
+
**Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
|
|
6580
|
+
**Overrides**: [<code>on</code>](#SRC+on)
|
|
6527
6581
|
|
|
6528
6582
|
| Param | Type | Description |
|
|
6529
6583
|
| --- | --- | --- |
|
|
6530
6584
|
| eventName | <code>string</code> | Available event names [EVENT](#EVENT) |
|
|
6531
|
-
| [cb] | <code>listener</code> |
|
|
6585
|
+
| [cb] | <code>listener</code> | The callback to handle the event. When available, it will send back data of type [EventData](#EventData) |
|
|
6532
6586
|
|
|
6533
6587
|
**Example**
|
|
6534
6588
|
```js
|
|
@@ -6540,37 +6594,13 @@ SRC.on('checkoutCompleted').then(function (token) {
|
|
|
6540
6594
|
console.log(token);
|
|
6541
6595
|
});
|
|
6542
6596
|
```
|
|
6543
|
-
<a name="SRC+hideButton" id="SRC+hideButton" href="#SRC+hideButton"> </a>
|
|
6544
|
-
|
|
6545
|
-
### srC.hideButton([saveSize])
|
|
6546
|
-
Using this method you can hide button
|
|
6547
|
-
|
|
6548
|
-
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6549
|
-
|
|
6550
|
-
| Param | Type | Default | Description |
|
|
6551
|
-
| --- | --- | --- | --- |
|
|
6552
|
-
| [saveSize] | <code>boolean</code> | <code>false</code> | using this param you can save iframe's size (if applicable) |
|
|
6553
|
-
|
|
6554
|
-
**Example**
|
|
6555
|
-
```js
|
|
6556
|
-
SRC.hideButton();
|
|
6557
|
-
```
|
|
6558
|
-
<a name="SRC+showButton" id="SRC+showButton" href="#SRC+showButton"> </a>
|
|
6559
|
-
|
|
6560
|
-
### srC.showButton()
|
|
6561
|
-
Using this method you can show the SRC button after using hideButton method
|
|
6562
|
-
|
|
6563
|
-
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6564
|
-
**Example**
|
|
6565
|
-
```js
|
|
6566
|
-
SRC.showButton();
|
|
6567
|
-
```
|
|
6568
6597
|
<a name="SRC+hideCheckout" id="SRC+hideCheckout" href="#SRC+hideCheckout"> </a>
|
|
6569
6598
|
|
|
6570
|
-
###
|
|
6599
|
+
### mastercardSRCClickToPay.hideCheckout([saveSize])
|
|
6571
6600
|
Using this method you can hide checkout after load and button click
|
|
6572
6601
|
|
|
6573
|
-
**Kind**: instance method of [<code>
|
|
6602
|
+
**Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
|
|
6603
|
+
**Overrides**: [<code>hideCheckout</code>](#SRC+hideCheckout)
|
|
6574
6604
|
|
|
6575
6605
|
| Param | Type | Default | Description |
|
|
6576
6606
|
| --- | --- | --- | --- |
|
|
@@ -6582,30 +6612,33 @@ SRC.hideCheckout();
|
|
|
6582
6612
|
```
|
|
6583
6613
|
<a name="SRC+showCheckout" id="SRC+showCheckout" href="#SRC+showCheckout"> </a>
|
|
6584
6614
|
|
|
6585
|
-
###
|
|
6615
|
+
### mastercardSRCClickToPay.showCheckout()
|
|
6586
6616
|
Using this method you can show checkout after using hideCheckout method
|
|
6587
6617
|
|
|
6588
|
-
**Kind**: instance method of [<code>
|
|
6618
|
+
**Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
|
|
6619
|
+
**Overrides**: [<code>showCheckout</code>](#SRC+showCheckout)
|
|
6589
6620
|
**Example**
|
|
6590
6621
|
```js
|
|
6591
6622
|
SRC.showCheckout()
|
|
6592
6623
|
```
|
|
6593
6624
|
<a name="SRC+reload" id="SRC+reload" href="#SRC+reload"> </a>
|
|
6594
6625
|
|
|
6595
|
-
###
|
|
6626
|
+
### mastercardSRCClickToPay.reload()
|
|
6596
6627
|
Using this method you can reload the whole checkout
|
|
6597
6628
|
|
|
6598
|
-
**Kind**: instance method of [<code>
|
|
6629
|
+
**Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
|
|
6630
|
+
**Overrides**: [<code>reload</code>](#SRC+reload)
|
|
6599
6631
|
**Example**
|
|
6600
6632
|
```js
|
|
6601
6633
|
SRC.reload()
|
|
6602
6634
|
```
|
|
6603
6635
|
<a name="SRC+useAutoResize" id="SRC+useAutoResize" href="#SRC+useAutoResize"> </a>
|
|
6604
6636
|
|
|
6605
|
-
###
|
|
6637
|
+
### mastercardSRCClickToPay.useAutoResize()
|
|
6606
6638
|
Use this method for resize checkout iFrame according to content height, if applicable
|
|
6607
6639
|
|
|
6608
|
-
**Kind**: instance method of [<code>
|
|
6640
|
+
**Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
|
|
6641
|
+
**Overrides**: [<code>useAutoResize</code>](#SRC+useAutoResize)
|
|
6609
6642
|
**Example**
|
|
6610
6643
|
```js
|
|
6611
6644
|
SRC.useAutoResize();
|
|
@@ -6617,15 +6650,28 @@ List of available event's name in the SRC checkout lifecycle
|
|
|
6617
6650
|
|
|
6618
6651
|
**Kind**: global enum
|
|
6619
6652
|
|
|
6620
|
-
| Param | Type | Default |
|
|
6621
|
-
| --- | --- | --- |
|
|
6622
|
-
|
|
|
6623
|
-
|
|
|
6624
|
-
|
|
|
6625
|
-
|
|
|
6626
|
-
| CHECKOUT_COMPLETED | <code>string</code> | <code>"checkoutCompleted"</code> |
|
|
6627
|
-
| CHECKOUT_ERROR | <code>string</code> | <code>"checkoutError"</code> |
|
|
6653
|
+
| Param | Type | Default | Description |
|
|
6654
|
+
| --- | --- | --- | --- |
|
|
6655
|
+
| IFRAME_LOADED | <code>string</code> | <code>"iframeLoaded"</code> | Initial event sent when IFrame is initially loaded. |
|
|
6656
|
+
| CHECKOUT_READY | <code>string</code> | <code>"checkoutReady"</code> | Event sent when checkout is loaded and ready to be used by customer. Leverage alongside [showCheckout](#SRC+showCheckout) and [hideCheckout](#SRC+hideCheckout). |
|
|
6657
|
+
| CHECKOUT_POPUP_OPEN | <code>string</code> | <code>"checkoutPopupOpen"</code> | Event sent when SRC Checkout flow is started, regardless of embedded or windowed mode. |
|
|
6658
|
+
| CHECKOUT_POPUP_CLOSE | <code>string</code> | <code>"checkoutPopupClose"</code> | Event sent when SRC Checkout flow is closed, regardless of embedded or windowed mode. |
|
|
6659
|
+
| CHECKOUT_COMPLETED | <code>string</code> | <code>"checkoutCompleted"</code> | Event sent on successful checkout by customer. Check [data](#EventDataCheckoutCompletedData) for more information. |
|
|
6660
|
+
| CHECKOUT_ERROR | <code>string</code> | <code>"checkoutError"</code> | Event sent on error checkout by customer. Check [data](#EventData) for more information. |
|
|
6661
|
+
|
|
6662
|
+
<a name="EVENT_DATA_TYPE" id="EVENT_DATA_TYPE" href="#EVENT_DATA_TYPE"> </a>
|
|
6663
|
+
|
|
6664
|
+
## EVENT\_DATA\_TYPE : <code>enum</code>
|
|
6665
|
+
List of available event data types
|
|
6666
|
+
|
|
6667
|
+
**Kind**: global enum
|
|
6668
|
+
|
|
6669
|
+
| Param | Type | Default | Description |
|
|
6670
|
+
| --- | --- | --- | --- |
|
|
6671
|
+
| CRITICAL_ERROR | <code>string</code> | <code>"CriticalError"</code> | in this error scenario the checkout is understood to be in a non-recoverable state and should be closed by the merchant and give alternate payment options to the user |
|
|
6672
|
+
| USER_ERROR | <code>string</code> | <code>"UserError"</code> | in this error scenario the error in likely a user input error and the checkout is in a recoverable state, so the user will be kept within the checkout and can retry the flow |
|
|
6673
|
+
| SUCCESS | <code>string</code> | <code>"Success"</code> | |
|
|
6628
6674
|
|
|
6629
6675
|
|
|
6630
6676
|
## License
|
|
6631
|
-
Copyright (c)
|
|
6677
|
+
Copyright (c) 2024 paydock
|