@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
|
@@ -3,26 +3,46 @@
|
|
|
3
3
|
* @enum EVENT
|
|
4
4
|
*
|
|
5
5
|
* @type {object}
|
|
6
|
-
* @param {string}
|
|
7
|
-
* @param {string}
|
|
8
|
-
* @param {string}
|
|
9
|
-
* @param {string}
|
|
10
|
-
* @param {string} CHECKOUT_COMPLETED=checkoutCompleted
|
|
11
|
-
* @param {string} CHECKOUT_ERROR=checkoutError
|
|
6
|
+
* @param {string} IFRAME_LOADED=iframeLoaded Initial event sent when IFrame is initially loaded.
|
|
7
|
+
* @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).
|
|
8
|
+
* @param {string} CHECKOUT_POPUP_OPEN=checkoutPopupOpen Event sent when SRC Checkout flow is started, regardless of embedded or windowed mode.
|
|
9
|
+
* @param {string} CHECKOUT_POPUP_CLOSE=checkoutPopupClose Event sent when SRC Checkout flow is closed, regardless of embedded or windowed mode.
|
|
10
|
+
* @param {string} CHECKOUT_COMPLETED=checkoutCompleted Event sent on successful checkout by customer. Check [data](#EventDataCheckoutCompletedData) for more information.
|
|
11
|
+
* @param {string} CHECKOUT_ERROR=checkoutError Event sent on error checkout by customer. Check [data](#EventData) for more information.
|
|
12
12
|
*/
|
|
13
13
|
export var EVENT;
|
|
14
14
|
(function (EVENT) {
|
|
15
|
-
EVENT["CHECKOUT_BUTTON_LOADED"] = "checkoutButtonLoaded";
|
|
16
|
-
EVENT["CHECKOUT_BUTTON_CLICKED"] = "checkoutButtonClicked";
|
|
17
15
|
EVENT["IFRAME_LOADED"] = "iframeLoaded";
|
|
18
16
|
EVENT["CHECKOUT_READY"] = "checkoutReady";
|
|
19
17
|
EVENT["CHECKOUT_COMPLETED"] = "checkoutCompleted";
|
|
20
18
|
EVENT["CHECKOUT_ERROR"] = "checkoutError";
|
|
19
|
+
EVENT["CHECKOUT_POPUP_OPEN"] = "checkoutPopupOpen";
|
|
20
|
+
EVENT["CHECKOUT_POPUP_CLOSE"] = "checkoutPopupClose";
|
|
21
21
|
})(EVENT || (EVENT = {}));
|
|
22
|
+
;
|
|
23
|
+
/**
|
|
24
|
+
* List of available event data types
|
|
25
|
+
* @enum EVENT_DATA_TYPE
|
|
26
|
+
*
|
|
27
|
+
* @type {object}
|
|
28
|
+
* @param {string} CRITICAL_ERROR=CriticalError 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
|
|
29
|
+
* @param {string} USER_ERROR=UserError 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
|
|
30
|
+
* @param {string} SUCCESS=Success
|
|
31
|
+
*/
|
|
32
|
+
export var EVENT_DATA_TYPE;
|
|
33
|
+
(function (EVENT_DATA_TYPE) {
|
|
34
|
+
EVENT_DATA_TYPE["CRITICAL_ERROR"] = "CriticalError";
|
|
35
|
+
EVENT_DATA_TYPE["USER_ERROR"] = "UserError";
|
|
36
|
+
EVENT_DATA_TYPE["SUCCESS"] = "Success";
|
|
37
|
+
})(EVENT_DATA_TYPE || (EVENT_DATA_TYPE = {}));
|
|
38
|
+
;
|
|
39
|
+
;
|
|
22
40
|
export const STYLE = {
|
|
23
|
-
|
|
24
|
-
|
|
41
|
+
PRIMARY_BUTTON_COLOR: 'primary_button_color',
|
|
42
|
+
SECONDARY_BUTTON_COLOR: 'secondary_button_color',
|
|
43
|
+
PRIMARY_BUTTON_TEXT_COLOR: 'primary_button_text_color',
|
|
44
|
+
SECONDARY_BUTTON_TEXT_COLOR: 'secondary_button_text_color',
|
|
25
45
|
FONT_FAMILY: 'font_family',
|
|
26
|
-
|
|
46
|
+
ENABLE_SRC_POPUP: 'enable_src_popup',
|
|
27
47
|
};
|
|
28
48
|
//# sourceMappingURL=../../src/lib/secure-remote-commerce/interfaces.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../secure-remote-commerce/interfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,CAAN,IAAY,KAOX;AAPD,WAAY,KAAK;IACb,
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../secure-remote-commerce/interfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,CAAN,IAAY,KAOX;AAPD,WAAY,KAAK;IACb,uCAA8B,CAAA;IAC9B,yCAAgC,CAAA;IAChC,iDAAwC,CAAA;IACxC,yCAAgC,CAAA;IAChC,kDAAyC,CAAA;IACzC,oDAA2C,CAAA;AAC/C,CAAC,EAPW,KAAK,KAAL,KAAK,QAOhB;AAKA,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACvB,mDAAgC,CAAA;IAChC,2CAAwB,CAAA;IACxB,sCAAmB,CAAA;AACvB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B;AAAA,CAAC;AA2BD,CAAC;AAuFF,MAAM,CAAC,MAAM,KAAK,GAAG;IACjB,oBAAoB,EAAE,sBAAsB;IAC5C,sBAAsB,EAAE,wBAAwB;IAChD,yBAAyB,EAAE,2BAA2B;IACtD,2BAA2B,EAAE,6BAA6B;IAC1D,WAAW,EAAE,aAAa;IAC1B,gBAAgB,EAAE,kBAAkB;CACvC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IMastercardSRCMeta } from './interfaces';
|
|
2
|
+
import { SRC } from './secure-remote-commerce';
|
|
3
|
+
/**
|
|
4
|
+
* Class MastercardSRCClickToPay include methods for interacting with the MastercardSRC checkout and Manual Card option
|
|
5
|
+
*
|
|
6
|
+
* @extends SRC
|
|
7
|
+
*
|
|
8
|
+
* @constructor
|
|
9
|
+
*
|
|
10
|
+
* @param {string} iframe_selector - Selector of html element. Container for SRC checkout iFrame.
|
|
11
|
+
* @param {string} service_id - Card Scheme Service ID
|
|
12
|
+
* @param {string} public_key_or_access_token - Paydock public key or Access Token
|
|
13
|
+
* @param {IMastercardSRCMeta} meta - Data that configures the SRC checkout
|
|
14
|
+
* @example
|
|
15
|
+
* var mastercardSRC = new MastercardSRCClickToPay('#checkoutIframe', 'service_id', 'public_key', {});
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
declare class MastercardSRCClickToPay extends SRC {
|
|
19
|
+
protected iframe_selector: string;
|
|
20
|
+
protected service_id: string;
|
|
21
|
+
protected public_key_or_access_token: string;
|
|
22
|
+
protected meta: IMastercardSRCMeta;
|
|
23
|
+
constructor(iframe_selector: string, service_id: string, public_key_or_access_token: string, meta: IMastercardSRCMeta);
|
|
24
|
+
/**
|
|
25
|
+
* The final method after configuring the SRC to start the load process of SRC checkout
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
load(): void;
|
|
29
|
+
}
|
|
30
|
+
export { MastercardSRCClickToPay };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { MastercardSRC } from './providers/mastercard-src/mastercard-src';
|
|
2
|
+
import { SRC } from './secure-remote-commerce';
|
|
3
|
+
/**
|
|
4
|
+
* Class MastercardSRCClickToPay include methods for interacting with the MastercardSRC checkout and Manual Card option
|
|
5
|
+
*
|
|
6
|
+
* @extends SRC
|
|
7
|
+
*
|
|
8
|
+
* @constructor
|
|
9
|
+
*
|
|
10
|
+
* @param {string} iframe_selector - Selector of html element. Container for SRC checkout iFrame.
|
|
11
|
+
* @param {string} service_id - Card Scheme Service ID
|
|
12
|
+
* @param {string} public_key_or_access_token - Paydock public key or Access Token
|
|
13
|
+
* @param {IMastercardSRCMeta} meta - Data that configures the SRC checkout
|
|
14
|
+
* @example
|
|
15
|
+
* var mastercardSRC = new MastercardSRCClickToPay('#checkoutIframe', 'service_id', 'public_key', {});
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
class MastercardSRCClickToPay extends SRC {
|
|
19
|
+
constructor(iframe_selector, service_id, public_key_or_access_token, meta) {
|
|
20
|
+
super(iframe_selector, service_id, public_key_or_access_token, meta);
|
|
21
|
+
this.iframe_selector = iframe_selector;
|
|
22
|
+
this.service_id = service_id;
|
|
23
|
+
this.public_key_or_access_token = public_key_or_access_token;
|
|
24
|
+
this.meta = meta;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The final method after configuring the SRC to start the load process of SRC checkout
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
load() {
|
|
31
|
+
if (this.provider)
|
|
32
|
+
return;
|
|
33
|
+
this.meta.customizations = this.style;
|
|
34
|
+
this.provider = new MastercardSRC(this.iframe_selector, this.service_id, this.public_key_or_access_token, this.meta, this.eventEmitter, this.autoResize, this.env, this.alias);
|
|
35
|
+
this.provider.load();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export { MastercardSRCClickToPay };
|
|
39
|
+
//# sourceMappingURL=../../src/lib/secure-remote-commerce/mastercard-secure-remote-commerce.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mastercard-secure-remote-commerce.js","sourceRoot":"","sources":["../../secure-remote-commerce/mastercard-secure-remote-commerce.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C;;;;;;;;;;;;;;GAcG;AACH,MAAM,uBAAwB,SAAQ,GAAG;IACrC,YAAsB,eAAuB,EAAY,UAAkB,EAAY,0BAAkC,EAAY,IAAwB;QACzJ,KAAK,CAAC,eAAe,EAAE,UAAU,EAAE,0BAA0B,EAAE,IAAI,CAAC,CAAC;QADnD,oBAAe,GAAf,eAAe,CAAQ;QAAY,eAAU,GAAV,UAAU,CAAQ;QAAY,+BAA0B,GAA1B,0BAA0B,CAAQ;QAAY,SAAI,GAAJ,IAAI,CAAoB;IAE7J,CAAC;IAED;;;OAGG;IACI,IAAI;QACP,IAAI,IAAI,CAAC,QAAQ;YACb,OAAO;QAEX,IAAI,CAAC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC;QAEtC,IAAI,CAAC,QAAQ,GAAG,IAAI,aAAa,CAC7B,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,0BAA0B,EAC/B,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,GAAG,EACR,IAAI,CAAC,KAAK,CACb,CAAC;QAEF,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IACzB,CAAC;CACJ;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MastercardSRC } from './mastercard-src';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../secure-remote-commerce/providers/mastercard-src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -4,22 +4,19 @@ import { IFrame } from '../../../components/iframe';
|
|
|
4
4
|
import { IFrameEvent } from '../../../components/iframe-event';
|
|
5
5
|
import { EventEmitter } from "../../../helper/event-emitter";
|
|
6
6
|
import { SRCProvider } from '../src-provider';
|
|
7
|
-
import {
|
|
8
|
-
export declare class
|
|
9
|
-
protected meta:
|
|
7
|
+
import { IMastercardSRCMeta } from '../../interfaces';
|
|
8
|
+
export declare class MastercardSRC implements SRCProvider {
|
|
9
|
+
protected meta: IMastercardSRCMeta;
|
|
10
10
|
protected eventEmitter: EventEmitter;
|
|
11
11
|
protected autoResize: any;
|
|
12
12
|
protected link: Link;
|
|
13
13
|
protected iFrameContainer: Container;
|
|
14
|
-
protected buttonContainer: Container;
|
|
15
14
|
protected iFrame: IFrame;
|
|
16
15
|
protected iFrameEvent: IFrameEvent;
|
|
17
|
-
constructor(
|
|
16
|
+
constructor(iframe_selector: string, service_id: string, public_key: string, meta: IMastercardSRCMeta, eventEmitter: EventEmitter, autoResize: any, env: string, alias?: string);
|
|
18
17
|
private setupIFrameEvents;
|
|
19
18
|
load(): void;
|
|
20
19
|
getEnv(): string;
|
|
21
|
-
hideButton(_saveSize: boolean): void;
|
|
22
|
-
showButton(): void;
|
|
23
20
|
hideCheckout(saveSize: boolean): void;
|
|
24
21
|
showCheckout(): void;
|
|
25
22
|
reload(): void;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Link, MASTERCARD_SRC } from '../../../components/link';
|
|
2
|
+
import { Container } from '../../../components/container';
|
|
3
|
+
import { IFrame } from '../../../components/iframe';
|
|
4
|
+
import { IFrameEvent } from '../../../components/iframe-event';
|
|
5
|
+
import { EVENT } from '../../interfaces';
|
|
6
|
+
import { SDK } from '../../../configs/sdk';
|
|
7
|
+
export class MastercardSRC {
|
|
8
|
+
constructor(iframe_selector, service_id, public_key, meta, eventEmitter, autoResize, env, alias) {
|
|
9
|
+
this.meta = meta;
|
|
10
|
+
this.eventEmitter = eventEmitter;
|
|
11
|
+
this.autoResize = autoResize;
|
|
12
|
+
this.link = new Link(MASTERCARD_SRC);
|
|
13
|
+
this.link.setParams(Object.assign({ service_id, public_key }, meta && { meta: JSON.stringify(meta) }));
|
|
14
|
+
if (SDK.version) {
|
|
15
|
+
this.link.setParams({
|
|
16
|
+
sdk_version: SDK.version,
|
|
17
|
+
sdk_type: SDK.type,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
if (env)
|
|
21
|
+
this.link.setEnv(env, alias);
|
|
22
|
+
this.iFrameContainer = new Container(iframe_selector);
|
|
23
|
+
this.iFrame = new IFrame(this.iFrameContainer);
|
|
24
|
+
this.iFrameEvent = new IFrameEvent(window);
|
|
25
|
+
this.setupIFrameEvents();
|
|
26
|
+
}
|
|
27
|
+
setupIFrameEvents() {
|
|
28
|
+
const widgetId = this.link.getParams().widget_id;
|
|
29
|
+
if (!widgetId)
|
|
30
|
+
return;
|
|
31
|
+
this.iFrameEvent.on(EVENT.CHECKOUT_READY, widgetId, ({ data }) => {
|
|
32
|
+
this.eventEmitter.emit(EVENT.CHECKOUT_READY, data);
|
|
33
|
+
});
|
|
34
|
+
this.iFrameEvent.on(EVENT.CHECKOUT_COMPLETED, widgetId, ({ data }) => {
|
|
35
|
+
this.eventEmitter.emit(EVENT.CHECKOUT_COMPLETED, data);
|
|
36
|
+
});
|
|
37
|
+
this.iFrameEvent.on(EVENT.CHECKOUT_POPUP_OPEN, widgetId, ({ data }) => {
|
|
38
|
+
this.eventEmitter.emit(EVENT.CHECKOUT_POPUP_OPEN, data);
|
|
39
|
+
});
|
|
40
|
+
this.iFrameEvent.on(EVENT.CHECKOUT_POPUP_CLOSE, widgetId, ({ data }) => {
|
|
41
|
+
this.eventEmitter.emit(EVENT.CHECKOUT_POPUP_CLOSE, data);
|
|
42
|
+
});
|
|
43
|
+
this.iFrameEvent.on(EVENT.CHECKOUT_ERROR, widgetId, ({ data }) => {
|
|
44
|
+
this.eventEmitter.emit(EVENT.CHECKOUT_ERROR, data);
|
|
45
|
+
});
|
|
46
|
+
if (this.autoResize)
|
|
47
|
+
this.useAutoResize(true);
|
|
48
|
+
}
|
|
49
|
+
load() {
|
|
50
|
+
this.iFrame.load(this.link.getUrl(), { title: 'Mastercard SRC checkout' });
|
|
51
|
+
const iframeElement = this.iFrame.getElement();
|
|
52
|
+
if (iframeElement)
|
|
53
|
+
iframeElement.onload = () => this.eventEmitter.emit(EVENT.IFRAME_LOADED, {});
|
|
54
|
+
}
|
|
55
|
+
getEnv() {
|
|
56
|
+
return this.link.getEnv();
|
|
57
|
+
}
|
|
58
|
+
hideCheckout(saveSize) {
|
|
59
|
+
if (this.iFrame)
|
|
60
|
+
this.iFrame.hide();
|
|
61
|
+
}
|
|
62
|
+
showCheckout() {
|
|
63
|
+
if (this.iFrame)
|
|
64
|
+
this.iFrame.show();
|
|
65
|
+
}
|
|
66
|
+
reload() {
|
|
67
|
+
this.iFrame.remove();
|
|
68
|
+
this.load();
|
|
69
|
+
}
|
|
70
|
+
useAutoResize(force) {
|
|
71
|
+
if (this.autoResize && !force)
|
|
72
|
+
return;
|
|
73
|
+
this.autoResize = true;
|
|
74
|
+
const params = this.link.getParams();
|
|
75
|
+
if (!(params === null || params === void 0 ? void 0 : params.widget_id))
|
|
76
|
+
return;
|
|
77
|
+
this.iFrameEvent.on('resize', params.widget_id, ({ data }) => {
|
|
78
|
+
var _a, _b;
|
|
79
|
+
const iframeElement = this.iFrame.getElement();
|
|
80
|
+
if (iframeElement) {
|
|
81
|
+
iframeElement.scrolling = 'no';
|
|
82
|
+
if ((_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.height)
|
|
83
|
+
this.iFrame.setStyle('height', ((_b = data === null || data === void 0 ? void 0 : data.data) === null || _b === void 0 ? void 0 : _b.height) + 'px');
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=../../../../src/lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mastercard-src.js","sourceRoot":"","sources":["../../../../secure-remote-commerce/providers/mastercard-src/mastercard-src.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAc,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAG3E,OAAO,EAAE,KAAK,EAAsB,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAE3C,MAAM,OAAO,aAAa;IAMtB,YAAY,eAAuB,EAAE,UAAkB,EAAE,UAAkB,EAAY,IAAwB,EAAY,YAA0B,EAAY,UAAU,EAAE,GAAW,EAAE,KAAc;QAAjH,SAAI,GAAJ,IAAI,CAAoB;QAAY,iBAAY,GAAZ,YAAY,CAAc;QAAY,eAAU,GAAV,UAAU,CAAA;QACvK,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC;QACrC,IAAI,CAAC,IAAI,CAAC,SAAS,iBAAG,UAAU,EAAE,UAAU,IAAK,IAAI,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,EAAG,CAAC;QAE3F,IAAI,GAAG,CAAC,OAAO,EAAE;YACb,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;gBAChB,WAAW,EAAE,GAAG,CAAC,OAAO;gBACxB,QAAQ,EAAE,GAAG,CAAC,IAAI;aACrB,CAAC,CAAC;SACN;QAED,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ChB,CAAC;IAEM,aAAa,CAAC,KAAe;QAChC,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,KAAK;YACzB,OAAO;QACX,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QAEvB,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;QACrC,IAAI,EAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,CAAA;YAClB,OAAO;QAEX,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAc,EAAE,EAAE;;YACrE,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;YAC/C,IAAI,aAAa,EAAE;gBACf,aAAa,CAAC,SAAS,GAAG,IAAI,CAAC;gBAC/B,UAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,0CAAE,MAAM;oBAClB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,0CAAE,MAAM,IAAG,IAAI,CAAC,CAAC;aACjE;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
|
|
@@ -1,99 +1,36 @@
|
|
|
1
|
-
import { EventEmitter } from
|
|
1
|
+
import { EventEmitter } from '../helper/event-emitter';
|
|
2
2
|
import { ApiInternal } from '../api/api-internal';
|
|
3
3
|
import { SRCProvider } from './providers/src-provider';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
* Interface of data used for the Visa Checkout.
|
|
7
|
-
* @interface IVisaSRCMeta
|
|
8
|
-
*
|
|
9
|
-
* @type {object}
|
|
10
|
-
* @param {string} [srci_transaction_id] Used to identify the SRC Id.
|
|
11
|
-
* @param {object} [dpa_data] Object where the DPA creation data is stored.
|
|
12
|
-
* @param {string} [dpa_data.dpa_presentation_name] Name in which the DPA is presented in.
|
|
13
|
-
* @param {string} [dpa_data.dpa_uri] Used for indicating the DPA URI.
|
|
14
|
-
* @param {object} [dpa_transaction_options] Object that stores options for creating a trasaction with DPA.
|
|
15
|
-
* @param {string} [dpa_transaction_options.dpa_locale] DPA’s preferred locale, example en_US.
|
|
16
|
-
* @param {Array} [dpa_transaction_options.dpa_accepted_billing_countries] Used to indicate list of accepted billing countries for DPA.
|
|
17
|
-
* @param {Array} [dpa_transaction_options.dpa_accepted_shipping_countries] Used to indicate list of accepted shipping countries for DPA.
|
|
18
|
-
* @param {string} [dpa_transaction_options.dpa_billing_preference] Used for listing the enumeration for billing preferences for DPA. Options are 'ALL', 'POSTAL_COUNTRY' and 'NONE'.
|
|
19
|
-
* @param {string} [dpa_transaction_options.dpa_shipping_preference] Used for listing the enumeration for shipping preferences for DPA. Options are 'ALL', 'POSTAL_COUNTRY' and 'NONE'.
|
|
20
|
-
* @param {boolean} [dpa_transaction_options.consumer_name_requested] Used to check if the name of the consumer is needed.
|
|
21
|
-
* @param {boolean} [dpa_transaction_options.consumer_email_address_requested] Used to check if the email of the consumer is needed.
|
|
22
|
-
* @param {boolean} [dpa_transaction_options.consumer_phone_number_requested] Used to check if the phone number of the consumer is needed.
|
|
23
|
-
* @param {object} [dpa_transaction_options.payment_options] Object used to check the payment options that are included.
|
|
24
|
-
* @param {number} [dpa_transaction_options.payment_options.dpa_dynamic_data_ttl_minutes] The minimum requested validity period for the transaction credentials.
|
|
25
|
-
* @param {string} [dpa_transaction_options.payment_options.dynamic_data_type] Used for listing the enumeration for dynamic data types. Options are 'TAVV' and 'DTVV'.
|
|
26
|
-
* @param {boolean} [dpa_transaction_options.payment_options.dpa_pan_requested] Used to check if PAN number was requested.
|
|
27
|
-
* @param {string} [dpa_transaction_options.review_action] Used for listing the enumeration of review actions. Options are 'pay' and 'continue'.
|
|
28
|
-
* @param {string} [dpa_transaction_options.checkout_description] Used for indicating the description of the checkout.
|
|
29
|
-
* @param {string} [dpa_transaction_options.transaction_type] Used for listing the enumeration of the type of the transaction. 'PURCHASE', 'BILL_PAYMENT' and 'MONEY_TRANSFER'
|
|
30
|
-
* @param {string} [dpa_transaction_options.order_type] Used for listing the enumeration of the type of the order. Options are 'REAUTHORIZATION', 'RECURRING' and 'INSTALLMENT'.
|
|
31
|
-
* @param {object} [dpa_transaction_options.transaction_amount] Object used to describe the details of the transaction.
|
|
32
|
-
* @param {number} [dpa_transaction_options.transaction_amount.transaction_amount] Used to indicate the amount of the transaction.
|
|
33
|
-
* @param {string} [dpa_transaction_options.transaction_amount.transaction_currency_code] Used to indicate the currency code of the transaction. 3 letter ISO code format.
|
|
34
|
-
* @param {string} [dpa_transaction_options.merchant_order_id] Used to indicate the merchants order Id.
|
|
35
|
-
* @param {string} [dpa_transaction_options.merchant_category_code] Used to indicate the merchants category code.
|
|
36
|
-
* @param {string} [dpa_transaction_options.merchant_country_code] Used to indicate the merchants country code. 2 letter ISO code format.
|
|
37
|
-
* @param {object} [customer] Object where the customer data is stored to prefill in the checkout.
|
|
38
|
-
* @param {string} [customer.email] Customer email.
|
|
39
|
-
* @param {string} [customer.first_name] Customer first name.
|
|
40
|
-
* @param {string} [customer.last_name] Customer last name.
|
|
41
|
-
* @param {object} [customer.phone] Object where the customer phone is stored.
|
|
42
|
-
* @param {string} [customer.phone.country_code] Customer phone country code (example "1" for US).
|
|
43
|
-
* @param {string} [customer.phone.phone] Customer phone number.
|
|
44
|
-
* @param {object} [customer.payment_source] Object where the customer billing address data is stored.
|
|
45
|
-
* @param {string} [customer.payment_source.address_line1] Customer billing address line 1.
|
|
46
|
-
* @param {string} [customer.payment_source.address_line2] Customer billing address line 2.
|
|
47
|
-
* @param {string} [customer.payment_source.address_city] Customer billing address city.
|
|
48
|
-
* @param {string} [customer.payment_source.address_postcode] Customer billing address postcode.
|
|
49
|
-
* @param {string} [customer.payment_source.address_state] Customer billing address state code (if applicable for the country, example "FL" for Florida).
|
|
50
|
-
* @param {string} [customer.payment_source.address_country] Customer billing address country code (example "US").
|
|
51
|
-
*/
|
|
52
|
-
/**
|
|
53
|
-
* Class SRC include methods for interacting with different secure remote commerce options such as Visa SRC
|
|
54
|
-
* @constructor
|
|
55
|
-
*
|
|
56
|
-
* @param {string} button_selector - Selector of html element. Container for SRC checkout button.
|
|
57
|
-
* @param {string} iframe_selector - Selector of html element. Container for SRC checkout iFrame.
|
|
58
|
-
* @param {string} service_id - Card Scheme Service ID
|
|
59
|
-
* @param {string} public_key_or_access_token - Paydock public key or Access Token
|
|
60
|
-
* @param {IVisaSRCMeta} meta - Data that configures the SRC checkout
|
|
61
|
-
* @example
|
|
62
|
-
* var SRC = new SRC('#checkoutButton', '#checkoutIframe', 'service_id', 'public_key', {});
|
|
63
|
-
*
|
|
64
|
-
*/
|
|
65
|
-
declare class SRC {
|
|
66
|
-
protected button_selector: string;
|
|
4
|
+
import { IStyles, IMastercardSRCMeta } from './interfaces';
|
|
5
|
+
declare abstract class SRC {
|
|
67
6
|
protected iframe_selector: string;
|
|
68
7
|
protected service_id: string;
|
|
69
8
|
protected public_key_or_access_token: string;
|
|
70
|
-
protected meta:
|
|
9
|
+
protected meta: IMastercardSRCMeta;
|
|
71
10
|
protected eventEmitter: EventEmitter;
|
|
72
11
|
protected env: string;
|
|
73
|
-
protected alias
|
|
12
|
+
protected alias?: string;
|
|
74
13
|
protected api: ApiInternal;
|
|
75
14
|
protected provider: SRCProvider;
|
|
76
15
|
protected autoResize: boolean;
|
|
77
16
|
protected style: IStyles;
|
|
78
|
-
constructor(
|
|
17
|
+
constructor(iframe_selector: string, service_id: string, public_key_or_access_token: string, meta: IMastercardSRCMeta);
|
|
79
18
|
/**
|
|
80
19
|
* Object contain styles for widget - call before `.load()`.
|
|
81
20
|
*
|
|
82
21
|
* @example
|
|
83
22
|
* widget.setStyles({
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
23
|
+
* enable_src_popup: true
|
|
24
|
+
* primary_button_color: 'red',
|
|
25
|
+
* secondary_button_color: 'blue',
|
|
26
|
+
* primary_button_text_color: 'white',
|
|
27
|
+
* secondary_button_text_color: 'white',
|
|
28
|
+
* font_family: 'Arial',
|
|
29
|
+
* });
|
|
89
30
|
* @param {IStyles} fields - name of styles which can be shown in widget [STYLE]{@link STYLE}
|
|
90
31
|
*/
|
|
91
32
|
setStyles(styles: IStyles): void;
|
|
92
33
|
private setStyle;
|
|
93
|
-
/**
|
|
94
|
-
* The final method after configuring the SRC to start the load process of SRC checkout
|
|
95
|
-
*
|
|
96
|
-
*/
|
|
97
34
|
load(): void;
|
|
98
35
|
/**
|
|
99
36
|
* Current method can change environment. By default environment = sandbox.
|
|
@@ -114,21 +51,6 @@ declare class SRC {
|
|
|
114
51
|
getEnv(): string;
|
|
115
52
|
on(eventName: string): Promise<any>;
|
|
116
53
|
on(eventName: string, cb: (data: any) => void): any;
|
|
117
|
-
/**
|
|
118
|
-
* Using this method you can hide button
|
|
119
|
-
* @param {boolean} [saveSize=false] - using this param you can save iframe's size (if applicable)
|
|
120
|
-
*
|
|
121
|
-
* @example
|
|
122
|
-
* SRC.hideButton();
|
|
123
|
-
*/
|
|
124
|
-
hideButton(saveSize: boolean): void;
|
|
125
|
-
/**
|
|
126
|
-
* Using this method you can show the SRC button after using hideButton method
|
|
127
|
-
*
|
|
128
|
-
* @example
|
|
129
|
-
* SRC.showButton();
|
|
130
|
-
*/
|
|
131
|
-
showButton(): void;
|
|
132
54
|
/**
|
|
133
55
|
* Using this method you can hide checkout after load and button click
|
|
134
56
|
* @param {boolean} [saveSize=false] - using this param you can save iframe's size (if applicable)
|
|
@@ -1,73 +1,12 @@
|
|
|
1
1
|
import { API_AUTH_TYPE } from '../api/api-base';
|
|
2
2
|
import { CARD_SCHEME_SERVICE } from '../api/api-service-internal';
|
|
3
|
-
import { EventEmitter } from
|
|
4
|
-
import {
|
|
3
|
+
import { EventEmitter } from '../helper/event-emitter';
|
|
4
|
+
import { MastercardSRC } from './providers/mastercard-src';
|
|
5
5
|
import { ApiInternal } from '../api/api-internal';
|
|
6
6
|
import { STYLE } from './interfaces';
|
|
7
|
-
import { ObjectHelper } from
|
|
8
|
-
/**
|
|
9
|
-
* Interface of data used for the Visa Checkout.
|
|
10
|
-
* @interface IVisaSRCMeta
|
|
11
|
-
*
|
|
12
|
-
* @type {object}
|
|
13
|
-
* @param {string} [srci_transaction_id] Used to identify the SRC Id.
|
|
14
|
-
* @param {object} [dpa_data] Object where the DPA creation data is stored.
|
|
15
|
-
* @param {string} [dpa_data.dpa_presentation_name] Name in which the DPA is presented in.
|
|
16
|
-
* @param {string} [dpa_data.dpa_uri] Used for indicating the DPA URI.
|
|
17
|
-
* @param {object} [dpa_transaction_options] Object that stores options for creating a trasaction with DPA.
|
|
18
|
-
* @param {string} [dpa_transaction_options.dpa_locale] DPA’s preferred locale, example en_US.
|
|
19
|
-
* @param {Array} [dpa_transaction_options.dpa_accepted_billing_countries] Used to indicate list of accepted billing countries for DPA.
|
|
20
|
-
* @param {Array} [dpa_transaction_options.dpa_accepted_shipping_countries] Used to indicate list of accepted shipping countries for DPA.
|
|
21
|
-
* @param {string} [dpa_transaction_options.dpa_billing_preference] Used for listing the enumeration for billing preferences for DPA. Options are 'ALL', 'POSTAL_COUNTRY' and 'NONE'.
|
|
22
|
-
* @param {string} [dpa_transaction_options.dpa_shipping_preference] Used for listing the enumeration for shipping preferences for DPA. Options are 'ALL', 'POSTAL_COUNTRY' and 'NONE'.
|
|
23
|
-
* @param {boolean} [dpa_transaction_options.consumer_name_requested] Used to check if the name of the consumer is needed.
|
|
24
|
-
* @param {boolean} [dpa_transaction_options.consumer_email_address_requested] Used to check if the email of the consumer is needed.
|
|
25
|
-
* @param {boolean} [dpa_transaction_options.consumer_phone_number_requested] Used to check if the phone number of the consumer is needed.
|
|
26
|
-
* @param {object} [dpa_transaction_options.payment_options] Object used to check the payment options that are included.
|
|
27
|
-
* @param {number} [dpa_transaction_options.payment_options.dpa_dynamic_data_ttl_minutes] The minimum requested validity period for the transaction credentials.
|
|
28
|
-
* @param {string} [dpa_transaction_options.payment_options.dynamic_data_type] Used for listing the enumeration for dynamic data types. Options are 'TAVV' and 'DTVV'.
|
|
29
|
-
* @param {boolean} [dpa_transaction_options.payment_options.dpa_pan_requested] Used to check if PAN number was requested.
|
|
30
|
-
* @param {string} [dpa_transaction_options.review_action] Used for listing the enumeration of review actions. Options are 'pay' and 'continue'.
|
|
31
|
-
* @param {string} [dpa_transaction_options.checkout_description] Used for indicating the description of the checkout.
|
|
32
|
-
* @param {string} [dpa_transaction_options.transaction_type] Used for listing the enumeration of the type of the transaction. 'PURCHASE', 'BILL_PAYMENT' and 'MONEY_TRANSFER'
|
|
33
|
-
* @param {string} [dpa_transaction_options.order_type] Used for listing the enumeration of the type of the order. Options are 'REAUTHORIZATION', 'RECURRING' and 'INSTALLMENT'.
|
|
34
|
-
* @param {object} [dpa_transaction_options.transaction_amount] Object used to describe the details of the transaction.
|
|
35
|
-
* @param {number} [dpa_transaction_options.transaction_amount.transaction_amount] Used to indicate the amount of the transaction.
|
|
36
|
-
* @param {string} [dpa_transaction_options.transaction_amount.transaction_currency_code] Used to indicate the currency code of the transaction. 3 letter ISO code format.
|
|
37
|
-
* @param {string} [dpa_transaction_options.merchant_order_id] Used to indicate the merchants order Id.
|
|
38
|
-
* @param {string} [dpa_transaction_options.merchant_category_code] Used to indicate the merchants category code.
|
|
39
|
-
* @param {string} [dpa_transaction_options.merchant_country_code] Used to indicate the merchants country code. 2 letter ISO code format.
|
|
40
|
-
* @param {object} [customer] Object where the customer data is stored to prefill in the checkout.
|
|
41
|
-
* @param {string} [customer.email] Customer email.
|
|
42
|
-
* @param {string} [customer.first_name] Customer first name.
|
|
43
|
-
* @param {string} [customer.last_name] Customer last name.
|
|
44
|
-
* @param {object} [customer.phone] Object where the customer phone is stored.
|
|
45
|
-
* @param {string} [customer.phone.country_code] Customer phone country code (example "1" for US).
|
|
46
|
-
* @param {string} [customer.phone.phone] Customer phone number.
|
|
47
|
-
* @param {object} [customer.payment_source] Object where the customer billing address data is stored.
|
|
48
|
-
* @param {string} [customer.payment_source.address_line1] Customer billing address line 1.
|
|
49
|
-
* @param {string} [customer.payment_source.address_line2] Customer billing address line 2.
|
|
50
|
-
* @param {string} [customer.payment_source.address_city] Customer billing address city.
|
|
51
|
-
* @param {string} [customer.payment_source.address_postcode] Customer billing address postcode.
|
|
52
|
-
* @param {string} [customer.payment_source.address_state] Customer billing address state code (if applicable for the country, example "FL" for Florida).
|
|
53
|
-
* @param {string} [customer.payment_source.address_country] Customer billing address country code (example "US").
|
|
54
|
-
*/
|
|
55
|
-
/**
|
|
56
|
-
* Class SRC include methods for interacting with different secure remote commerce options such as Visa SRC
|
|
57
|
-
* @constructor
|
|
58
|
-
*
|
|
59
|
-
* @param {string} button_selector - Selector of html element. Container for SRC checkout button.
|
|
60
|
-
* @param {string} iframe_selector - Selector of html element. Container for SRC checkout iFrame.
|
|
61
|
-
* @param {string} service_id - Card Scheme Service ID
|
|
62
|
-
* @param {string} public_key_or_access_token - Paydock public key or Access Token
|
|
63
|
-
* @param {IVisaSRCMeta} meta - Data that configures the SRC checkout
|
|
64
|
-
* @example
|
|
65
|
-
* var SRC = new SRC('#checkoutButton', '#checkoutIframe', 'service_id', 'public_key', {});
|
|
66
|
-
*
|
|
67
|
-
*/
|
|
7
|
+
import { ObjectHelper } from '../helper/object';
|
|
68
8
|
class SRC {
|
|
69
|
-
constructor(
|
|
70
|
-
this.button_selector = button_selector;
|
|
9
|
+
constructor(iframe_selector, service_id, public_key_or_access_token, meta) {
|
|
71
10
|
this.iframe_selector = iframe_selector;
|
|
72
11
|
this.service_id = service_id;
|
|
73
12
|
this.public_key_or_access_token = public_key_or_access_token;
|
|
@@ -82,11 +21,13 @@ class SRC {
|
|
|
82
21
|
*
|
|
83
22
|
* @example
|
|
84
23
|
* widget.setStyles({
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
24
|
+
* enable_src_popup: true
|
|
25
|
+
* primary_button_color: 'red',
|
|
26
|
+
* secondary_button_color: 'blue',
|
|
27
|
+
* primary_button_text_color: 'white',
|
|
28
|
+
* secondary_button_text_color: 'white',
|
|
29
|
+
* font_family: 'Arial',
|
|
30
|
+
* });
|
|
90
31
|
* @param {IStyles} fields - name of styles which can be shown in widget [STYLE]{@link STYLE}
|
|
91
32
|
*/
|
|
92
33
|
setStyles(styles) {
|
|
@@ -101,18 +42,14 @@ class SRC {
|
|
|
101
42
|
else
|
|
102
43
|
console.warn(`Widget::setStyle[s: unsupported style param ${param}`);
|
|
103
44
|
}
|
|
104
|
-
/**
|
|
105
|
-
* The final method after configuring the SRC to start the load process of SRC checkout
|
|
106
|
-
*
|
|
107
|
-
*/
|
|
108
45
|
load() {
|
|
109
46
|
if (this.provider)
|
|
110
47
|
return;
|
|
111
48
|
this.api.service().getConfig(this.service_id).then(({ type }) => {
|
|
112
49
|
this.meta.customizations = this.style; // assign the style on the start of the widget
|
|
113
50
|
switch (type) {
|
|
114
|
-
case CARD_SCHEME_SERVICE.
|
|
115
|
-
this.provider = new
|
|
51
|
+
case CARD_SCHEME_SERVICE.MASTERCARD_SRC:
|
|
52
|
+
this.provider = new MastercardSRC(this.iframe_selector, this.service_id, this.public_key_or_access_token, this.meta, this.eventEmitter, this.autoResize, this.env, this.alias);
|
|
116
53
|
break;
|
|
117
54
|
}
|
|
118
55
|
;
|
|
@@ -160,8 +97,9 @@ class SRC {
|
|
|
160
97
|
* SRC.on('checkoutCompleted').then(function (token) {
|
|
161
98
|
* console.log(token);
|
|
162
99
|
* });
|
|
100
|
+
*
|
|
163
101
|
* @param {string} eventName - Available event names [EVENT]{@link EVENT}
|
|
164
|
-
* @param {listener} [cb]
|
|
102
|
+
* @param {listener} [cb] - The callback to handle the event. When available, it will send back data of type [EventData]{@link EventData}
|
|
165
103
|
* @return {Promise<any> | void}
|
|
166
104
|
*/
|
|
167
105
|
on(eventName, cb) {
|
|
@@ -169,27 +107,6 @@ class SRC {
|
|
|
169
107
|
return this.eventEmitter.subscribe(eventName, cb);
|
|
170
108
|
return new Promise((resolve) => this.eventEmitter.subscribe(eventName, (res) => resolve(res)));
|
|
171
109
|
}
|
|
172
|
-
/**
|
|
173
|
-
* Using this method you can hide button
|
|
174
|
-
* @param {boolean} [saveSize=false] - using this param you can save iframe's size (if applicable)
|
|
175
|
-
*
|
|
176
|
-
* @example
|
|
177
|
-
* SRC.hideButton();
|
|
178
|
-
*/
|
|
179
|
-
hideButton(saveSize) {
|
|
180
|
-
if (this.provider && typeof this.provider.hideButton === 'function')
|
|
181
|
-
this.provider.hideButton(saveSize);
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Using this method you can show the SRC button after using hideButton method
|
|
185
|
-
*
|
|
186
|
-
* @example
|
|
187
|
-
* SRC.showButton();
|
|
188
|
-
*/
|
|
189
|
-
showButton() {
|
|
190
|
-
if (this.provider && typeof this.provider.showButton === 'function')
|
|
191
|
-
this.provider.showButton();
|
|
192
|
-
}
|
|
193
110
|
/**
|
|
194
111
|
* Using this method you can hide checkout after load and button click
|
|
195
112
|
* @param {boolean} [saveSize=false] - using this param you can save iframe's size (if applicable)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secure-remote-commerce.js","sourceRoot":"","sources":["../../secure-remote-commerce/secure-remote-commerce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"secure-remote-commerce.js","sourceRoot":"","sources":["../../secure-remote-commerce/secure-remote-commerce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,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AAU;YACxB,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QAEtD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACnG,CAAC;IAED;;;;;;OAMG;IACI,YAAY,CAAC,QAAiB;QACjC,IAAI,IAAI,CAAC,QAAQ,IAAI,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,KAAK,UAAU;YACjE,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAED;;;;;OAKG;IACI,YAAY;QACf,IAAI,IAAI,CAAC,QAAQ,IAAI,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,KAAK,UAAU;YACjE,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC;IACrC,CAAC;IAED;;;;;OAKG;IACI,MAAM;QACT,IAAI,IAAI,CAAC,QAAQ;YACb,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;IAC/B,CAAC;IAED;;;;;;OAMG;IACI,aAAa;QAChB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,IAAI,IAAI,CAAC,QAAQ,IAAI,OAAO,IAAI,CAAC,QAAQ,CAAC,aAAa,KAAK,UAAU;YAClE,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC;IACtC,CAAC;CACJ;AAED,OAAO,EAAE,GAAG,EAAE,CAAC"}
|
|
@@ -176,7 +176,7 @@ export class FlypayV2WalletService extends WalletService {
|
|
|
176
176
|
this.checkout = new Checkout(Object.assign(Object.assign({ orderId }, ((this.accessToken || this.refreshToken) && {
|
|
177
177
|
auth: Object.assign(Object.assign({}, (this.accessToken && { access_token: this.accessToken })), (this.refreshToken && { refresh_token: this.refreshToken })),
|
|
178
178
|
mode: "express",
|
|
179
|
-
})), { clientId: ((_a = this.meta) === null || _a === void 0 ? void 0 : _a.gateway_mode) === 'live' ? 'dbbd114e-3583-4db5-915e-59f1b3dcd08b' : '924ac1ce-00f4-44e4-8277-06cae751ef1a', url: ((_b = this.meta) === null || _b === void 0 ? void 0 : _b.gateway_mode) === 'live' ? 'https://checkout.
|
|
179
|
+
})), { clientId: ((_a = this.meta) === null || _a === void 0 ? void 0 : _a.gateway_mode) === 'live' ? 'dbbd114e-3583-4db5-915e-59f1b3dcd08b' : '924ac1ce-00f4-44e4-8277-06cae751ef1a', url: ((_b = this.meta) === null || _b === void 0 ? void 0 : _b.gateway_mode) === 'live' ? 'https://checkout.beem.com.au' : 'https://release.checkout.beem.com.au', onCheckoutClosed: () => {
|
|
180
180
|
const button = document.getElementById('flypay-v2-button');
|
|
181
181
|
if (button)
|
|
182
182
|
button.disabled = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flypay-v2.wallet-service.js","sourceRoot":"","sources":["../../wallet-buttons/flypay-v2.wallet-service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAE9D,OAAO,EAAsC,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACnG,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,OAAO,qBAAsB,SAAQ,aAAa;IAOpD,YAAY,SAAiB,EAAE,IAAwB;QACnD,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QA2CnB,0BAAqB,GAAG,GAAS,EAAE;YACvC,MAAM,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;YAClE,MAAM,MAAM,GAAG,QAAQ,CAAC,cAAc,CAAC,kBAAkB,CAAsB,CAAC;YAChF,IAAI,MAAM;gBAAE,MAAM,CAAC,QAAQ,GAAG,IAAI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