@paydock/client-sdk 1.87.3 → 1.89.27-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 +280 -16
- package/bundles/widget.umd.js +1 -1
- package/bundles/widget.umd.min.js +1 -1
- package/examples/html-widget/actions.html +2 -2
- package/examples/html-widget/events.html +2 -2
- package/examples/html-widget/form.html +1 -1
- package/examples/html-widget/html-styles.html +2 -2
- package/examples/html-widget/insert-input.html +2 -2
- package/examples/html-widget/optional-settings.html +2 -2
- package/examples/html-widget/simple.html +2 -2
- package/examples/html-widget/styles.html +2 -2
- package/examples/multi-html-widget/extend.html +2 -2
- package/examples/multi-html-widget/simple.html +2 -2
- package/lib/configs/sdk.js +1 -1
- package/package.json +1 -1
- package/slate.md +14 -16
package/README.md
CHANGED
|
@@ -146,7 +146,7 @@ Then write only need 2 lines of code in js to initialize widget
|
|
|
146
146
|
<div id="widget"></div>
|
|
147
147
|
<input name="payment_source_token" id="payment_source_token" type="hidden">
|
|
148
148
|
</form>
|
|
149
|
-
<script src="https://
|
|
149
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
150
150
|
<script>
|
|
151
151
|
var widget = new paydock.HtmlWidget('#widget', 'publicKey');
|
|
152
152
|
widget.onFinishInsert('input[name="payment_source_token"]', 'payment_source');
|
|
@@ -4529,7 +4529,7 @@ Then write only need 2 lines of code in js to make request
|
|
|
4529
4529
|
<style></style>
|
|
4530
4530
|
</head>
|
|
4531
4531
|
<body>
|
|
4532
|
-
<script src="https://
|
|
4532
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
4533
4533
|
<script>
|
|
4534
4534
|
(async function() {
|
|
4535
4535
|
var response = await new Api('publicKey').setEnv('env').charge().preAuth({
|
|
@@ -4543,8 +4543,6 @@ Then write only need 2 lines of code in js to make request
|
|
|
4543
4543
|
</html>
|
|
4544
4544
|
```
|
|
4545
4545
|
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
4546
|
## Canvas3ds
|
|
4549
4547
|
You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#canvas3d)
|
|
4550
4548
|
|
|
@@ -4591,7 +4589,7 @@ Then write only need 2 lines of code in js to initialize widget
|
|
|
4591
4589
|
</head>
|
|
4592
4590
|
<body>
|
|
4593
4591
|
<div id="widget"></div>
|
|
4594
|
-
<script src="https://
|
|
4592
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js"></script>
|
|
4595
4593
|
<script>
|
|
4596
4594
|
var canvas3ds = new paydock.Canvas3ds('#widget', 'token');
|
|
4597
4595
|
canvas3ds.load();
|
|
@@ -4647,7 +4645,7 @@ This example shows how you can use a lot of other methods to settings your form
|
|
|
4647
4645
|
</head>
|
|
4648
4646
|
<body>
|
|
4649
4647
|
<div id="widget3ds"></div>
|
|
4650
|
-
<script src="https://
|
|
4648
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js"></script>
|
|
4651
4649
|
<script>
|
|
4652
4650
|
var canvas3ds = new paydock.Canvas3ds('#widget3ds', 'token');
|
|
4653
4651
|
canvas3ds.on('chargeAuthSuccess', function (data) {
|
|
@@ -4675,7 +4673,7 @@ This example shows how you can use a lot of other methods to settings your form
|
|
|
4675
4673
|
<body>
|
|
4676
4674
|
<div id="widget"></div>
|
|
4677
4675
|
<div id="widget3ds"></div>
|
|
4678
|
-
<script src="https://
|
|
4676
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js"></script>
|
|
4679
4677
|
<script>
|
|
4680
4678
|
(async function () {
|
|
4681
4679
|
var htmlWidget = new paydock.HtmlWidget('#widget', 'publicKey', 'gatewayId');
|
|
@@ -4718,7 +4716,7 @@ After you initialized the standalone 3ds charge via `v1/charges/standalone-3ds`
|
|
|
4718
4716
|
</head>
|
|
4719
4717
|
<body>
|
|
4720
4718
|
<div id="widget3ds"></div>
|
|
4721
|
-
<script src="https://
|
|
4719
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js"></script>
|
|
4722
4720
|
<script>
|
|
4723
4721
|
var canvas3ds = new paydock.Canvas3ds("#widget3ds", "token");
|
|
4724
4722
|
canvas3ds.on("chargeAuthSuccess", function (data) {
|
|
@@ -5130,7 +5128,7 @@ button.setEnv('sandbox');
|
|
|
5130
5128
|
<h2>Payment using PayDock Wallet Button!</h2>
|
|
5131
5129
|
<div id="widget"></div>
|
|
5132
5130
|
</body>
|
|
5133
|
-
<script src="https://
|
|
5131
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
5134
5132
|
<script>
|
|
5135
5133
|
let button = new paydock.WalletButtons(
|
|
5136
5134
|
"#widget",
|
|
@@ -5252,7 +5250,7 @@ _(Required `meta` fields: `amount_label`, `country`. Optional `meta` fields: `wa
|
|
|
5252
5250
|
<h2>Payment using PayDock Wallet Button!</h2>
|
|
5253
5251
|
<div id="widget"></div>
|
|
5254
5252
|
</body>
|
|
5255
|
-
<script src="https://
|
|
5253
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
5256
5254
|
<script>
|
|
5257
5255
|
let button = new paydock.WalletButtons(
|
|
5258
5256
|
"#widget",
|
|
@@ -5287,7 +5285,7 @@ _(Required `meta` fields: - . Optional `meta` fields: `request_shipping`, `pay_l
|
|
|
5287
5285
|
<h2>Payment using PayDock Wallet Button!</h2>
|
|
5288
5286
|
<div id="widget"></div>
|
|
5289
5287
|
</body>
|
|
5290
|
-
<script src="https://
|
|
5288
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
5291
5289
|
<script>
|
|
5292
5290
|
let button = new paydock.WalletButtons(
|
|
5293
5291
|
"#widget",
|
|
@@ -5332,7 +5330,7 @@ _(Required `meta` fields: - . Optional `meta` fields: `request_shipping`, `pay_l
|
|
|
5332
5330
|
<h2>Payment using PayDock Wallet Button!</h2>
|
|
5333
5331
|
<div id="widget"></div>
|
|
5334
5332
|
</body>
|
|
5335
|
-
<script src="https://
|
|
5333
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
5336
5334
|
<script>
|
|
5337
5335
|
let button = new paydock.WalletButtons(
|
|
5338
5336
|
"#widget",
|
|
@@ -5371,7 +5369,7 @@ _(Required `meta` fields: `amount_label`, `country`. Optional `meta` fields: `ra
|
|
|
5371
5369
|
<h2>Payment using PayDock Wallet Button!</h2>
|
|
5372
5370
|
<div id="widget"></div>
|
|
5373
5371
|
</body>
|
|
5374
|
-
<script src="https://
|
|
5372
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
5375
5373
|
<script>
|
|
5376
5374
|
let button = new paydock.WalletButtons(
|
|
5377
5375
|
"#widget",
|
|
@@ -5423,7 +5421,7 @@ Also, for **ApplePay via MPGS** you can initialize the `ApplePayPaymentRequest`
|
|
|
5423
5421
|
<h2>Payment using PayDock Wallet Button!</h2>
|
|
5424
5422
|
<div id="widget"></div>
|
|
5425
5423
|
</body>
|
|
5426
|
-
<script src="https://
|
|
5424
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
5427
5425
|
<script>
|
|
5428
5426
|
let button = new paydock.WalletButtons(
|
|
5429
5427
|
"#widget",
|
|
@@ -5929,7 +5927,7 @@ src.load();
|
|
|
5929
5927
|
<body>
|
|
5930
5928
|
<div id="checkoutButton"></div>
|
|
5931
5929
|
<div id="checkoutIframe"></div>
|
|
5932
|
-
<script src="https://
|
|
5930
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
5933
5931
|
<script>
|
|
5934
5932
|
var src = new paydock.SRC(
|
|
5935
5933
|
"#checkoutButton",
|
|
@@ -6001,7 +5999,7 @@ Here you can see how you can use this methods to customize your checkout experie
|
|
|
6001
5999
|
<body>
|
|
6002
6000
|
<div id="checkoutButton"></div>
|
|
6003
6001
|
<div id="checkoutIframe"></div>
|
|
6004
|
-
<script src="https://
|
|
6002
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
6005
6003
|
<script>
|
|
6006
6004
|
var src = new paydock.SRC(
|
|
6007
6005
|
"#checkoutButton",
|
|
@@ -6129,5 +6127,271 @@ button.setStyles({"primary_color":"#a83232","button_text_color":"#171e9c","font_
|
|
|
6129
6127
|
| font_family | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family)|
|
|
6130
6128
|
| card_schemes | <code>[string] - array of string</code> | Possible values "visa", "mastercard", "amex" and "discover" - Default show all logos
|
|
6131
6129
|
|
|
6130
|
+
## Classes
|
|
6131
|
+
|
|
6132
|
+
<dl>
|
|
6133
|
+
<dt><a href="#SRC">SRC</a></dt>
|
|
6134
|
+
<dd><p>Class SRC include methods for interacting with different secure remote commerce options such as Visa SRC</p>
|
|
6135
|
+
</dd>
|
|
6136
|
+
</dl>
|
|
6137
|
+
|
|
6138
|
+
## Interfaces
|
|
6139
|
+
|
|
6140
|
+
<dl>
|
|
6141
|
+
<dt><a href="#IVisaSRCMeta">IVisaSRCMeta</a> : <code>object</code></dt>
|
|
6142
|
+
<dd><p>Interface of data used for the Visa Checkout.</p>
|
|
6143
|
+
</dd>
|
|
6144
|
+
</dl>
|
|
6145
|
+
|
|
6146
|
+
<a name="IVisaSRCMeta" id="IVisaSRCMeta" href="#IVisaSRCMeta"> </a>
|
|
6147
|
+
|
|
6148
|
+
## IVisaSRCMeta : <code>object</code>
|
|
6149
|
+
Interface of data used for the Visa Checkout.
|
|
6150
|
+
|
|
6151
|
+
**Kind**: global interface
|
|
6152
|
+
|
|
6153
|
+
| Param | Type | Description |
|
|
6154
|
+
| --- | --- | --- |
|
|
6155
|
+
| [srci_transaction_id] | <code>string</code> | Used to identify the SRC Id. |
|
|
6156
|
+
| [dpa_data] | <code>object</code> | Object where the DPA creation data is stored. |
|
|
6157
|
+
| [dpa_data.dpa_presentation_name] | <code>string</code> | Name in which the DPA is presented in. |
|
|
6158
|
+
| [dpa_data.dpa_uri] | <code>string</code> | Used for indicating the DPA URI. |
|
|
6159
|
+
| [dpa_transaction_options] | <code>object</code> | Object that stores options for creating a trasaction with DPA. |
|
|
6160
|
+
| [dpa_transaction_options.dpa_locale] | <code>string</code> | DPA’s preferred locale, example en_US. |
|
|
6161
|
+
| [dpa_transaction_options.dpa_accepted_billing_countries] | <code>Array</code> | Used to indicate list of accepted billing countries for DPA. |
|
|
6162
|
+
| [dpa_transaction_options.dpa_accepted_shipping_countries] | <code>Array</code> | Used to indicate list of accepted shipping countries for DPA. |
|
|
6163
|
+
| [dpa_transaction_options.dpa_billing_preference] | <code>string</code> | Used for listing the enumeration for billing preferences for DPA. Options are 'ALL', 'POSTAL_COUNTRY' and 'NONE'. |
|
|
6164
|
+
| [dpa_transaction_options.dpa_shipping_preference] | <code>string</code> | Used for listing the enumeration for shipping preferences for DPA. Options are 'ALL', 'POSTAL_COUNTRY' and 'NONE'. |
|
|
6165
|
+
| [dpa_transaction_options.consumer_name_requested] | <code>boolean</code> | Used to check if the name of the consumer is needed. |
|
|
6166
|
+
| [dpa_transaction_options.consumer_email_address_requested] | <code>boolean</code> | Used to check if the email of the consumer is needed. |
|
|
6167
|
+
| [dpa_transaction_options.consumer_phone_number_requested] | <code>boolean</code> | Used to check if the phone number of the consumer is needed. |
|
|
6168
|
+
| [dpa_transaction_options.payment_options] | <code>object</code> | Object used to check the payment options that are included. |
|
|
6169
|
+
| [dpa_transaction_options.payment_options.dpa_dynamic_data_ttl_minutes] | <code>number</code> | The minimum requested validity period for the transaction credentials. |
|
|
6170
|
+
| [dpa_transaction_options.payment_options.dynamic_data_type] | <code>string</code> | Used for listing the enumeration for dynamic data types. Options are 'TAVV' and 'DTVV'. |
|
|
6171
|
+
| [dpa_transaction_options.payment_options.dpa_pan_requested] | <code>boolean</code> | Used to check if PAN number was requested. |
|
|
6172
|
+
| [dpa_transaction_options.review_action] | <code>string</code> | Used for listing the enumeration of review actions. Options are 'pay' and 'continue'. |
|
|
6173
|
+
| [dpa_transaction_options.checkout_description] | <code>string</code> | Used for indicating the description of the checkout. |
|
|
6174
|
+
| [dpa_transaction_options.transaction_type] | <code>string</code> | Used for listing the enumeration of the type of the transaction. 'PURCHASE', 'BILL_PAYMENT' and 'MONEY_TRANSFER' |
|
|
6175
|
+
| [dpa_transaction_options.order_type] | <code>string</code> | Used for listing the enumeration of the type of the order. Options are 'REAUTHORIZATION', 'RECURRING' and 'INSTALLMENT'. |
|
|
6176
|
+
| [dpa_transaction_options.transaction_amount] | <code>object</code> | Object used to describe the details of the transaction. |
|
|
6177
|
+
| [dpa_transaction_options.transaction_amount.transaction_amount] | <code>number</code> | Used to indicate the amount of the transaction. |
|
|
6178
|
+
| [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. |
|
|
6179
|
+
| [dpa_transaction_options.merchant_order_id] | <code>string</code> | Used to indicate the merchants order Id. |
|
|
6180
|
+
| [dpa_transaction_options.merchant_category_code] | <code>string</code> | Used to indicate the merchants category code. |
|
|
6181
|
+
| [dpa_transaction_options.merchant_country_code] | <code>string</code> | Used to indicate the merchants country code. 2 letter ISO code format. |
|
|
6182
|
+
| [customer] | <code>object</code> | Object where the customer data is stored to prefill in the checkout. |
|
|
6183
|
+
| [customer.email] | <code>string</code> | Customer email. |
|
|
6184
|
+
| [customer.first_name] | <code>string</code> | Customer first name. |
|
|
6185
|
+
| [customer.last_name] | <code>string</code> | Customer last name. |
|
|
6186
|
+
| [customer.phone] | <code>object</code> | Object where the customer phone is stored. |
|
|
6187
|
+
| [customer.phone.country_code] | <code>string</code> | Customer phone country code (example "1" for US). |
|
|
6188
|
+
| [customer.phone.phone] | <code>string</code> | Customer phone number. |
|
|
6189
|
+
| [customer.payment_source] | <code>object</code> | Object where the customer billing address data is stored. |
|
|
6190
|
+
| [customer.payment_source.address_line1] | <code>string</code> | Customer billing address line 1. |
|
|
6191
|
+
| [customer.payment_source.address_line2] | <code>string</code> | Customer billing address line 2. |
|
|
6192
|
+
| [customer.payment_source.address_city] | <code>string</code> | Customer billing address city. |
|
|
6193
|
+
| [customer.payment_source.address_postcode] | <code>string</code> | Customer billing address postcode. |
|
|
6194
|
+
| [customer.payment_source.address_state] | <code>string</code> | Customer billing address state code (if applicable for the country, example "FL" for Florida). |
|
|
6195
|
+
| [customer.payment_source.address_country] | <code>string</code> | Customer billing address country code (example "US"). |
|
|
6196
|
+
|
|
6197
|
+
<a name="SRC" id="SRC" href="#SRC"> </a>
|
|
6198
|
+
|
|
6199
|
+
## SRC
|
|
6200
|
+
Class SRC include methods for interacting with different secure remote commerce options such as Visa SRC
|
|
6201
|
+
|
|
6202
|
+
**Kind**: global class
|
|
6203
|
+
|
|
6204
|
+
* [SRC](#SRC)
|
|
6205
|
+
* [new exports.SRC(button_selector, iframe_selector, service_id, public_key_or_access_token, meta)](#new_SRC_new)
|
|
6206
|
+
* [.setStyles(fields)](#SRC+setStyles)
|
|
6207
|
+
* [.load()](#SRC+load)
|
|
6208
|
+
* [.setEnv(env, [alias])](#SRC+setEnv)
|
|
6209
|
+
* [.getEnv()](#SRC+getEnv)
|
|
6210
|
+
* [.on(eventName, [cb])](#SRC+on) ⇒ <code>Promise.<any></code> \| <code>void</code>
|
|
6211
|
+
* [.hideButton([saveSize])](#SRC+hideButton)
|
|
6212
|
+
* [.showButton()](#SRC+showButton)
|
|
6213
|
+
* [.hideCheckout([saveSize])](#SRC+hideCheckout)
|
|
6214
|
+
* [.showCheckout()](#SRC+showCheckout)
|
|
6215
|
+
* [.reload()](#SRC+reload)
|
|
6216
|
+
* [.useAutoResize()](#SRC+useAutoResize)
|
|
6217
|
+
|
|
6218
|
+
<a name="new_SRC_new" id="new_SRC_new" href="#new_SRC_new"> </a>
|
|
6219
|
+
|
|
6220
|
+
### new exports.SRC(button_selector, iframe_selector, service_id, public_key_or_access_token, meta)
|
|
6221
|
+
|
|
6222
|
+
| Param | Type | Description |
|
|
6223
|
+
| --- | --- | --- |
|
|
6224
|
+
| button_selector | <code>string</code> | Selector of html element. Container for SRC checkout button. |
|
|
6225
|
+
| iframe_selector | <code>string</code> | Selector of html element. Container for SRC checkout iFrame. |
|
|
6226
|
+
| service_id | <code>string</code> | Card Scheme Service ID |
|
|
6227
|
+
| public_key_or_access_token | <code>string</code> | Paydock public key or Access Token |
|
|
6228
|
+
| meta | [<code>IVisaSRCMeta</code>](#IVisaSRCMeta) | Data that configures the SRC checkout |
|
|
6229
|
+
|
|
6230
|
+
**Example**
|
|
6231
|
+
```js
|
|
6232
|
+
var SRC = new SRC('#checkoutButton', '#checkoutIframe', 'service_id', 'public_key', {});
|
|
6233
|
+
```
|
|
6234
|
+
<a name="SRC+setStyles" id="SRC+setStyles" href="#SRC+setStyles"> </a>
|
|
6235
|
+
|
|
6236
|
+
### srC.setStyles(fields)
|
|
6237
|
+
Object contain styles for widget - call before `.load()`.
|
|
6238
|
+
|
|
6239
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6240
|
+
|
|
6241
|
+
| Param | Type | Description |
|
|
6242
|
+
| --- | --- | --- |
|
|
6243
|
+
| fields | <code>IStyles</code> | name of styles which can be shown in widget [STYLE](STYLE) |
|
|
6244
|
+
|
|
6245
|
+
**Example**
|
|
6246
|
+
```js
|
|
6247
|
+
widget.setStyles({
|
|
6248
|
+
button_text_color: '#32a852',
|
|
6249
|
+
primary_color: '#32a852',
|
|
6250
|
+
font_family: 'sans-serif',
|
|
6251
|
+
card_schemes: ['visa']
|
|
6252
|
+
});
|
|
6253
|
+
```
|
|
6254
|
+
<a name="SRC+load" id="SRC+load" href="#SRC+load"> </a>
|
|
6255
|
+
|
|
6256
|
+
### srC.load()
|
|
6257
|
+
The final method after configuring the SRC to start the load process of SRC checkout
|
|
6258
|
+
|
|
6259
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6260
|
+
<a name="SRC+setEnv" id="SRC+setEnv" href="#SRC+setEnv"> </a>
|
|
6261
|
+
|
|
6262
|
+
### srC.setEnv(env, [alias])
|
|
6263
|
+
Current method can change environment. By default environment = sandbox.
|
|
6264
|
+
Also we can change domain alias for this environment. By default domain_alias = paydock.com
|
|
6265
|
+
|
|
6266
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6267
|
+
|
|
6268
|
+
| Param | Type | Description |
|
|
6269
|
+
| --- | --- | --- |
|
|
6270
|
+
| env | <code>string</code> | sandbox, production |
|
|
6271
|
+
| [alias] | <code>string</code> | Own domain alias |
|
|
6272
|
+
|
|
6273
|
+
**Example**
|
|
6274
|
+
```js
|
|
6275
|
+
SRC.setEnv('production');
|
|
6276
|
+
```
|
|
6277
|
+
<a name="SRC+getEnv" id="SRC+getEnv" href="#SRC+getEnv"> </a>
|
|
6278
|
+
|
|
6279
|
+
### srC.getEnv()
|
|
6280
|
+
Method to read the current environment
|
|
6281
|
+
|
|
6282
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6283
|
+
**Example**
|
|
6284
|
+
```js
|
|
6285
|
+
SRC.getEnv();
|
|
6286
|
+
```
|
|
6287
|
+
<a name="SRC+on" id="SRC+on" href="#SRC+on"> </a>
|
|
6288
|
+
|
|
6289
|
+
### srC.on(eventName, [cb]) ⇒ <code>Promise.<any></code> \| <code>void</code>
|
|
6290
|
+
Listen to events of SRC
|
|
6291
|
+
|
|
6292
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6293
|
+
|
|
6294
|
+
| Param | Type | Description |
|
|
6295
|
+
| --- | --- | --- |
|
|
6296
|
+
| eventName | <code>string</code> | Available event names [EVENT](#EVENT) |
|
|
6297
|
+
| [cb] | <code>listener</code> | |
|
|
6298
|
+
|
|
6299
|
+
**Example**
|
|
6300
|
+
```js
|
|
6301
|
+
SRC.on('checkoutCompleted', function (token) {
|
|
6302
|
+
console.log(token);
|
|
6303
|
+
});
|
|
6304
|
+
// or
|
|
6305
|
+
SRC.on('checkoutCompleted').then(function (token) {
|
|
6306
|
+
console.log(token);
|
|
6307
|
+
});
|
|
6308
|
+
```
|
|
6309
|
+
<a name="SRC+hideButton" id="SRC+hideButton" href="#SRC+hideButton"> </a>
|
|
6310
|
+
|
|
6311
|
+
### srC.hideButton([saveSize])
|
|
6312
|
+
Using this method you can hide button
|
|
6313
|
+
|
|
6314
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6315
|
+
|
|
6316
|
+
| Param | Type | Default | Description |
|
|
6317
|
+
| --- | --- | --- | --- |
|
|
6318
|
+
| [saveSize] | <code>boolean</code> | <code>false</code> | using this param you can save iframe's size (if applicable) |
|
|
6319
|
+
|
|
6320
|
+
**Example**
|
|
6321
|
+
```js
|
|
6322
|
+
SRC.hideButton();
|
|
6323
|
+
```
|
|
6324
|
+
<a name="SRC+showButton" id="SRC+showButton" href="#SRC+showButton"> </a>
|
|
6325
|
+
|
|
6326
|
+
### srC.showButton()
|
|
6327
|
+
Using this method you can show the SRC button after using hideButton method
|
|
6328
|
+
|
|
6329
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6330
|
+
**Example**
|
|
6331
|
+
```js
|
|
6332
|
+
SRC.showButton();
|
|
6333
|
+
```
|
|
6334
|
+
<a name="SRC+hideCheckout" id="SRC+hideCheckout" href="#SRC+hideCheckout"> </a>
|
|
6335
|
+
|
|
6336
|
+
### srC.hideCheckout([saveSize])
|
|
6337
|
+
Using this method you can hide checkout after load and button click
|
|
6338
|
+
|
|
6339
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6340
|
+
|
|
6341
|
+
| Param | Type | Default | Description |
|
|
6342
|
+
| --- | --- | --- | --- |
|
|
6343
|
+
| [saveSize] | <code>boolean</code> | <code>false</code> | using this param you can save iframe's size (if applicable) |
|
|
6344
|
+
|
|
6345
|
+
**Example**
|
|
6346
|
+
```js
|
|
6347
|
+
SRC.hideCheckout();
|
|
6348
|
+
```
|
|
6349
|
+
<a name="SRC+showCheckout" id="SRC+showCheckout" href="#SRC+showCheckout"> </a>
|
|
6350
|
+
|
|
6351
|
+
### srC.showCheckout()
|
|
6352
|
+
Using this method you can show checkout after using hideCheckout method
|
|
6353
|
+
|
|
6354
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6355
|
+
**Example**
|
|
6356
|
+
```js
|
|
6357
|
+
SRC.showCheckout()
|
|
6358
|
+
```
|
|
6359
|
+
<a name="SRC+reload" id="SRC+reload" href="#SRC+reload"> </a>
|
|
6360
|
+
|
|
6361
|
+
### srC.reload()
|
|
6362
|
+
Using this method you can reload the whole checkout
|
|
6363
|
+
|
|
6364
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6365
|
+
**Example**
|
|
6366
|
+
```js
|
|
6367
|
+
SRC.reload()
|
|
6368
|
+
```
|
|
6369
|
+
<a name="SRC+useAutoResize" id="SRC+useAutoResize" href="#SRC+useAutoResize"> </a>
|
|
6370
|
+
|
|
6371
|
+
### srC.useAutoResize()
|
|
6372
|
+
Use this method for resize checkout iFrame according to content height, if applicable
|
|
6373
|
+
|
|
6374
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6375
|
+
**Example**
|
|
6376
|
+
```js
|
|
6377
|
+
SRC.useAutoResize();
|
|
6378
|
+
```
|
|
6379
|
+
<a name="EVENT" id="EVENT" href="#EVENT"> </a>
|
|
6380
|
+
|
|
6381
|
+
## EVENT : <code>enum</code>
|
|
6382
|
+
List of available event's name in the SRC checkout lifecycle
|
|
6383
|
+
|
|
6384
|
+
**Kind**: global enum
|
|
6385
|
+
|
|
6386
|
+
| Param | Type | Default |
|
|
6387
|
+
| --- | --- | --- |
|
|
6388
|
+
| CHECKOUT_BUTTON_LOADED | <code>string</code> | <code>"checkoutButtonLoaded"</code> |
|
|
6389
|
+
| CHECKOUT_BUTTON_CLICKED | <code>string</code> | <code>"checkoutButtonClicked"</code> |
|
|
6390
|
+
| IFRAME_LOADED | <code>string</code> | <code>"iframeLoaded"</code> |
|
|
6391
|
+
| CHECKOUT_READY | <code>string</code> | <code>"checkoutReady"</code> |
|
|
6392
|
+
| CHECKOUT_COMPLETED | <code>string</code> | <code>"checkoutCompleted"</code> |
|
|
6393
|
+
| CHECKOUT_ERROR | <code>string</code> | <code>"checkoutError"</code> |
|
|
6394
|
+
|
|
6395
|
+
|
|
6132
6396
|
## License
|
|
6133
6397
|
Copyright (c) 2022 paydock
|
package/bundles/widget.umd.js
CHANGED