@paydock/client-sdk 1.106.1 → 1.106.11-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 +68 -58
- package/bundles/widget.umd.js +26 -26
- package/bundles/widget.umd.min.js +1 -1
- package/lib/api/api-service-internal.d.ts +1 -1
- package/lib/api/api-service-internal.js +1 -1
- package/lib/api/api-service-internal.js.map +1 -1
- package/lib/configs/sdk.js +1 -1
- package/lib/secure-remote-commerce/click-to-pay-secure-remote-commerce.d.ts +30 -0
- package/lib/secure-remote-commerce/{mastercard-secure-remote-commerce.js → click-to-pay-secure-remote-commerce.js} +10 -10
- package/lib/secure-remote-commerce/click-to-pay-secure-remote-commerce.js.map +1 -0
- package/lib/secure-remote-commerce/index.d.ts +4 -4
- package/lib/secure-remote-commerce/index.js +4 -4
- package/lib/secure-remote-commerce/index.js.map +1 -1
- package/lib/secure-remote-commerce/interfaces.d.ts +4 -4
- package/lib/secure-remote-commerce/interfaces.js +3 -3
- package/lib/secure-remote-commerce/providers/mastercard-src/index.d.ts +1 -1
- package/lib/secure-remote-commerce/providers/mastercard-src/index.js +1 -1
- package/lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts +4 -4
- package/lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.js +2 -2
- package/lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.js.map +1 -1
- package/lib/secure-remote-commerce/secure-remote-commerce.d.ts +3 -3
- package/lib/secure-remote-commerce/secure-remote-commerce.js +2 -2
- package/lib/secure-remote-commerce/secure-remote-commerce.js.map +1 -1
- package/package.json +1 -1
- package/slate.md +28 -18
- package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts +0 -30
- package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.js.map +0 -1
package/README.md
CHANGED
|
@@ -6381,21 +6381,28 @@ List of available event's name in the wallet button lifecycle
|
|
|
6381
6381
|
| ON_CLICK | <code>string</code> | <code>"onClick"</code> |
|
|
6382
6382
|
|
|
6383
6383
|
|
|
6384
|
-
#
|
|
6384
|
+
# Click To Pay
|
|
6385
|
+
|
|
6385
6386
|
## Overview
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6387
|
+
|
|
6388
|
+
Integrate with Click To Pay using Paydock's Click To Pay widget.
|
|
6389
|
+
For a full description of the methods and parameters, reference the [README file](https://www.npmjs.com/package/@paydock/client-sdk#ClickToPay).
|
|
6390
|
+
|
|
6391
|
+
## Click To Pay simple example
|
|
6392
|
+
|
|
6389
6393
|
The following section provides an example use case and integration for the widget.
|
|
6394
|
+
|
|
6390
6395
|
### Create a Container
|
|
6391
|
-
|
|
6396
|
+
|
|
6397
|
+
To integrate the Click To Pay checkout iFrame, create a container in your HTML code. This container serves as the placeholder for the iFrame.
|
|
6398
|
+
|
|
6392
6399
|
```html
|
|
6393
6400
|
<div id="checkoutIframe"></div>
|
|
6394
6401
|
```
|
|
6395
6402
|
### Initialize the Widget
|
|
6396
6403
|
Use the following code to initialize your widget:
|
|
6397
6404
|
```javascript
|
|
6398
|
-
var src = new paydock.
|
|
6405
|
+
var src = new paydock.ClickToPay(
|
|
6399
6406
|
"#checkoutIframe",
|
|
6400
6407
|
"service_id",
|
|
6401
6408
|
"paydock_public_key_or_access_token",
|
|
@@ -6405,8 +6412,8 @@ src.load();
|
|
|
6405
6412
|
```
|
|
6406
6413
|
```javascript--es2015
|
|
6407
6414
|
// ES2015 | TypeScript
|
|
6408
|
-
import {
|
|
6409
|
-
var src = new
|
|
6415
|
+
import { ClickToPay } from '@paydock/client-sdk';
|
|
6416
|
+
var src = new ClickToPay(
|
|
6410
6417
|
"#checkoutIframe",
|
|
6411
6418
|
"service_id",
|
|
6412
6419
|
"paydock_public_key_or_access_token",
|
|
@@ -6429,7 +6436,7 @@ A full example of the container and the initialized widget is as follows:
|
|
|
6429
6436
|
<div id="checkoutIframe"></div>
|
|
6430
6437
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
6431
6438
|
<script>
|
|
6432
|
-
var src = new paydock.
|
|
6439
|
+
var src = new paydock.ClickToPay(
|
|
6433
6440
|
"#checkoutIframe",
|
|
6434
6441
|
"service_id",
|
|
6435
6442
|
"paydock_public_key_or_access_token",
|
|
@@ -6440,7 +6447,9 @@ A full example of the container and the initialized widget is as follows:
|
|
|
6440
6447
|
</body>
|
|
6441
6448
|
</html>
|
|
6442
6449
|
```
|
|
6443
|
-
|
|
6450
|
+
|
|
6451
|
+
## Customize your Click To Pay Checkout
|
|
6452
|
+
|
|
6444
6453
|
The following is an advanced example that includes customization. You can use these methods to enhance your checkout experience.
|
|
6445
6454
|
### Settings
|
|
6446
6455
|
```javascript
|
|
@@ -6473,7 +6482,7 @@ src.on('checkoutError', (error) => {
|
|
|
6473
6482
|
<div id="checkoutIframe"></div>
|
|
6474
6483
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
6475
6484
|
<script>
|
|
6476
|
-
var src = new paydock.
|
|
6485
|
+
var src = new paydock.ClickToPay(
|
|
6477
6486
|
"#checkoutIframe",
|
|
6478
6487
|
"service_id",
|
|
6479
6488
|
"paydock_public_key_or_access_token",
|
|
@@ -6500,7 +6509,7 @@ src.on('checkoutError', (error) => {
|
|
|
6500
6509
|
To customize your billing address experience, Paydock uses a flag that manages whether a customer's billing address is mandatory.
|
|
6501
6510
|
The options for this customization are NONE (default option), and POSTAL_COUNTRY or FULL.
|
|
6502
6511
|
```
|
|
6503
|
-
var src = new paydock.
|
|
6512
|
+
var src = new paydock.ClickToPay(
|
|
6504
6513
|
"#checkoutIframe",
|
|
6505
6514
|
"service_id",
|
|
6506
6515
|
"paydock_public_key_or_access_token",
|
|
@@ -6511,10 +6520,11 @@ var src = new paydock.MastercardSRCClickToPay(
|
|
|
6511
6520
|
},
|
|
6512
6521
|
);
|
|
6513
6522
|
```
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6523
|
+
|
|
6524
|
+
The Click To Pay checkout in the example requires the billing address from the customer, which is then returned as a part of the checkout data. The data is then stored and leveraged in the Paydock charge.
|
|
6525
|
+
You can also provide the billing address at the time of creating the charge. For example, if you have a different method for collecting the billing address, such as outside of the Click To Pay checkout, you can provide it alongside other information at the charge creation step:
|
|
6526
|
+
1. Disable the billing address in Paydock's Click To Pay widget.
|
|
6527
|
+
2. Get your One Time Token from the Click To Pay widget alongside other details that may have been collected outside the Click To Pay checkout as the shipping address.
|
|
6518
6528
|
3. Send the billing address when creating the charge.
|
|
6519
6529
|
```
|
|
6520
6530
|
POST v1/charges
|
|
@@ -6549,7 +6559,7 @@ You can send a flag `unaccepted_card_type` to block the usage of a specific card
|
|
|
6549
6559
|
### Example code
|
|
6550
6560
|
The following example demonstrates how to block the card:
|
|
6551
6561
|
```
|
|
6552
|
-
var src = new paydock.
|
|
6562
|
+
var src = new paydock.ClickToPay(
|
|
6553
6563
|
"#checkoutIframe",
|
|
6554
6564
|
"service_id",
|
|
6555
6565
|
"paydock_public_key",
|
|
@@ -6562,7 +6572,7 @@ var src = new paydock.MastercardSRCClickToPay(
|
|
|
6562
6572
|
Customize the look and feel of your UI. The following example demonstrates changes in the styling of the buttons.
|
|
6563
6573
|
### Example code
|
|
6564
6574
|
```
|
|
6565
|
-
var src = new paydock.
|
|
6575
|
+
var src = new paydock.ClickToPay(
|
|
6566
6576
|
"#checkoutIframe",
|
|
6567
6577
|
"service_id",
|
|
6568
6578
|
"paydock_public_key",
|
|
@@ -6581,8 +6591,8 @@ src.setStyles({
|
|
|
6581
6591
|
## Classes
|
|
6582
6592
|
|
|
6583
6593
|
<dl>
|
|
6584
|
-
<dt><a href="#
|
|
6585
|
-
<dd><p>Class
|
|
6594
|
+
<dt><a href="#ClickToPay">ClickToPay</a> ⇐ <code>SRC</code></dt>
|
|
6595
|
+
<dd><p>Class ClickToPay include methods for interacting with the ClickToPay checkout and Manual Card option</p>
|
|
6586
6596
|
</dd>
|
|
6587
6597
|
</dl>
|
|
6588
6598
|
|
|
@@ -6600,7 +6610,7 @@ src.setStyles({
|
|
|
6600
6610
|
When the flow type is src, masked checkoutData available is also returned</p>
|
|
6601
6611
|
</dd>
|
|
6602
6612
|
<dt><a href="#IStyles">IStyles</a> : <code>object</code></dt>
|
|
6603
|
-
<dd><p>Interface for style configs inyected to the
|
|
6613
|
+
<dd><p>Interface for style configs inyected to the Click to Pay checkout</p>
|
|
6604
6614
|
</dd>
|
|
6605
6615
|
</dl>
|
|
6606
6616
|
|
|
@@ -6629,7 +6639,7 @@ Interface of data used for the Mastercard Checkout. For further information refe
|
|
|
6629
6639
|
| [dpa_data.dpa_supported_phone_number.phone_number] | <code>string</code> | The phone number part of the phone number. |
|
|
6630
6640
|
| [dpa_data.dpa_support_uri] | <code>string</code> | URI for DPA support. |
|
|
6631
6641
|
| [dpa_data.application_type] | <code>string</code> | Application type, either 'WEB_BROWSER' or 'MOBILE_APP'. |
|
|
6632
|
-
| [co_brand_names] | <code>Array.<string></code> | List of co-brand names associated with the
|
|
6642
|
+
| [co_brand_names] | <code>Array.<string></code> | List of co-brand names associated with the Click to Pay experience. |
|
|
6633
6643
|
| [checkout_experience] | <code>string</code> | Checkout experience type, either 'WITHIN_CHECKOUT' or 'PAYMENT_SETTINGS'. |
|
|
6634
6644
|
| [services] | <code>string</code> | Services offered, such as 'INLINE_CHECKOUT' or 'INLINE_INSTALLMENTS'. |
|
|
6635
6645
|
| [dpa_transaction_options] | <code>object</code> | Object that stores options for creating a transaction with DPA. |
|
|
@@ -6707,7 +6717,7 @@ When the flow type is src, masked checkoutData available is also returned
|
|
|
6707
6717
|
<a name="IStyles" id="IStyles" href="#IStyles"> </a>
|
|
6708
6718
|
|
|
6709
6719
|
## IStyles : <code>object</code>
|
|
6710
|
-
Interface for style configs inyected to the
|
|
6720
|
+
Interface for style configs inyected to the Click to Pay checkout
|
|
6711
6721
|
|
|
6712
6722
|
**Kind**: global interface
|
|
6713
6723
|
|
|
@@ -6718,19 +6728,19 @@ Interface for style configs inyected to the SRC checkout
|
|
|
6718
6728
|
| [secondary_button_color] | <code>string</code> | Color Code for secondary button. |
|
|
6719
6729
|
| [secondary_button_text_color] | <code>string</code> | Color Code for secondary button text. |
|
|
6720
6730
|
| [font_family] | <code>string</code> | Font family to be used. |
|
|
6721
|
-
| [enable_src_popup] | <code>boolean</code> | Boolean flag to make the
|
|
6731
|
+
| [enable_src_popup] | <code>boolean</code> | Boolean flag to make the Click to Pay checkout show in a popup window instead of embedded in iframe. |
|
|
6722
6732
|
|
|
6723
|
-
<a name="
|
|
6733
|
+
<a name="ClickToPay" id="ClickToPay" href="#ClickToPay"> </a>
|
|
6724
6734
|
|
|
6725
|
-
##
|
|
6726
|
-
Class
|
|
6735
|
+
## ClickToPay ⇐ <code>SRC</code>
|
|
6736
|
+
Class ClickToPay include methods for interacting with the ClickToPay checkout and Manual Card option
|
|
6727
6737
|
|
|
6728
6738
|
**Kind**: global class
|
|
6729
6739
|
**Extends**: <code>SRC</code>
|
|
6730
6740
|
|
|
6731
|
-
* [
|
|
6732
|
-
* [new
|
|
6733
|
-
* [.load()](#
|
|
6741
|
+
* [ClickToPay](#ClickToPay) ⇐ <code>SRC</code>
|
|
6742
|
+
* [new ClickToPay(iframe_selector, service_id, public_key_or_access_token, meta)](#new_ClickToPay_new)
|
|
6743
|
+
* [.load()](#ClickToPay+load)
|
|
6734
6744
|
* [.setStyles(fields)](#SRC+setStyles)
|
|
6735
6745
|
* [.setEnv(env, [alias])](#SRC+setEnv)
|
|
6736
6746
|
* [.getEnv()](#SRC+getEnv)
|
|
@@ -6740,33 +6750,33 @@ Class MastercardSRCClickToPay include methods for interacting with the Mastercar
|
|
|
6740
6750
|
* [.reload()](#SRC+reload)
|
|
6741
6751
|
* [.useAutoResize()](#SRC+useAutoResize)
|
|
6742
6752
|
|
|
6743
|
-
<a name="
|
|
6753
|
+
<a name="new_ClickToPay_new" id="new_ClickToPay_new" href="#new_ClickToPay_new"> </a>
|
|
6744
6754
|
|
|
6745
|
-
### new
|
|
6755
|
+
### new ClickToPay(iframe_selector, service_id, public_key_or_access_token, meta)
|
|
6746
6756
|
|
|
6747
6757
|
| Param | Type | Description |
|
|
6748
6758
|
| --- | --- | --- |
|
|
6749
|
-
| iframe_selector | <code>string</code> | Selector of html element. Container for
|
|
6759
|
+
| iframe_selector | <code>string</code> | Selector of html element. Container for Click To Pay checkout iFrame. |
|
|
6750
6760
|
| service_id | <code>string</code> | Card Scheme Service ID |
|
|
6751
6761
|
| public_key_or_access_token | <code>string</code> | Paydock public key or Access Token |
|
|
6752
|
-
| meta |
|
|
6762
|
+
| meta | <code>IClickToPayMeta</code> | Data that configures the Click To Pay checkout |
|
|
6753
6763
|
|
|
6754
6764
|
**Example**
|
|
6755
6765
|
```js
|
|
6756
|
-
var mastercardSRC = new
|
|
6766
|
+
var mastercardSRC = new ClickToPay('#checkoutIframe', 'service_id', 'public_key', {});
|
|
6757
6767
|
```
|
|
6758
|
-
<a name="
|
|
6768
|
+
<a name="ClickToPay+load" id="ClickToPay+load" href="#ClickToPay+load"> </a>
|
|
6759
6769
|
|
|
6760
|
-
###
|
|
6761
|
-
The final method after configuring the SRC to start the load process of
|
|
6770
|
+
### clickToPay.load()
|
|
6771
|
+
The final method after configuring the SRC to start the load process of Click To Pay checkout
|
|
6762
6772
|
|
|
6763
|
-
**Kind**: instance method of [<code>
|
|
6773
|
+
**Kind**: instance method of [<code>ClickToPay</code>](#ClickToPay)
|
|
6764
6774
|
<a name="SRC+setStyles" id="SRC+setStyles" href="#SRC+setStyles"> </a>
|
|
6765
6775
|
|
|
6766
|
-
###
|
|
6776
|
+
### clickToPay.setStyles(fields)
|
|
6767
6777
|
Object contain styles for widget - call before `.load()`.
|
|
6768
6778
|
|
|
6769
|
-
**Kind**: instance method of [<code>
|
|
6779
|
+
**Kind**: instance method of [<code>ClickToPay</code>](#ClickToPay)
|
|
6770
6780
|
**Overrides**: [<code>setStyles</code>](#SRC+setStyles)
|
|
6771
6781
|
|
|
6772
6782
|
| Param | Type | Description |
|
|
@@ -6786,11 +6796,11 @@ widget.setStyles({
|
|
|
6786
6796
|
```
|
|
6787
6797
|
<a name="SRC+setEnv" id="SRC+setEnv" href="#SRC+setEnv"> </a>
|
|
6788
6798
|
|
|
6789
|
-
###
|
|
6799
|
+
### clickToPay.setEnv(env, [alias])
|
|
6790
6800
|
Current method can change environment. By default environment = sandbox.
|
|
6791
6801
|
Also we can change domain alias for this environment. By default domain_alias = paydock.com
|
|
6792
6802
|
|
|
6793
|
-
**Kind**: instance method of [<code>
|
|
6803
|
+
**Kind**: instance method of [<code>ClickToPay</code>](#ClickToPay)
|
|
6794
6804
|
**Overrides**: [<code>setEnv</code>](#SRC+setEnv)
|
|
6795
6805
|
|
|
6796
6806
|
| Param | Type | Description |
|
|
@@ -6804,10 +6814,10 @@ SRC.setEnv('production');
|
|
|
6804
6814
|
```
|
|
6805
6815
|
<a name="SRC+getEnv" id="SRC+getEnv" href="#SRC+getEnv"> </a>
|
|
6806
6816
|
|
|
6807
|
-
###
|
|
6817
|
+
### clickToPay.getEnv()
|
|
6808
6818
|
Method to read the current environment
|
|
6809
6819
|
|
|
6810
|
-
**Kind**: instance method of [<code>
|
|
6820
|
+
**Kind**: instance method of [<code>ClickToPay</code>](#ClickToPay)
|
|
6811
6821
|
**Overrides**: [<code>getEnv</code>](#SRC+getEnv)
|
|
6812
6822
|
**Example**
|
|
6813
6823
|
```js
|
|
@@ -6815,10 +6825,10 @@ SRC.getEnv();
|
|
|
6815
6825
|
```
|
|
6816
6826
|
<a name="SRC+on" id="SRC+on" href="#SRC+on"> </a>
|
|
6817
6827
|
|
|
6818
|
-
###
|
|
6828
|
+
### clickToPay.on(eventName, [cb]) ⇒ <code>Promise.<any></code> \| <code>void</code>
|
|
6819
6829
|
Listen to events of SRC
|
|
6820
6830
|
|
|
6821
|
-
**Kind**: instance method of [<code>
|
|
6831
|
+
**Kind**: instance method of [<code>ClickToPay</code>](#ClickToPay)
|
|
6822
6832
|
**Overrides**: [<code>on</code>](#SRC+on)
|
|
6823
6833
|
|
|
6824
6834
|
| Param | Type | Description |
|
|
@@ -6838,10 +6848,10 @@ SRC.on('checkoutCompleted').then(function (token) {
|
|
|
6838
6848
|
```
|
|
6839
6849
|
<a name="SRC+hideCheckout" id="SRC+hideCheckout" href="#SRC+hideCheckout"> </a>
|
|
6840
6850
|
|
|
6841
|
-
###
|
|
6851
|
+
### clickToPay.hideCheckout([saveSize])
|
|
6842
6852
|
Using this method you can hide checkout after load and button click
|
|
6843
6853
|
|
|
6844
|
-
**Kind**: instance method of [<code>
|
|
6854
|
+
**Kind**: instance method of [<code>ClickToPay</code>](#ClickToPay)
|
|
6845
6855
|
**Overrides**: [<code>hideCheckout</code>](#SRC+hideCheckout)
|
|
6846
6856
|
|
|
6847
6857
|
| Param | Type | Default | Description |
|
|
@@ -6854,10 +6864,10 @@ SRC.hideCheckout();
|
|
|
6854
6864
|
```
|
|
6855
6865
|
<a name="SRC+showCheckout" id="SRC+showCheckout" href="#SRC+showCheckout"> </a>
|
|
6856
6866
|
|
|
6857
|
-
###
|
|
6867
|
+
### clickToPay.showCheckout()
|
|
6858
6868
|
Using this method you can show checkout after using hideCheckout method
|
|
6859
6869
|
|
|
6860
|
-
**Kind**: instance method of [<code>
|
|
6870
|
+
**Kind**: instance method of [<code>ClickToPay</code>](#ClickToPay)
|
|
6861
6871
|
**Overrides**: [<code>showCheckout</code>](#SRC+showCheckout)
|
|
6862
6872
|
**Example**
|
|
6863
6873
|
```js
|
|
@@ -6865,10 +6875,10 @@ SRC.showCheckout()
|
|
|
6865
6875
|
```
|
|
6866
6876
|
<a name="SRC+reload" id="SRC+reload" href="#SRC+reload"> </a>
|
|
6867
6877
|
|
|
6868
|
-
###
|
|
6878
|
+
### clickToPay.reload()
|
|
6869
6879
|
Using this method you can reload the whole checkout
|
|
6870
6880
|
|
|
6871
|
-
**Kind**: instance method of [<code>
|
|
6881
|
+
**Kind**: instance method of [<code>ClickToPay</code>](#ClickToPay)
|
|
6872
6882
|
**Overrides**: [<code>reload</code>](#SRC+reload)
|
|
6873
6883
|
**Example**
|
|
6874
6884
|
```js
|
|
@@ -6876,10 +6886,10 @@ SRC.reload()
|
|
|
6876
6886
|
```
|
|
6877
6887
|
<a name="SRC+useAutoResize" id="SRC+useAutoResize" href="#SRC+useAutoResize"> </a>
|
|
6878
6888
|
|
|
6879
|
-
###
|
|
6889
|
+
### clickToPay.useAutoResize()
|
|
6880
6890
|
Use this method for resize checkout iFrame according to content height, if applicable
|
|
6881
6891
|
|
|
6882
|
-
**Kind**: instance method of [<code>
|
|
6892
|
+
**Kind**: instance method of [<code>ClickToPay</code>](#ClickToPay)
|
|
6883
6893
|
**Overrides**: [<code>useAutoResize</code>](#SRC+useAutoResize)
|
|
6884
6894
|
**Example**
|
|
6885
6895
|
```js
|
|
@@ -6888,7 +6898,7 @@ SRC.useAutoResize();
|
|
|
6888
6898
|
<a name="EVENT" id="EVENT" href="#EVENT"> </a>
|
|
6889
6899
|
|
|
6890
6900
|
## EVENT : <code>enum</code>
|
|
6891
|
-
List of available event's name in the
|
|
6901
|
+
List of available event's name in the Click To Pay checkout lifecycle
|
|
6892
6902
|
|
|
6893
6903
|
**Kind**: global enum
|
|
6894
6904
|
|
|
@@ -6896,8 +6906,8 @@ List of available event's name in the SRC checkout lifecycle
|
|
|
6896
6906
|
| --- | --- | --- | --- |
|
|
6897
6907
|
| IFRAME_LOADED | <code>string</code> | <code>"iframeLoaded"</code> | Initial event sent when IFrame is initially loaded. |
|
|
6898
6908
|
| 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). |
|
|
6899
|
-
| CHECKOUT_POPUP_OPEN | <code>string</code> | <code>"checkoutPopupOpen"</code> | Event sent when
|
|
6900
|
-
| CHECKOUT_POPUP_CLOSE | <code>string</code> | <code>"checkoutPopupClose"</code> | Event sent when
|
|
6909
|
+
| CHECKOUT_POPUP_OPEN | <code>string</code> | <code>"checkoutPopupOpen"</code> | Event sent when Click To Pay checkout flow is started, regardless of embedded or windowed mode. |
|
|
6910
|
+
| CHECKOUT_POPUP_CLOSE | <code>string</code> | <code>"checkoutPopupClose"</code> | Event sent when Click To Pay checkout flow is closed, regardless of embedded or windowed mode. |
|
|
6901
6911
|
| CHECKOUT_COMPLETED | <code>string</code> | <code>"checkoutCompleted"</code> | Event sent on successful checkout by customer. Check [data](#EventDataCheckoutCompletedData) for more information. |
|
|
6902
6912
|
| CHECKOUT_ERROR | <code>string</code> | <code>"checkoutError"</code> | Event sent on error checkout by customer. Check [data](#EventData) for more information. |
|
|
6903
6913
|
|
package/bundles/widget.umd.js
CHANGED
|
@@ -383,7 +383,7 @@
|
|
|
383
383
|
// the empty string is set in case if version not provided.
|
|
384
384
|
//
|
|
385
385
|
// e.g: grunt build --sdk-version=v1.0.0
|
|
386
|
-
SDK._version = 'v1.106.
|
|
386
|
+
SDK._version = 'v1.106.11-beta';
|
|
387
387
|
|
|
388
388
|
var ENV = {
|
|
389
389
|
SANDBOX: 'sandbox',
|
|
@@ -7925,7 +7925,7 @@
|
|
|
7925
7925
|
var CARD_SCHEME_SERVICE;
|
|
7926
7926
|
(function (CARD_SCHEME_SERVICE) {
|
|
7927
7927
|
CARD_SCHEME_SERVICE["VISA_SRC"] = "VisaSRC";
|
|
7928
|
-
CARD_SCHEME_SERVICE["MASTERCARD_SRC"] = "
|
|
7928
|
+
CARD_SCHEME_SERVICE["MASTERCARD_SRC"] = "ClickToPay";
|
|
7929
7929
|
})(CARD_SCHEME_SERVICE || (CARD_SCHEME_SERVICE = {}));
|
|
7930
7930
|
|
|
7931
7931
|
var ApiInternal = /*#__PURE__*/function (_ApiBase) {
|
|
@@ -10230,14 +10230,14 @@
|
|
|
10230
10230
|
}();
|
|
10231
10231
|
|
|
10232
10232
|
/**
|
|
10233
|
-
* List of available event's name in the
|
|
10233
|
+
* List of available event's name in the Click To Pay checkout lifecycle
|
|
10234
10234
|
* @enum EVENT
|
|
10235
10235
|
*
|
|
10236
10236
|
* @type {object}
|
|
10237
10237
|
* @param {string} IFRAME_LOADED=iframeLoaded Initial event sent when IFrame is initially loaded.
|
|
10238
10238
|
* @param {string} CHECKOUT_READY=checkoutReady Event sent when checkout is loaded and ready to be used by customer. Leverage alongside [showCheckout](#SRC+showCheckout) and [hideCheckout](#SRC+hideCheckout).
|
|
10239
|
-
* @param {string} CHECKOUT_POPUP_OPEN=checkoutPopupOpen Event sent when
|
|
10240
|
-
* @param {string} CHECKOUT_POPUP_CLOSE=checkoutPopupClose Event sent when
|
|
10239
|
+
* @param {string} CHECKOUT_POPUP_OPEN=checkoutPopupOpen Event sent when Click To Pay checkout flow is started, regardless of embedded or windowed mode.
|
|
10240
|
+
* @param {string} CHECKOUT_POPUP_CLOSE=checkoutPopupClose Event sent when Click To Pay checkout flow is closed, regardless of embedded or windowed mode.
|
|
10241
10241
|
* @param {string} CHECKOUT_COMPLETED=checkoutCompleted Event sent on successful checkout by customer. Check [data](#EventDataCheckoutCompletedData) for more information.
|
|
10242
10242
|
* @param {string} CHECKOUT_ERROR=checkoutError Event sent on error checkout by customer. Check [data](#EventData) for more information.
|
|
10243
10243
|
*/
|
|
@@ -10274,9 +10274,9 @@
|
|
|
10274
10274
|
ENABLE_SRC_POPUP: 'enable_src_popup'
|
|
10275
10275
|
};
|
|
10276
10276
|
|
|
10277
|
-
var
|
|
10278
|
-
function
|
|
10279
|
-
_classCallCheck(this,
|
|
10277
|
+
var ClickToPaySRC = /*#__PURE__*/function () {
|
|
10278
|
+
function ClickToPaySRC(iframe_selector, service_id, public_key, meta, eventEmitter, autoResize, env, alias) {
|
|
10279
|
+
_classCallCheck(this, ClickToPaySRC);
|
|
10280
10280
|
this.meta = meta;
|
|
10281
10281
|
this.eventEmitter = eventEmitter;
|
|
10282
10282
|
this.autoResize = autoResize;
|
|
@@ -10299,7 +10299,7 @@
|
|
|
10299
10299
|
this.iFrameEvent = new IFrameEvent(window);
|
|
10300
10300
|
this.setupIFrameEvents();
|
|
10301
10301
|
}
|
|
10302
|
-
_createClass(
|
|
10302
|
+
_createClass(ClickToPaySRC, [{
|
|
10303
10303
|
key: "setupIFrameEvents",
|
|
10304
10304
|
value: function setupIFrameEvents() {
|
|
10305
10305
|
var _this = this;
|
|
@@ -10332,7 +10332,7 @@
|
|
|
10332
10332
|
value: function load() {
|
|
10333
10333
|
var _this2 = this;
|
|
10334
10334
|
this.iFrame.load(this.link.getUrl(), {
|
|
10335
|
-
title: '
|
|
10335
|
+
title: 'Click To Pay checkout'
|
|
10336
10336
|
});
|
|
10337
10337
|
var iframeElement = this.iFrame.getElement();
|
|
10338
10338
|
this.iFrame.setStyle('width', '100%');
|
|
@@ -10380,7 +10380,7 @@
|
|
|
10380
10380
|
});
|
|
10381
10381
|
}
|
|
10382
10382
|
}]);
|
|
10383
|
-
return
|
|
10383
|
+
return ClickToPaySRC;
|
|
10384
10384
|
}();
|
|
10385
10385
|
|
|
10386
10386
|
var SRC = /*#__PURE__*/function () {
|
|
@@ -10431,7 +10431,7 @@
|
|
|
10431
10431
|
_this.meta.customizations = _this.style; // assign the style on the start of the widget
|
|
10432
10432
|
switch (type) {
|
|
10433
10433
|
case CARD_SCHEME_SERVICE.MASTERCARD_SRC:
|
|
10434
|
-
_this.provider = new
|
|
10434
|
+
_this.provider = new ClickToPaySRC(_this.iframe_selector, _this.service_id, _this.public_key_or_access_token, _this.meta, _this.eventEmitter, _this.autoResize, _this.env, _this.alias);
|
|
10435
10435
|
break;
|
|
10436
10436
|
}
|
|
10437
10437
|
if (_this.provider) _this.provider.load();
|
|
@@ -10545,27 +10545,27 @@
|
|
|
10545
10545
|
}();
|
|
10546
10546
|
|
|
10547
10547
|
/**
|
|
10548
|
-
* Class
|
|
10548
|
+
* Class ClickToPay include methods for interacting with the ClickToPay checkout and Manual Card option
|
|
10549
10549
|
*
|
|
10550
10550
|
* @extends SRC
|
|
10551
10551
|
*
|
|
10552
10552
|
* @constructor
|
|
10553
10553
|
*
|
|
10554
|
-
* @param {string} iframe_selector - Selector of html element. Container for
|
|
10554
|
+
* @param {string} iframe_selector - Selector of html element. Container for Click To Pay checkout iFrame.
|
|
10555
10555
|
* @param {string} service_id - Card Scheme Service ID
|
|
10556
10556
|
* @param {string} public_key_or_access_token - Paydock public key or Access Token
|
|
10557
|
-
* @param {
|
|
10557
|
+
* @param {IClickToPayMeta} meta - Data that configures the Click To Pay checkout
|
|
10558
10558
|
* @example
|
|
10559
|
-
* var mastercardSRC = new
|
|
10559
|
+
* var mastercardSRC = new ClickToPay('#checkoutIframe', 'service_id', 'public_key', {});
|
|
10560
10560
|
*
|
|
10561
10561
|
*/
|
|
10562
|
-
var
|
|
10563
|
-
_inherits(
|
|
10564
|
-
var _super = _createSuper(
|
|
10562
|
+
var ClickToPay = /*#__PURE__*/function (_SRC) {
|
|
10563
|
+
_inherits(ClickToPay, _SRC);
|
|
10564
|
+
var _super = _createSuper(ClickToPay);
|
|
10565
10565
|
/** @constructs */ // constructs added for correct parse classes jsdoc2md
|
|
10566
|
-
function
|
|
10566
|
+
function ClickToPay(iframe_selector, service_id, public_key_or_access_token, meta) {
|
|
10567
10567
|
var _this;
|
|
10568
|
-
_classCallCheck(this,
|
|
10568
|
+
_classCallCheck(this, ClickToPay);
|
|
10569
10569
|
_this = _super.call(this, iframe_selector, service_id, public_key_or_access_token, meta);
|
|
10570
10570
|
_this.iframe_selector = iframe_selector;
|
|
10571
10571
|
_this.service_id = service_id;
|
|
@@ -10574,25 +10574,26 @@
|
|
|
10574
10574
|
return _this;
|
|
10575
10575
|
}
|
|
10576
10576
|
/**
|
|
10577
|
-
* The final method after configuring the SRC to start the load process of
|
|
10577
|
+
* The final method after configuring the SRC to start the load process of Click To Pay checkout
|
|
10578
10578
|
*
|
|
10579
10579
|
*/
|
|
10580
|
-
_createClass(
|
|
10580
|
+
_createClass(ClickToPay, [{
|
|
10581
10581
|
key: "load",
|
|
10582
10582
|
value: function load() {
|
|
10583
10583
|
if (this.provider) return;
|
|
10584
10584
|
this.meta.customizations = this.style;
|
|
10585
|
-
this.provider = new
|
|
10585
|
+
this.provider = new ClickToPaySRC(this.iframe_selector, this.service_id, this.public_key_or_access_token, this.meta, this.eventEmitter, this.autoResize, this.env, this.alias);
|
|
10586
10586
|
this.provider.load();
|
|
10587
10587
|
}
|
|
10588
10588
|
}]);
|
|
10589
|
-
return
|
|
10589
|
+
return ClickToPay;
|
|
10590
10590
|
}(SRC);
|
|
10591
10591
|
|
|
10592
10592
|
exports.AfterpayCheckoutButton = AfterpayCheckoutButton;
|
|
10593
10593
|
exports.Api = Api;
|
|
10594
10594
|
exports.CHECKOUT_BUTTON_EVENT = CHECKOUT_BUTTON_EVENT;
|
|
10595
10595
|
exports.Canvas3ds = Canvas3ds;
|
|
10596
|
+
exports.ClickToPay = ClickToPay;
|
|
10596
10597
|
exports.Configuration = Configuration;
|
|
10597
10598
|
exports.ELEMENT = ELEMENT;
|
|
10598
10599
|
exports.EVENT = EVENT;
|
|
@@ -10602,7 +10603,6 @@
|
|
|
10602
10603
|
exports.HtmlMultiWidget = HtmlMultiWidget;
|
|
10603
10604
|
exports.HtmlPaymentSourceWidget = HtmlPaymentSourceWidget;
|
|
10604
10605
|
exports.HtmlWidget = HtmlWidget;
|
|
10605
|
-
exports.MastercardSRCClickToPay = MastercardSRCClickToPay;
|
|
10606
10606
|
exports.MultiWidget = MultiWidget;
|
|
10607
10607
|
exports.PAYMENT_TYPE = PAYMENT_TYPE;
|
|
10608
10608
|
exports.PURPOSE = PURPOSE;
|