@paydock/client-sdk 1.127.0 → 1.128.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1136 -3960
- package/bundles/index.cjs +292 -85
- package/bundles/index.cjs.d.ts +48 -3
- package/bundles/index.mjs +292 -85
- package/bundles/index.mjs.d.ts +48 -3
- package/bundles/types/checkout/checkout.d.ts +4 -4
- package/bundles/types/checkout/checkout.d.ts.map +1 -1
- package/bundles/types/checkout/layout-widgets/additionals.d.ts.map +1 -1
- package/bundles/types/checkout/layout-widgets/payment-template.d.ts.map +1 -1
- package/bundles/types/components/param.d.ts +2 -0
- package/bundles/types/components/param.d.ts.map +1 -1
- package/bundles/types/components/trigger.d.ts +2 -0
- package/bundles/types/components/trigger.d.ts.map +1 -1
- package/bundles/types/index-cba.d.ts +11 -11
- package/bundles/types/index-cba.d.ts.map +1 -1
- package/bundles/types/index.d.ts +11 -11
- package/bundles/types/index.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/click-to-pay-secure-remote-commerce.d.ts +24 -2
- package/bundles/types/secure-remote-commerce/click-to-pay-secure-remote-commerce.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/index.d.ts +7 -1
- package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/interfaces.d.ts +10 -2
- package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts +15 -4
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts +2 -0
- package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/services/performance.service.d.ts +32 -0
- package/bundles/types/secure-remote-commerce/services/performance.service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/index.d.ts +6 -6
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts +2 -2
- package/bundles/types/wallet-buttons-express/enum/event.enum.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/index.d.ts +3 -3
- package/bundles/types/wallet-buttons-express/index.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/charge-wallet-token-meta.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/on-click-event-data.interface.d.ts +2 -2
- package/bundles/types/wallet-buttons-express/interfaces/on-click-event-data.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/on-close-event-data.interface.d.ts +2 -2
- package/bundles/types/wallet-buttons-express/interfaces/on-close-event-data.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/on-error-event-data.interface.d.ts +2 -2
- package/bundles/types/wallet-buttons-express/interfaces/on-error-event-data.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-error-event-data.interface.d.ts +2 -2
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-error-event-data.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-in-review-event-data.interface.d.ts +2 -2
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-in-review-event-data.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-successful-event-data.interface.d.ts +2 -2
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-successful-event-data.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/on-shipping-address-change-event-data.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/on-shipping-address-change-event-response.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/on-shipping-option-change-event-data.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/on-unavailable-event-data.interface.d.ts +2 -2
- package/bundles/types/wallet-buttons-express/interfaces/on-unavailable-event-data.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-wallet-meta.interface.d.ts +5 -5
- package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-wallet-meta.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-shipping-data.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-shipping-method.type.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts +1 -1
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/types/shipping-event-to-response.type.d.ts +4 -4
- package/bundles/types/wallet-buttons-express/types/shipping-event-to-response.type.d.ts.map +1 -1
- package/bundles/types/widget/multi-widget.d.ts +8 -0
- package/bundles/types/widget/multi-widget.d.ts.map +1 -1
- package/bundles/widget.umd.js +292 -85
- package/bundles/widget.umd.js.d.ts +48 -3
- package/bundles/widget.umd.js.min.d.ts +48 -3
- package/bundles/widget.umd.min.js +1 -1
- package/docs/api-checkout-button.md +0 -370
- package/docs/api-widget.md +1 -2110
- package/docs/checkout-examples.md +2 -127
- package/docs/click-to-pay-examples.md +109 -0
- package/docs/click-to-pay.md +31 -1
- package/docs/license.md +1 -1
- package/docs/wallet-buttons-examples.md +3 -134
- package/docs/wallet-buttons.md +10 -10
- package/docs/wallet-cba-buttons-examples.md +1 -1
- package/package.json +1 -1
- package/slate.md +114 -524
- package/docs/api-vault-display.md +0 -94
|
@@ -7,12 +7,6 @@
|
|
|
7
7
|
<dt><a href="#user-content-cb_ZipmoneyCheckoutButton">ZipmoneyCheckoutButton</a> ⇐ <code><a href="#user-content-cb_CheckoutButton">CheckoutButton</a></code></dt>
|
|
8
8
|
<dd><p>Class ZipmoneyCheckoutButton is wrapper of CheckoutButton transform usual button into checkout</p>
|
|
9
9
|
</dd>
|
|
10
|
-
<dt><a href="#user-content-cb_PaypalCheckoutButton">PaypalCheckoutButton</a> ⇐ <code><a href="#user-content-cb_CheckoutButton">CheckoutButton</a></code></dt>
|
|
11
|
-
<dd><p>Class PaypalCheckoutButton is wrapper of CheckoutButton transform usual button into checkout</p>
|
|
12
|
-
</dd>
|
|
13
|
-
<dt><a href="#user-content-cb_AfterpayCheckoutButton">AfterpayCheckoutButton</a> ⇐ <code><a href="#user-content-cb_CheckoutButton">CheckoutButton</a></code></dt>
|
|
14
|
-
<dd><p>Class AfterpayCheckoutButton is wrapper of CheckoutButton transform usual button into checkout</p>
|
|
15
|
-
</dd>
|
|
16
10
|
</dl>
|
|
17
11
|
|
|
18
12
|
## Members
|
|
@@ -502,370 +496,6 @@ Only for 'contextual' mode.
|
|
|
502
496
|
**Overrides**: [<code>turnOffBackdrop</code>](#user-content-cb_CheckoutButton+turnOffBackdrop)
|
|
503
497
|
**Example**
|
|
504
498
|
|
|
505
|
-
```javascript
|
|
506
|
-
button.turnOffBackdrop();
|
|
507
|
-
```
|
|
508
|
-
<a name="cb_PaypalCheckoutButton" id="cb_PaypalCheckoutButton" href="#user-content-cb_PaypalCheckoutButton"> </a>
|
|
509
|
-
|
|
510
|
-
## PaypalCheckoutButton ⇐ [<code>CheckoutButton</code>](#user-content-cb_CheckoutButton)
|
|
511
|
-
Class PaypalCheckoutButton is wrapper of CheckoutButton transform usual button into checkout
|
|
512
|
-
|
|
513
|
-
**Kind**: global class
|
|
514
|
-
**Extends**: [<code>CheckoutButton</code>](#user-content-cb_CheckoutButton)
|
|
515
|
-
|
|
516
|
-
* [PaypalCheckoutButton](#user-content-cb_PaypalCheckoutButton) ⇐ [<code>CheckoutButton</code>](#user-content-cb_CheckoutButton)
|
|
517
|
-
* [new PaypalCheckoutButton(selector, publicKey, [gatewayId])](#user-content-cb_new_PaypalCheckoutButton_new)
|
|
518
|
-
* [.on(eventName, cb)](#user-content-cb_CheckoutButton+on)
|
|
519
|
-
* [.close()](#user-content-cb_CheckoutButton+close)
|
|
520
|
-
* [.onFinishInsert(selector, dataType)](#user-content-cb_CheckoutButton+onFinishInsert)
|
|
521
|
-
* [.setMeta(meta)](#user-content-cb_CheckoutButton+setMeta)
|
|
522
|
-
* [.setBackdropDescription(text)](#user-content-cb_CheckoutButton+setBackdropDescription)
|
|
523
|
-
* [.setBackdropTitle(string)](#user-content-cb_CheckoutButton+setBackdropTitle)
|
|
524
|
-
* [.setSuspendedRedirectUri(string)](#user-content-cb_CheckoutButton+setSuspendedRedirectUri)
|
|
525
|
-
* [.setRedirectUrl(string)](#user-content-cb_CheckoutButton+setRedirectUrl)
|
|
526
|
-
* [.turnOffBackdrop()](#user-content-cb_CheckoutButton+turnOffBackdrop)
|
|
527
|
-
|
|
528
|
-
<a name="cb_new_PaypalCheckoutButton_new" id="cb_new_PaypalCheckoutButton_new" href="#user-content-cb_new_PaypalCheckoutButton_new"> </a>
|
|
529
|
-
|
|
530
|
-
### new PaypalCheckoutButton(selector, publicKey, [gatewayId])
|
|
531
|
-
|
|
532
|
-
| Param | Type | Default | Description |
|
|
533
|
-
| --- | --- | --- | --- |
|
|
534
|
-
| selector | <code>string</code> | | Selector of html element. |
|
|
535
|
-
| publicKey | <code>string</code> | | PayDock users public key |
|
|
536
|
-
| [gatewayId] | <code>string</code> | <code>"default"</code> | PayDock's gatewayId. By default or if put 'default', it will use the selected default gateway |
|
|
537
|
-
|
|
538
|
-
**Example**
|
|
539
|
-
|
|
540
|
-
```javascript
|
|
541
|
-
var widget = new PaypalCheckoutButton('#button', 'publicKey','gatewayId');
|
|
542
|
-
```
|
|
543
|
-
<a name="cb_CheckoutButton+on" id="cb_CheckoutButton+on" href="#user-content-cb_CheckoutButton+on"> </a>
|
|
544
|
-
|
|
545
|
-
### paypalCheckoutButton.on(eventName, cb)
|
|
546
|
-
Listen to events of widget
|
|
547
|
-
|
|
548
|
-
**Kind**: instance method of [<code>PaypalCheckoutButton</code>](#user-content-cb_PaypalCheckoutButton)
|
|
549
|
-
**Overrides**: [<code>on</code>](#user-content-cb_CheckoutButton+on)
|
|
550
|
-
|
|
551
|
-
| Param | Type | Description |
|
|
552
|
-
| --- | --- | --- |
|
|
553
|
-
| eventName | <code>string</code> | Available event names [CHECKOUT_BUTTON_EVENT](#user-content-cb_CHECKOUT_BUTTON_EVENT) |
|
|
554
|
-
| cb | [<code>listener</code>](#user-content-cb_listener) | |
|
|
555
|
-
|
|
556
|
-
**Example**
|
|
557
|
-
|
|
558
|
-
```javascript
|
|
559
|
-
widget.on('click', function () {
|
|
560
|
-
|
|
561
|
-
});
|
|
562
|
-
```
|
|
563
|
-
<a name="cb_CheckoutButton+close" id="cb_CheckoutButton+close" href="#user-content-cb_CheckoutButton+close"> </a>
|
|
564
|
-
|
|
565
|
-
### paypalCheckoutButton.close()
|
|
566
|
-
Close popup window forcibly.
|
|
567
|
-
Only for 'contextual' mode.
|
|
568
|
-
|
|
569
|
-
**Kind**: instance method of [<code>PaypalCheckoutButton</code>](#user-content-cb_PaypalCheckoutButton)
|
|
570
|
-
**Overrides**: [<code>close</code>](#user-content-cb_CheckoutButton+close)
|
|
571
|
-
<a name="cb_CheckoutButton+onFinishInsert" id="cb_CheckoutButton+onFinishInsert" href="#user-content-cb_CheckoutButton+onFinishInsert"> </a>
|
|
572
|
-
|
|
573
|
-
### paypalCheckoutButton.onFinishInsert(selector, dataType)
|
|
574
|
-
After finish event of checkout button, data (dataType) will be insert to input (selector)
|
|
575
|
-
|
|
576
|
-
**Kind**: instance method of [<code>PaypalCheckoutButton</code>](#user-content-cb_PaypalCheckoutButton)
|
|
577
|
-
**Overrides**: [<code>onFinishInsert</code>](#user-content-cb_CheckoutButton+onFinishInsert)
|
|
578
|
-
|
|
579
|
-
| Param | Type | Description |
|
|
580
|
-
| --- | --- | --- |
|
|
581
|
-
| selector | <code>string</code> | css selector . [] # |
|
|
582
|
-
| dataType | <code>string</code> | data type of IEventCheckoutFinishData [IEventCheckoutFinishData](#user-content-cb_IEventCheckoutFinishData). |
|
|
583
|
-
|
|
584
|
-
<a name="cb_CheckoutButton+setMeta" id="cb_CheckoutButton+setMeta" href="#user-content-cb_CheckoutButton+setMeta"> </a>
|
|
585
|
-
|
|
586
|
-
### paypalCheckoutButton.setMeta(meta)
|
|
587
|
-
Method for setting meta information for checkout page
|
|
588
|
-
|
|
589
|
-
**Kind**: instance method of [<code>PaypalCheckoutButton</code>](#user-content-cb_PaypalCheckoutButton)
|
|
590
|
-
**Overrides**: [<code>setMeta</code>](#user-content-cb_CheckoutButton+setMeta)
|
|
591
|
-
|
|
592
|
-
| Param | Type | Description |
|
|
593
|
-
| --- | --- | --- |
|
|
594
|
-
| meta | [<code>IPayPalMeta</code>](#user-content-cb_IPayPalMeta) \| [<code>IAfterpayMeta</code>](#user-content-cb_IAfterpayMeta) \| [<code>IZipmoneyMeta</code>](#user-content-cb_IZipmoneyMeta) | Data which can be shown on checkout page [IPayPalMeta](#user-content-cb_IPayPalMeta) [IZipmoneyMeta](#user-content-cb_IZipmoneyMeta) [IAfterpayMeta](#user-content-cb_IAfterpayMeta) |
|
|
595
|
-
|
|
596
|
-
**Example**
|
|
597
|
-
|
|
598
|
-
```javascript
|
|
599
|
-
button.setMeta({
|
|
600
|
-
brand_name: 'paydock',
|
|
601
|
-
reference: '15',
|
|
602
|
-
email: 'wault@paydock.com'
|
|
603
|
-
});
|
|
604
|
-
```
|
|
605
|
-
<a name="cb_CheckoutButton+setBackdropDescription" id="cb_CheckoutButton+setBackdropDescription" href="#user-content-cb_CheckoutButton+setBackdropDescription"> </a>
|
|
606
|
-
|
|
607
|
-
### paypalCheckoutButton.setBackdropDescription(text)
|
|
608
|
-
Method for setting backdrop description.
|
|
609
|
-
Only for 'contextual' mode.
|
|
610
|
-
|
|
611
|
-
**Kind**: instance method of [<code>PaypalCheckoutButton</code>](#user-content-cb_PaypalCheckoutButton)
|
|
612
|
-
**Overrides**: [<code>setBackdropDescription</code>](#user-content-cb_CheckoutButton+setBackdropDescription)
|
|
613
|
-
|
|
614
|
-
| Param | Type | Description |
|
|
615
|
-
| --- | --- | --- |
|
|
616
|
-
| text | <code>string</code> | description which can be shown in overlay of back side checkout page |
|
|
617
|
-
|
|
618
|
-
**Example**
|
|
619
|
-
|
|
620
|
-
```javascript
|
|
621
|
-
button.setBackdropDescription('Custom description');
|
|
622
|
-
```
|
|
623
|
-
<a name="cb_CheckoutButton+setBackdropTitle" id="cb_CheckoutButton+setBackdropTitle" href="#user-content-cb_CheckoutButton+setBackdropTitle"> </a>
|
|
624
|
-
|
|
625
|
-
### paypalCheckoutButton.setBackdropTitle(string)
|
|
626
|
-
Method for setting backdrop title.
|
|
627
|
-
Only for 'contextual' mode.
|
|
628
|
-
|
|
629
|
-
**Kind**: instance method of [<code>PaypalCheckoutButton</code>](#user-content-cb_PaypalCheckoutButton)
|
|
630
|
-
**Overrides**: [<code>setBackdropTitle</code>](#user-content-cb_CheckoutButton+setBackdropTitle)
|
|
631
|
-
|
|
632
|
-
| Param | Type | Description |
|
|
633
|
-
| --- | --- | --- |
|
|
634
|
-
| string | <code>text</code> | title which can be shown in overlay of back side checkout page |
|
|
635
|
-
|
|
636
|
-
**Example**
|
|
637
|
-
|
|
638
|
-
```javascript
|
|
639
|
-
button.setBackdropTitle('Custom title');
|
|
640
|
-
```
|
|
641
|
-
<a name="cb_CheckoutButton+setSuspendedRedirectUri" id="cb_CheckoutButton+setSuspendedRedirectUri" href="#user-content-cb_CheckoutButton+setSuspendedRedirectUri"> </a>
|
|
642
|
-
|
|
643
|
-
### paypalCheckoutButton.setSuspendedRedirectUri(string)
|
|
644
|
-
Method for setting suspended redirect uri. Redirect after referred checkout.
|
|
645
|
-
Only for 'contextual' mode.
|
|
646
|
-
|
|
647
|
-
**Kind**: instance method of [<code>PaypalCheckoutButton</code>](#user-content-cb_PaypalCheckoutButton)
|
|
648
|
-
**Overrides**: [<code>setSuspendedRedirectUri</code>](#user-content-cb_CheckoutButton+setSuspendedRedirectUri)
|
|
649
|
-
|
|
650
|
-
| Param | Type | Description |
|
|
651
|
-
| --- | --- | --- |
|
|
652
|
-
| string | <code>uri</code> | uri for redirect (by default) |
|
|
653
|
-
|
|
654
|
-
<a name="cb_CheckoutButton+setRedirectUrl" id="cb_CheckoutButton+setRedirectUrl" href="#user-content-cb_CheckoutButton+setRedirectUrl"> </a>
|
|
655
|
-
|
|
656
|
-
### paypalCheckoutButton.setRedirectUrl(string)
|
|
657
|
-
Method for setting the merchant redirect URL.
|
|
658
|
-
Merchant's customers redirect after successfull checkout.
|
|
659
|
-
Only for 'redirect' mode.
|
|
660
|
-
|
|
661
|
-
**Kind**: instance method of [<code>PaypalCheckoutButton</code>](#user-content-cb_PaypalCheckoutButton)
|
|
662
|
-
**Overrides**: [<code>setRedirectUrl</code>](#user-content-cb_CheckoutButton+setRedirectUrl)
|
|
663
|
-
|
|
664
|
-
| Param | Type | Description |
|
|
665
|
-
| --- | --- | --- |
|
|
666
|
-
| string | <code>url</code> | redirect url |
|
|
667
|
-
|
|
668
|
-
<a name="cb_CheckoutButton+turnOffBackdrop" id="cb_CheckoutButton+turnOffBackdrop" href="#user-content-cb_CheckoutButton+turnOffBackdrop"> </a>
|
|
669
|
-
|
|
670
|
-
### paypalCheckoutButton.turnOffBackdrop()
|
|
671
|
-
Method for disable backdrop on the page.
|
|
672
|
-
Only for 'contextual' mode.
|
|
673
|
-
|
|
674
|
-
**Kind**: instance method of [<code>PaypalCheckoutButton</code>](#user-content-cb_PaypalCheckoutButton)
|
|
675
|
-
**Overrides**: [<code>turnOffBackdrop</code>](#user-content-cb_CheckoutButton+turnOffBackdrop)
|
|
676
|
-
**Example**
|
|
677
|
-
|
|
678
|
-
```javascript
|
|
679
|
-
button.turnOffBackdrop();
|
|
680
|
-
```
|
|
681
|
-
<a name="cb_AfterpayCheckoutButton" id="cb_AfterpayCheckoutButton" href="#user-content-cb_AfterpayCheckoutButton"> </a>
|
|
682
|
-
|
|
683
|
-
## AfterpayCheckoutButton ⇐ [<code>CheckoutButton</code>](#user-content-cb_CheckoutButton)
|
|
684
|
-
Class AfterpayCheckoutButton is wrapper of CheckoutButton transform usual button into checkout
|
|
685
|
-
|
|
686
|
-
**Kind**: global class
|
|
687
|
-
**Extends**: [<code>CheckoutButton</code>](#user-content-cb_CheckoutButton)
|
|
688
|
-
|
|
689
|
-
* [AfterpayCheckoutButton](#user-content-cb_AfterpayCheckoutButton) ⇐ [<code>CheckoutButton</code>](#user-content-cb_CheckoutButton)
|
|
690
|
-
* [new AfterpayCheckoutButton(selector, accessToken, [gatewayId])](#user-content-cb_new_AfterpayCheckoutButton_new)
|
|
691
|
-
* [.showEnhancedTrackingProtectionPopup(boolean)](#user-content-cb_AfterpayCheckoutButton+showEnhancedTrackingProtectionPopup)
|
|
692
|
-
* [.on(eventName, cb)](#user-content-cb_CheckoutButton+on)
|
|
693
|
-
* [.close()](#user-content-cb_CheckoutButton+close)
|
|
694
|
-
* [.onFinishInsert(selector, dataType)](#user-content-cb_CheckoutButton+onFinishInsert)
|
|
695
|
-
* [.setMeta(meta)](#user-content-cb_CheckoutButton+setMeta)
|
|
696
|
-
* [.setBackdropDescription(text)](#user-content-cb_CheckoutButton+setBackdropDescription)
|
|
697
|
-
* [.setBackdropTitle(string)](#user-content-cb_CheckoutButton+setBackdropTitle)
|
|
698
|
-
* [.setSuspendedRedirectUri(string)](#user-content-cb_CheckoutButton+setSuspendedRedirectUri)
|
|
699
|
-
* [.setRedirectUrl(string)](#user-content-cb_CheckoutButton+setRedirectUrl)
|
|
700
|
-
* [.turnOffBackdrop()](#user-content-cb_CheckoutButton+turnOffBackdrop)
|
|
701
|
-
|
|
702
|
-
<a name="cb_new_AfterpayCheckoutButton_new" id="cb_new_AfterpayCheckoutButton_new" href="#user-content-cb_new_AfterpayCheckoutButton_new"> </a>
|
|
703
|
-
|
|
704
|
-
### new AfterpayCheckoutButton(selector, accessToken, [gatewayId])
|
|
705
|
-
|
|
706
|
-
| Param | Type | Default | Description |
|
|
707
|
-
| --- | --- | --- | --- |
|
|
708
|
-
| selector | <code>string</code> | | Selector of html element. |
|
|
709
|
-
| accessToken | <code>string</code> | | PayDock access-token or users public key |
|
|
710
|
-
| [gatewayId] | <code>string</code> | <code>"default"</code> | PayDock's gatewayId. By default or if put 'default', it will use the selected default gateway |
|
|
711
|
-
|
|
712
|
-
**Example**
|
|
713
|
-
|
|
714
|
-
```javascript
|
|
715
|
-
var widget = new AfterpayCheckoutButton('#button', 'access-token','gatewayId');
|
|
716
|
-
```
|
|
717
|
-
<a name="cb_AfterpayCheckoutButton+showEnhancedTrackingProtectionPopup" id="cb_AfterpayCheckoutButton+showEnhancedTrackingProtectionPopup" href="#user-content-cb_AfterpayCheckoutButton+showEnhancedTrackingProtectionPopup"> </a>
|
|
718
|
-
|
|
719
|
-
### afterpayCheckoutButton.showEnhancedTrackingProtectionPopup(boolean)
|
|
720
|
-
Method which toggles the "Enhanced Tracking Protection" warning popup to 'on' mode.
|
|
721
|
-
|
|
722
|
-
This popup with a warning about "Enhanced Tracking Protection" limitations
|
|
723
|
-
would be shown in the Mozilla Firefox browser version 100+
|
|
724
|
-
|
|
725
|
-
By default, the popup would not be shown, until
|
|
726
|
-
the flag would be set to `true`
|
|
727
|
-
|
|
728
|
-
**Kind**: instance method of [<code>AfterpayCheckoutButton</code>](#user-content-cb_AfterpayCheckoutButton)
|
|
729
|
-
|
|
730
|
-
| Param | Type | Description |
|
|
731
|
-
| --- | --- | --- |
|
|
732
|
-
| boolean | <code>doShow</code> | flag which toggle the popup visibility |
|
|
733
|
-
|
|
734
|
-
<a name="cb_CheckoutButton+on" id="cb_CheckoutButton+on" href="#user-content-cb_CheckoutButton+on"> </a>
|
|
735
|
-
|
|
736
|
-
### afterpayCheckoutButton.on(eventName, cb)
|
|
737
|
-
Listen to events of widget
|
|
738
|
-
|
|
739
|
-
**Kind**: instance method of [<code>AfterpayCheckoutButton</code>](#user-content-cb_AfterpayCheckoutButton)
|
|
740
|
-
**Overrides**: [<code>on</code>](#user-content-cb_CheckoutButton+on)
|
|
741
|
-
|
|
742
|
-
| Param | Type | Description |
|
|
743
|
-
| --- | --- | --- |
|
|
744
|
-
| eventName | <code>string</code> | Available event names [CHECKOUT_BUTTON_EVENT](#user-content-cb_CHECKOUT_BUTTON_EVENT) |
|
|
745
|
-
| cb | [<code>listener</code>](#user-content-cb_listener) | |
|
|
746
|
-
|
|
747
|
-
**Example**
|
|
748
|
-
|
|
749
|
-
```javascript
|
|
750
|
-
widget.on('click', function () {
|
|
751
|
-
|
|
752
|
-
});
|
|
753
|
-
```
|
|
754
|
-
<a name="cb_CheckoutButton+close" id="cb_CheckoutButton+close" href="#user-content-cb_CheckoutButton+close"> </a>
|
|
755
|
-
|
|
756
|
-
### afterpayCheckoutButton.close()
|
|
757
|
-
Close popup window forcibly.
|
|
758
|
-
Only for 'contextual' mode.
|
|
759
|
-
|
|
760
|
-
**Kind**: instance method of [<code>AfterpayCheckoutButton</code>](#user-content-cb_AfterpayCheckoutButton)
|
|
761
|
-
**Overrides**: [<code>close</code>](#user-content-cb_CheckoutButton+close)
|
|
762
|
-
<a name="cb_CheckoutButton+onFinishInsert" id="cb_CheckoutButton+onFinishInsert" href="#user-content-cb_CheckoutButton+onFinishInsert"> </a>
|
|
763
|
-
|
|
764
|
-
### afterpayCheckoutButton.onFinishInsert(selector, dataType)
|
|
765
|
-
After finish event of checkout button, data (dataType) will be insert to input (selector)
|
|
766
|
-
|
|
767
|
-
**Kind**: instance method of [<code>AfterpayCheckoutButton</code>](#user-content-cb_AfterpayCheckoutButton)
|
|
768
|
-
**Overrides**: [<code>onFinishInsert</code>](#user-content-cb_CheckoutButton+onFinishInsert)
|
|
769
|
-
|
|
770
|
-
| Param | Type | Description |
|
|
771
|
-
| --- | --- | --- |
|
|
772
|
-
| selector | <code>string</code> | css selector . [] # |
|
|
773
|
-
| dataType | <code>string</code> | data type of IEventCheckoutFinishData [IEventCheckoutFinishData](#user-content-cb_IEventCheckoutFinishData). |
|
|
774
|
-
|
|
775
|
-
<a name="cb_CheckoutButton+setMeta" id="cb_CheckoutButton+setMeta" href="#user-content-cb_CheckoutButton+setMeta"> </a>
|
|
776
|
-
|
|
777
|
-
### afterpayCheckoutButton.setMeta(meta)
|
|
778
|
-
Method for setting meta information for checkout page
|
|
779
|
-
|
|
780
|
-
**Kind**: instance method of [<code>AfterpayCheckoutButton</code>](#user-content-cb_AfterpayCheckoutButton)
|
|
781
|
-
**Overrides**: [<code>setMeta</code>](#user-content-cb_CheckoutButton+setMeta)
|
|
782
|
-
|
|
783
|
-
| Param | Type | Description |
|
|
784
|
-
| --- | --- | --- |
|
|
785
|
-
| meta | [<code>IPayPalMeta</code>](#user-content-cb_IPayPalMeta) \| [<code>IAfterpayMeta</code>](#user-content-cb_IAfterpayMeta) \| [<code>IZipmoneyMeta</code>](#user-content-cb_IZipmoneyMeta) | Data which can be shown on checkout page [IPayPalMeta](#user-content-cb_IPayPalMeta) [IZipmoneyMeta](#user-content-cb_IZipmoneyMeta) [IAfterpayMeta](#user-content-cb_IAfterpayMeta) |
|
|
786
|
-
|
|
787
|
-
**Example**
|
|
788
|
-
|
|
789
|
-
```javascript
|
|
790
|
-
button.setMeta({
|
|
791
|
-
brand_name: 'paydock',
|
|
792
|
-
reference: '15',
|
|
793
|
-
email: 'wault@paydock.com'
|
|
794
|
-
});
|
|
795
|
-
```
|
|
796
|
-
<a name="cb_CheckoutButton+setBackdropDescription" id="cb_CheckoutButton+setBackdropDescription" href="#user-content-cb_CheckoutButton+setBackdropDescription"> </a>
|
|
797
|
-
|
|
798
|
-
### afterpayCheckoutButton.setBackdropDescription(text)
|
|
799
|
-
Method for setting backdrop description.
|
|
800
|
-
Only for 'contextual' mode.
|
|
801
|
-
|
|
802
|
-
**Kind**: instance method of [<code>AfterpayCheckoutButton</code>](#user-content-cb_AfterpayCheckoutButton)
|
|
803
|
-
**Overrides**: [<code>setBackdropDescription</code>](#user-content-cb_CheckoutButton+setBackdropDescription)
|
|
804
|
-
|
|
805
|
-
| Param | Type | Description |
|
|
806
|
-
| --- | --- | --- |
|
|
807
|
-
| text | <code>string</code> | description which can be shown in overlay of back side checkout page |
|
|
808
|
-
|
|
809
|
-
**Example**
|
|
810
|
-
|
|
811
|
-
```javascript
|
|
812
|
-
button.setBackdropDescription('Custom description');
|
|
813
|
-
```
|
|
814
|
-
<a name="cb_CheckoutButton+setBackdropTitle" id="cb_CheckoutButton+setBackdropTitle" href="#user-content-cb_CheckoutButton+setBackdropTitle"> </a>
|
|
815
|
-
|
|
816
|
-
### afterpayCheckoutButton.setBackdropTitle(string)
|
|
817
|
-
Method for setting backdrop title.
|
|
818
|
-
Only for 'contextual' mode.
|
|
819
|
-
|
|
820
|
-
**Kind**: instance method of [<code>AfterpayCheckoutButton</code>](#user-content-cb_AfterpayCheckoutButton)
|
|
821
|
-
**Overrides**: [<code>setBackdropTitle</code>](#user-content-cb_CheckoutButton+setBackdropTitle)
|
|
822
|
-
|
|
823
|
-
| Param | Type | Description |
|
|
824
|
-
| --- | --- | --- |
|
|
825
|
-
| string | <code>text</code> | title which can be shown in overlay of back side checkout page |
|
|
826
|
-
|
|
827
|
-
**Example**
|
|
828
|
-
|
|
829
|
-
```javascript
|
|
830
|
-
button.setBackdropTitle('Custom title');
|
|
831
|
-
```
|
|
832
|
-
<a name="cb_CheckoutButton+setSuspendedRedirectUri" id="cb_CheckoutButton+setSuspendedRedirectUri" href="#user-content-cb_CheckoutButton+setSuspendedRedirectUri"> </a>
|
|
833
|
-
|
|
834
|
-
### afterpayCheckoutButton.setSuspendedRedirectUri(string)
|
|
835
|
-
Method for setting suspended redirect uri. Redirect after referred checkout.
|
|
836
|
-
Only for 'contextual' mode.
|
|
837
|
-
|
|
838
|
-
**Kind**: instance method of [<code>AfterpayCheckoutButton</code>](#user-content-cb_AfterpayCheckoutButton)
|
|
839
|
-
**Overrides**: [<code>setSuspendedRedirectUri</code>](#user-content-cb_CheckoutButton+setSuspendedRedirectUri)
|
|
840
|
-
|
|
841
|
-
| Param | Type | Description |
|
|
842
|
-
| --- | --- | --- |
|
|
843
|
-
| string | <code>uri</code> | uri for redirect (by default) |
|
|
844
|
-
|
|
845
|
-
<a name="cb_CheckoutButton+setRedirectUrl" id="cb_CheckoutButton+setRedirectUrl" href="#user-content-cb_CheckoutButton+setRedirectUrl"> </a>
|
|
846
|
-
|
|
847
|
-
### afterpayCheckoutButton.setRedirectUrl(string)
|
|
848
|
-
Method for setting the merchant redirect URL.
|
|
849
|
-
Merchant's customers redirect after successfull checkout.
|
|
850
|
-
Only for 'redirect' mode.
|
|
851
|
-
|
|
852
|
-
**Kind**: instance method of [<code>AfterpayCheckoutButton</code>](#user-content-cb_AfterpayCheckoutButton)
|
|
853
|
-
**Overrides**: [<code>setRedirectUrl</code>](#user-content-cb_CheckoutButton+setRedirectUrl)
|
|
854
|
-
|
|
855
|
-
| Param | Type | Description |
|
|
856
|
-
| --- | --- | --- |
|
|
857
|
-
| string | <code>url</code> | redirect url |
|
|
858
|
-
|
|
859
|
-
<a name="cb_CheckoutButton+turnOffBackdrop" id="cb_CheckoutButton+turnOffBackdrop" href="#user-content-cb_CheckoutButton+turnOffBackdrop"> </a>
|
|
860
|
-
|
|
861
|
-
### afterpayCheckoutButton.turnOffBackdrop()
|
|
862
|
-
Method for disable backdrop on the page.
|
|
863
|
-
Only for 'contextual' mode.
|
|
864
|
-
|
|
865
|
-
**Kind**: instance method of [<code>AfterpayCheckoutButton</code>](#user-content-cb_AfterpayCheckoutButton)
|
|
866
|
-
**Overrides**: [<code>turnOffBackdrop</code>](#user-content-cb_CheckoutButton+turnOffBackdrop)
|
|
867
|
-
**Example**
|
|
868
|
-
|
|
869
499
|
```javascript
|
|
870
500
|
button.turnOffBackdrop();
|
|
871
501
|
```
|