@paydock/client-sdk 1.104.3-beta → 1.104.7-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 +729 -405
- package/bundles/index.cjs +29624 -8753
- package/bundles/index.cjs.d.ts +484 -381
- package/bundles/index.cjs.map +1 -1
- package/bundles/index.mjs +29624 -8753
- package/bundles/index.mjs.d.ts +484 -381
- package/bundles/index.mjs.map +1 -1
- package/bundles/types/api/api-base.d.ts +14 -6
- package/bundles/types/api/api-base.d.ts.map +1 -1
- package/bundles/types/api/api-service-internal.d.ts +2 -1
- package/bundles/types/api/api-service-internal.d.ts.map +1 -1
- package/bundles/types/api/api.d.ts +1 -1
- package/bundles/types/api/api.d.ts.map +1 -1
- package/bundles/types/canvas-3ds/canvas-3ds.d.ts +1 -1
- package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +1 -1
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts +3 -3
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +1 -1
- package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts +1 -1
- package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +1 -1
- package/bundles/types/checkout-button/checkout-button.d.ts +1 -1
- package/bundles/types/checkout-button/checkout-button.d.ts.map +1 -1
- package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts +1 -1
- package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +1 -1
- package/bundles/types/checkout-button/runner/popup.runner.d.ts +1 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +1 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +1 -1
- package/bundles/types/components/container.d.ts +1 -0
- package/bundles/types/components/container.d.ts.map +1 -1
- package/bundles/types/components/http-core.d.ts.map +1 -1
- package/bundles/types/components/iframe-event.d.ts +17 -11
- package/bundles/types/components/iframe-event.d.ts.map +1 -1
- package/bundles/types/components/link.d.ts +3 -2
- package/bundles/types/components/link.d.ts.map +1 -1
- package/bundles/types/components/param.d.ts +6 -8
- package/bundles/types/components/param.d.ts.map +1 -1
- package/bundles/types/components/wallet-background.d.ts +2 -1
- package/bundles/types/components/wallet-background.d.ts.map +1 -1
- package/bundles/types/configs/env/environment.cba.d.ts +1 -1
- package/bundles/types/configs/env/environment.cba.d.ts.map +1 -1
- package/bundles/types/configs/env/environment.paydock.d.ts +1 -1
- package/bundles/types/configs/env/environment.paydock.d.ts.map +1 -1
- package/bundles/types/constants/validators.d.ts +45 -0
- package/bundles/types/constants/validators.d.ts.map +1 -0
- package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts +17 -13
- package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +1 -1
- package/bundles/types/payment-source-widget/payment-source-widget.d.ts +1 -1
- package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/index.d.ts +102 -1
- package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/interfaces.d.ts +109 -32
- package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts +31 -0
- package/bundles/types/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts.map +1 -0
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts +2 -0
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts.map +1 -0
- package/bundles/types/secure-remote-commerce/providers/{visa-src/visa-src.d.ts → mastercard-src/mastercard-src.d.ts} +5 -8
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts.map +1 -0
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts +13 -91
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +1 -1
- package/bundles/types/shared/http/http-request.d.ts +14 -0
- package/bundles/types/shared/http/http-request.d.ts.map +1 -0
- package/bundles/types/shared/http/index.d.ts +2 -0
- package/bundles/types/shared/http/index.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.agent.d.ts +15 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.agent.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.config.d.ts +66 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.config.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts +14 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/action.repository.d.ts +15 -0
- package/bundles/types/shared/services/instrumentation/repositories/action.repository.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/error.repository.d.ts +23 -0
- package/bundles/types/shared/services/instrumentation/repositories/error.repository.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/event.repository.d.ts +15 -0
- package/bundles/types/shared/services/instrumentation/repositories/event.repository.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/index.d.ts +4 -0
- package/bundles/types/shared/services/instrumentation/repositories/index.d.ts.map +1 -0
- package/bundles/types/vault-display-widget/vault-display-widget.d.ts +1 -1
- package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/apple.wallet-service.d.ts +2 -0
- package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts +8 -1
- package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/google.wallet-service.d.ts +7 -4
- package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/helpers/flypay-v2.helper.d.ts +4 -0
- package/bundles/types/wallet-buttons/helpers/flypay-v2.helper.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/index.d.ts +126 -0
- package/bundles/types/wallet-buttons/index.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/interfaces.d.ts +3 -0
- package/bundles/types/wallet-buttons/interfaces.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts +63 -121
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts +1 -1
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-service.d.ts +7 -0
- package/bundles/types/wallet-buttons/wallet-service.d.ts.map +1 -1
- package/bundles/types/widget/configuration.d.ts +1 -1
- package/bundles/types/widget/configuration.d.ts.map +1 -1
- package/bundles/types/widget/html-multi-widget.d.ts +147 -76
- package/bundles/types/widget/html-multi-widget.d.ts.map +1 -1
- package/bundles/types/widget/html-widget.d.ts +1 -1
- package/bundles/types/widget/html-widget.d.ts.map +1 -1
- package/bundles/types/widget/multi-widget.d.ts.map +1 -1
- package/bundles/widget.umd.js +29624 -8753
- package/bundles/widget.umd.js.d.ts +484 -381
- package/bundles/widget.umd.js.map +1 -1
- package/bundles/widget.umd.js.min.d.ts +484 -381
- package/bundles/widget.umd.min.js +62 -1
- package/bundles/widget.umd.min.js.map +1 -1
- package/docs/api-ps-widget.md +12 -12
- package/docs/api-widget.md +211 -156
- package/docs/license.md +1 -1
- package/docs/secure-remote-commerce-examples.md +75 -101
- package/docs/secure-remote-commerce.md +185 -114
- package/docs/wallet-buttons-examples.md +48 -19
- package/docs/wallet-buttons.md +197 -2
- package/examples/multi-html-widget/simple.html +2 -1
- package/package.json +18 -15
- package/slate.md +123 -120
- package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts +0 -8
- package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts +0 -2
- package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +0 -9
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-source-widget.d.ts","sourceRoot":"","sources":["../../src/payment-source-widget/payment-source-widget.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAuB,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAoB,OAAO,EAA6B,MAAM,qBAAqB,CAAC;AAM3F;;;;;;;;;;;;;GAaG;AACH,cAAM,mBAAmB;IAErB,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC;IACrB,SAAS,CAAC,OAAO,EAAE,aAAa,EAAE,CAAM;IACxC,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,CAAM;IACtC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"payment-source-widget.d.ts","sourceRoot":"","sources":["../../src/payment-source-widget/payment-source-widget.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAuB,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAoB,OAAO,EAA6B,MAAM,qBAAqB,CAAC;AAM3F;;;;;;;;;;;;;GAaG;AACH,cAAM,mBAAmB;IAErB,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC;IACrB,SAAS,CAAC,OAAO,EAAE,aAAa,EAAE,CAAM;IACxC,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,CAAM;IACtC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC;IAE5B,kBAAkB,aACN,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAgBnD;;;;;;;;;;;;OAYG;IACI,SAAS,CAAC,MAAM,EAAE,OAAO;IAOzB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAQ5C;;;;;;;OAOG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM;IAK7B;;;;OAIG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM;IAK7B;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM;IASlC,MAAM;IAIb;;OAEG;IAEI,YAAY,IAAI,MAAM;IAM7B;;;;;OAKG;IACI,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE;IAKvC;;;;;OAKG;IACI,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE;IAepC;;;;;;OAMG;IACI,WAAW,CAAC,IAAI,KAAA;CAG1B;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -1,2 +1,103 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { MastercardSRCClickToPay } from './mastercard-secure-remote-commerce';
|
|
2
|
+
/**
|
|
3
|
+
* Interface of data used for the Mastercard Checkout. For further information refer to [the documentation](https://developer.mastercard.com/unified-checkout-solutions/documentation/sdk-reference/init).
|
|
4
|
+
* @interface IMastercardSRCMeta
|
|
5
|
+
*
|
|
6
|
+
* @type {object}
|
|
7
|
+
* @param {boolean} [disable_summary_screen] Boolean flag that controls if a final summary screen is presented in the checkout flow.
|
|
8
|
+
* @param {object} [dpa_data] Object where the DPA creation data is stored.
|
|
9
|
+
* @param {string} [dpa_data.dpa_presentation_name] Name in which the DPA is presented.
|
|
10
|
+
* @param {string} [dpa_data.dpa_uri] Used for indicating the DPA URI.
|
|
11
|
+
* @param {string} [dpa_data.dpa_address] Address associated with the DPA.
|
|
12
|
+
* @param {string} [dpa_data.dpa_email_address] Email address for DPA communication.
|
|
13
|
+
* @param {object} [dpa_data.dpa_phone_number] Phone number structure for DPA communication.
|
|
14
|
+
* @param {string} [dpa_data.dpa_phone_number.country_code] The country code of the phone number.
|
|
15
|
+
* @param {string} [dpa_data.dpa_phone_number.phone_number] The phone number part of the phone number.
|
|
16
|
+
* @param {string} [dpa_data.dpa_logo_uri] URI for the DPA logo.
|
|
17
|
+
* @param {string} [dpa_data.dpa_supported_email_address] Supported email address for DPA support.
|
|
18
|
+
* @param {object} [dpa_data.dpa_supported_phone_number] Supported phone number for DPA support.
|
|
19
|
+
* @param {string} [dpa_data.dpa_supported_phone_number.country_code] The country code of the phone number.
|
|
20
|
+
* @param {string} [dpa_data.dpa_supported_phone_number.phone_number] The phone number part of the phone number.
|
|
21
|
+
* @param {string} [dpa_data.dpa_support_uri] URI for DPA support.
|
|
22
|
+
* @param {string} [dpa_data.application_type] Application type, either 'WEB_BROWSER' or 'MOBILE_APP'.
|
|
23
|
+
* @param {string[]} [co_brand_names] List of co-brand names associated with the SRC experience.
|
|
24
|
+
* @param {string} [checkout_experience] Checkout experience type, either 'WITHIN_CHECKOUT' or 'PAYMENT_SETTINGS'.
|
|
25
|
+
* @param {string} [services] Services offered, such as 'INLINE_CHECKOUT' or 'INLINE_INSTALLMENTS'.
|
|
26
|
+
* @param {object} [dpa_transaction_options] Object that stores options for creating a transaction with DPA.
|
|
27
|
+
* @param {string} [dpa_transaction_options.dpa_locale] DPA’s preferred locale, example en_US.
|
|
28
|
+
* @param {string[]} [dpa_transaction_options.dpa_accepted_billing_countries] List of accepted billing countries for DPA in ISO 3166-1 alpha-2 format.
|
|
29
|
+
* @param {string} [dpa_transaction_options.dpa_billing_preference] Billing preferences for DPA, options are 'FULL', 'POSTAL_COUNTRY', 'NONE'.
|
|
30
|
+
* @param {object[]} [dpa_transaction_options.payment_options] Payment options included in the transaction.
|
|
31
|
+
* @param {string} [dpa_transaction_options.payment_options.dynamic_data_type] Dynamic data types.
|
|
32
|
+
* @param {string} [dpa_transaction_options.order_type] Type of the order, options are 'SPLIT_SHIPMENT', 'PREFERRED_CARD'.
|
|
33
|
+
* @param {string} [dpa_transaction_options.three_ds_preference] Preference for 3DS usage in the transaction.
|
|
34
|
+
* @param {boolean} [dpa_transaction_options.confirm_payment] Indicates if payment confirmation is required.
|
|
35
|
+
* @param {boolean} [dpa_transaction_options.consumer_name_requested] Indicates if consumer name is requested.
|
|
36
|
+
* @param {boolean} [dpa_transaction_options.consumer_email_address_requested] Indicates if consumer email address is requested.
|
|
37
|
+
* @param {boolean} [dpa_transaction_options.consumer_phone_number_requested] Indicates if consumer phone number is requested.
|
|
38
|
+
* @param {object} [dpa_transaction_options.transaction_amount] Details of the transaction amount.
|
|
39
|
+
* @param {number} [dpa_transaction_options.transaction_amount.transaction_amount] Amount of the transaction.
|
|
40
|
+
* @param {string} [dpa_transaction_options.transaction_amount.transaction_currency_code] Currency code of the transaction in 3 letter ISO code format.
|
|
41
|
+
* @param {string} [dpa_transaction_options.merchant_order_id] Merchant's order ID.
|
|
42
|
+
* @param {string} [dpa_transaction_options.merchant_category_code] Merchant's category code.
|
|
43
|
+
* @param {string} [dpa_transaction_options.merchant_country_code] Merchant's country code in ISO 3166-1 alpha-2 format.
|
|
44
|
+
* @param {object} [customer] Object where the customer data is stored to prefill in the checkout.
|
|
45
|
+
* @param {string} [customer.email] Customer email.
|
|
46
|
+
* @param {string} [customer.first_name] Customer first name.
|
|
47
|
+
* @param {string} [customer.last_name] Customer last name.
|
|
48
|
+
* @param {object} [customer.phone] Object where the customer phone is stored.
|
|
49
|
+
* @param {string} [customer.phone.country_code] Customer phone country code (example "1" for US). // TODO: Confirm if it can be removed!
|
|
50
|
+
* @param {string} [customer.phone.phone] Customer phone number.
|
|
51
|
+
* @param {string} [unaccepted_card_type] Used to block a specific card type. Options are 'CREDIT', 'DEBIT'.
|
|
52
|
+
*/
|
|
53
|
+
/**
|
|
54
|
+
* Interface for data returned in callbacks
|
|
55
|
+
* @interface EventData
|
|
56
|
+
*
|
|
57
|
+
* @type {object}
|
|
58
|
+
* @param {EVENT_DATA_TYPE} type Event type of type [EVENT_DATA_TYPE]{@link EVENT_DATA_TYPE}
|
|
59
|
+
* @param {string | EventDataCheckoutCompletedData} data optional data returning a string for checkoutError event or [EventDataCheckoutCompletedData]{@link EventDataCheckoutCompletedData} for checkoutCompleted
|
|
60
|
+
*/
|
|
61
|
+
/**
|
|
62
|
+
* Event data returned for checkoutCompleted callback, holding the One Time Token and the flow type completed.
|
|
63
|
+
* When the flow type is src, masked checkoutData available is also returned
|
|
64
|
+
*
|
|
65
|
+
* @interface EventDataCheckoutCompletedData
|
|
66
|
+
*
|
|
67
|
+
* @type {object}
|
|
68
|
+
* @param {string} type type of the checkout, can be `src` or `manual`.
|
|
69
|
+
* @param {string} token one time token value.
|
|
70
|
+
* @param {object} [checkoutData] Optional checkout data related to the checkout information. Only available on src flow.
|
|
71
|
+
* @param {string} [checkoutData.card_number_bin] The BIN of the card used for the transaction.
|
|
72
|
+
* @param {string} [checkoutData.card_number_last4] The last four digits of the card number.
|
|
73
|
+
* @param {string} [checkoutData.card_scheme] The card scheme. Values: visa, mastercard, amex, diners, discover.
|
|
74
|
+
* @param {string} [checkoutData.card_type] The type of card. Values: credit, debit, prepaid, combo, flex.
|
|
75
|
+
* @param {string} [checkoutData.address_line1] Address line 1 for billing address.
|
|
76
|
+
* @param {string} [checkoutData.address_line2] Address line 2 for billing address.
|
|
77
|
+
* @param {string} [checkoutData.address_line3] Address line 3 for billing address.
|
|
78
|
+
* @param {string} [checkoutData.address_city] City for billing address.
|
|
79
|
+
* @param {string} [checkoutData.address_postcode] Postal code for billing address.
|
|
80
|
+
* @param {string} [checkoutData.address_state] State or province for billing address.
|
|
81
|
+
* @param {string} [checkoutData.address_country] Country for billing address.
|
|
82
|
+
* @param {object} [checkoutData.shipping] Optional shipping information.
|
|
83
|
+
* @param {string} [checkoutData.shipping.address_line1] Address line 1 for shipping address.
|
|
84
|
+
* @param {string} [checkoutData.shipping.address_line2] Address line 2 for shipping address.
|
|
85
|
+
* @param {string} [checkoutData.shipping.address_line3] Address line 3 for shipping address.
|
|
86
|
+
* @param {string} [checkoutData.shipping.address_city] City for shipping address.
|
|
87
|
+
* @param {string} [checkoutData.shipping.address_postcode] Postal code for shipping address.
|
|
88
|
+
* @param {string} [checkoutData.shipping.address_state] State or province for shipping address.
|
|
89
|
+
* @param {string} [checkoutData.shipping.address_country] Country for shipping address.
|
|
90
|
+
*/
|
|
91
|
+
/**
|
|
92
|
+
* Interface for style configs inyected to the SRC checkout
|
|
93
|
+
* @interface IStyles
|
|
94
|
+
*
|
|
95
|
+
* @type {object}
|
|
96
|
+
* @param {string} [primary_button_color] Color Code for primary button.
|
|
97
|
+
* @param {string} [primary_button_text_color] Color Code for primary button text.
|
|
98
|
+
* @param {string} [secondary_button_color] Color Code for secondary button.
|
|
99
|
+
* @param {string} [secondary_button_text_color] Color Code for secondary button text.
|
|
100
|
+
* @param {string} [font_family] Font family to be used.
|
|
101
|
+
* @param {boolean} [enable_src_popup] Boolean flag to make the SRC checkout show in a popup window instead of embedded in iframe.
|
|
102
|
+
*/
|
|
2
103
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/secure-remote-commerce/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/secure-remote-commerce/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;;;;;;;;;;;GAWG"}
|
|
@@ -3,23 +3,67 @@
|
|
|
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 declare enum EVENT {
|
|
14
|
-
CHECKOUT_BUTTON_LOADED = "checkoutButtonLoaded",
|
|
15
|
-
CHECKOUT_BUTTON_CLICKED = "checkoutButtonClicked",
|
|
16
14
|
IFRAME_LOADED = "iframeLoaded",
|
|
17
15
|
CHECKOUT_READY = "checkoutReady",
|
|
18
16
|
CHECKOUT_COMPLETED = "checkoutCompleted",
|
|
19
|
-
CHECKOUT_ERROR = "checkoutError"
|
|
17
|
+
CHECKOUT_ERROR = "checkoutError",
|
|
18
|
+
CHECKOUT_POPUP_OPEN = "checkoutPopupOpen",
|
|
19
|
+
CHECKOUT_POPUP_CLOSE = "checkoutPopupClose"
|
|
20
20
|
}
|
|
21
|
-
export interface
|
|
22
|
-
|
|
21
|
+
export interface EventData {
|
|
22
|
+
type: EVENT_DATA_TYPE;
|
|
23
|
+
data?: string | EventDataCheckoutCompletedData;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* List of available event data types
|
|
27
|
+
* @enum EVENT_DATA_TYPE
|
|
28
|
+
*
|
|
29
|
+
* @type {object}
|
|
30
|
+
* @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
|
|
31
|
+
* @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
|
|
32
|
+
* @param {string} SUCCESS=Success
|
|
33
|
+
*/
|
|
34
|
+
export declare enum EVENT_DATA_TYPE {
|
|
35
|
+
CRITICAL_ERROR = "CriticalError",
|
|
36
|
+
USER_ERROR = "UserError",
|
|
37
|
+
SUCCESS = "Success"
|
|
38
|
+
}
|
|
39
|
+
interface EventDataCheckoutCompletedData {
|
|
40
|
+
type: 'src' | 'manual';
|
|
41
|
+
token: string;
|
|
42
|
+
checkoutData?: {
|
|
43
|
+
card_number_bin?: string;
|
|
44
|
+
card_number_last4?: string;
|
|
45
|
+
card_scheme?: 'visa' | 'mastercard' | 'amex' | 'diners' | 'discover';
|
|
46
|
+
card_type?: 'credit' | 'debit' | 'prepaid' | 'combo' | 'flex';
|
|
47
|
+
address_line1?: string;
|
|
48
|
+
address_line2?: string;
|
|
49
|
+
address_line3?: string;
|
|
50
|
+
address_city?: string;
|
|
51
|
+
address_postcode?: string;
|
|
52
|
+
address_state?: string;
|
|
53
|
+
address_country?: string;
|
|
54
|
+
shipping?: {
|
|
55
|
+
address_line1?: string;
|
|
56
|
+
address_line2?: string;
|
|
57
|
+
address_line3?: string;
|
|
58
|
+
address_city?: string;
|
|
59
|
+
address_postcode?: string;
|
|
60
|
+
address_state?: string;
|
|
61
|
+
address_country?: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
interface IBaseSRCMeta {
|
|
66
|
+
customizations?: IStyles;
|
|
23
67
|
dpa_data?: {
|
|
24
68
|
dpa_presentation_name?: string;
|
|
25
69
|
dpa_uri?: string;
|
|
@@ -27,21 +71,9 @@ export interface IVisaSRCMeta {
|
|
|
27
71
|
dpa_transaction_options?: {
|
|
28
72
|
dpa_locale?: string;
|
|
29
73
|
dpa_accepted_billing_countries?: string[];
|
|
30
|
-
dpa_accepted_shipping_countries?: string[];
|
|
31
|
-
dpa_billing_preference?: DPA_SHIPPING_BILLING_PREFERENCE;
|
|
32
|
-
dpa_shipping_preference?: DPA_SHIPPING_BILLING_PREFERENCE;
|
|
33
74
|
consumer_name_requested?: boolean;
|
|
34
75
|
consumer_email_address_requested?: boolean;
|
|
35
76
|
consumer_phone_number_requested?: boolean;
|
|
36
|
-
payment_options?: {
|
|
37
|
-
dpa_dynamic_data_ttl_minutes?: number;
|
|
38
|
-
dynamic_data_type?: DPA_DYNAMIC_DATA_TYPE;
|
|
39
|
-
dpa_pan_requested?: boolean;
|
|
40
|
-
};
|
|
41
|
-
review_action?: REVIEW_ACTION;
|
|
42
|
-
checkout_description?: string;
|
|
43
|
-
transaction_type?: TRANSACTION_TYPE;
|
|
44
|
-
order_type?: ORDER_TYPE;
|
|
45
77
|
transaction_amount?: {
|
|
46
78
|
transaction_amount?: number;
|
|
47
79
|
transaction_currency_code?: string;
|
|
@@ -50,23 +82,68 @@ export interface IVisaSRCMeta {
|
|
|
50
82
|
merchant_category_code?: string;
|
|
51
83
|
merchant_country_code?: string;
|
|
52
84
|
};
|
|
53
|
-
customizations: IStyles;
|
|
54
85
|
}
|
|
55
|
-
|
|
86
|
+
interface PhoneNumber {
|
|
87
|
+
country_code: string;
|
|
88
|
+
phone_number: string;
|
|
89
|
+
}
|
|
90
|
+
interface Customer {
|
|
91
|
+
email?: string;
|
|
92
|
+
phone?: {
|
|
93
|
+
country_code?: string;
|
|
94
|
+
phone?: string;
|
|
95
|
+
};
|
|
96
|
+
first_name?: string;
|
|
97
|
+
last_name?: string;
|
|
98
|
+
}
|
|
99
|
+
export interface IMastercardSRCMeta extends IBaseSRCMeta {
|
|
100
|
+
dpa_data?: IBaseSRCMeta['dpa_data'] & {
|
|
101
|
+
dpa_address?: string;
|
|
102
|
+
dpa_email_address?: string;
|
|
103
|
+
dpa_phone_number?: PhoneNumber;
|
|
104
|
+
dpa_logo_uri?: string;
|
|
105
|
+
dpa_supported_email_address?: string;
|
|
106
|
+
dpa_supported_phone_number?: PhoneNumber;
|
|
107
|
+
dpa_uri?: string;
|
|
108
|
+
dpa_support_uri?: string;
|
|
109
|
+
application_type?: 'WEB_BROWSER' | 'MOBILE_APP';
|
|
110
|
+
};
|
|
111
|
+
disable_summary_screen?: boolean;
|
|
112
|
+
co_brand_names?: string[];
|
|
113
|
+
checkout_experience?: 'WITHIN_CHECKOUT' | 'PAYMENT_SETTINGS';
|
|
114
|
+
services?: 'INLINE_CHECKOUT' | 'INLINE_INSTALLMENTS';
|
|
115
|
+
dpa_transaction_options?: IBaseSRCMeta['dpa_transaction_options'] & {
|
|
116
|
+
dpa_billing_preference?: MASTERCARD_DPA_SHIPPING_BILLING_PREFERENCE;
|
|
117
|
+
payment_options?: Array<{
|
|
118
|
+
dynamic_data_type?: string;
|
|
119
|
+
}>;
|
|
120
|
+
order_type?: MASTERCARD_ORDER_TYPE;
|
|
121
|
+
three_ds_preference?: string;
|
|
122
|
+
confirm_payment?: boolean;
|
|
123
|
+
};
|
|
124
|
+
customer?: Customer;
|
|
125
|
+
unaccepted_card_type?: 'CREDIT' | 'DEBIT';
|
|
126
|
+
}
|
|
127
|
+
export type MASTERCARD_DPA_SHIPPING_BILLING_PREFERENCE = 'FULL' | 'POSTAL_COUNTRY' | 'NONE';
|
|
56
128
|
export type DPA_DYNAMIC_DATA_TYPE = 'TAVV' | 'DTVV';
|
|
57
129
|
export type REVIEW_ACTION = 'pay' | 'continue';
|
|
58
130
|
export type TRANSACTION_TYPE = 'PURCHASE' | 'BILL_PAYMENT' | 'MONEY_TRANSFER';
|
|
59
|
-
export type
|
|
131
|
+
export type MASTERCARD_ORDER_TYPE = 'SPLIT_SHIPMENT' | 'PREFERRED_CARD';
|
|
60
132
|
export interface IStyles {
|
|
61
|
-
|
|
62
|
-
|
|
133
|
+
primary_button_color?: string;
|
|
134
|
+
secondary_button_color?: string;
|
|
135
|
+
primary_button_text_color?: string;
|
|
136
|
+
secondary_button_text_color?: string;
|
|
63
137
|
font_family?: string;
|
|
64
|
-
|
|
138
|
+
enable_src_popup?: boolean;
|
|
65
139
|
}
|
|
66
140
|
export declare const STYLE: {
|
|
67
|
-
|
|
68
|
-
|
|
141
|
+
PRIMARY_BUTTON_COLOR: string;
|
|
142
|
+
SECONDARY_BUTTON_COLOR: string;
|
|
143
|
+
PRIMARY_BUTTON_TEXT_COLOR: string;
|
|
144
|
+
SECONDARY_BUTTON_TEXT_COLOR: string;
|
|
69
145
|
FONT_FAMILY: string;
|
|
70
|
-
|
|
146
|
+
ENABLE_SRC_POPUP: string;
|
|
71
147
|
};
|
|
148
|
+
export {};
|
|
72
149
|
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../src/secure-remote-commerce/interfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,oBAAY,KAAK;IACb,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../src/secure-remote-commerce/interfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,oBAAY,KAAK;IACb,aAAa,iBAAiB;IAC9B,cAAc,kBAAkB;IAChC,kBAAkB,sBAAsB;IACxC,cAAc,kBAAkB;IAChC,mBAAmB,sBAAsB;IACzC,oBAAoB,uBAAuB;CAC9C;AAED,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,8BAA8B,CAAC;CAClD;AAED;;;;;;;;GAQG;AACH,oBAAY,eAAe;IACvB,cA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
|
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
|
+
/** @constructs */ 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 };
|
|
31
|
+
//# sourceMappingURL=mastercard-secure-remote-commerce.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mastercard-secure-remote-commerce.d.ts","sourceRoot":"","sources":["../../src/secure-remote-commerce/mastercard-secure-remote-commerce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C;;;;;;;;;;;;;;GAcG;AACH,cAAM,uBAAwB,SAAQ,GAAG;IAEzB,SAAS,CAAC,eAAe,EAAE,MAAM;IAAE,SAAS,CAAC,UAAU,EAAE,MAAM;IAAE,SAAS,CAAC,0BAA0B,EAAE,MAAM;IAAE,SAAS,CAAC,IAAI,EAAE,kBAAkB;IAD7J,kBAAkB,aACI,eAAe,EAAE,MAAM,EAAY,UAAU,EAAE,MAAM,EAAY,0BAA0B,EAAE,MAAM,EAAY,IAAI,EAAE,kBAAkB;IAI7J;;;OAGG;IACI,IAAI,IAAI,IAAI;CAmBtB;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/secure-remote-commerce/providers/mastercard-src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -4,25 +4,22 @@ 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;
|
|
26
23
|
useAutoResize(force?: boolean): void;
|
|
27
24
|
}
|
|
28
|
-
//# sourceMappingURL=
|
|
25
|
+
//# sourceMappingURL=mastercard-src.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mastercard-src.d.ts","sourceRoot":"","sources":["../../../../src/secure-remote-commerce/providers/mastercard-src/mastercard-src.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,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;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAS,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAG7D,qBAAa,aAAc,YAAW,WAAW;IAMgC,SAAS,CAAC,IAAI,EAAE,kBAAkB;IAAE,SAAS,CAAC,YAAY,EAAE,YAAY;IAAE,SAAS,CAAC,UAAU;IAL3K,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC;IACrB,SAAS,CAAC,eAAe,EAAE,SAAS,CAAC;IACrC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC;gBAEvB,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAY,IAAI,EAAE,kBAAkB,EAAY,YAAY,EAAE,YAAY,EAAY,UAAU,KAAA,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM;IAsBxM,OAAO,CAAC,iBAAiB;IA6BlB,IAAI,IAAI,IAAI;IAQZ,MAAM,IAAI,MAAM;IAIhB,YAAY,CAAC,QAAQ,EAAE,OAAO;IAK9B,YAAY;IAKZ,MAAM;IAKN,aAAa,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI;CAkB9C"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secure-remote-commerce.d.ts","sourceRoot":"","sources":["../../src/secure-remote-commerce/secure-remote-commerce.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"secure-remote-commerce.d.ts","sourceRoot":"","sources":["../../src/secure-remote-commerce/secure-remote-commerce.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAS,kBAAkB,EAAa,MAAM,cAAc,CAAC;AAG7E,uBAAe,GAAG;IAYF,SAAS,CAAC,eAAe,EAAE,MAAM;IAAE,SAAS,CAAC,UAAU,EAAE,MAAM;IAAE,SAAS,CAAC,0BAA0B,EAAE,MAAM;IAAE,SAAS,CAAC,IAAI,EAAE,kBAAkB;IAX7J,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IAErC,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEzB,SAAS,CAAC,GAAG,EAAE,WAAW,CAAC;IAC3B,SAAS,CAAC,QAAQ,EAAE,WAAW,CAAC;IAEhC,SAAS,CAAC,UAAU,UAAS;IAC7B,SAAS,CAAC,KAAK,EAAE,OAAO,CAAiB;gBAEnB,eAAe,EAAE,MAAM,EAAY,UAAU,EAAE,MAAM,EAAY,0BAA0B,EAAE,MAAM,EAAY,IAAI,EAAE,kBAAkB;IAK5J;;;;;;;;;;;;;MAaE;IACI,SAAS,CAAC,MAAM,EAAE,OAAO;IAOhC,OAAO,CAAC,QAAQ;IAOT,IAAI,IAAI,IAAI;IA0BnB;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;IAShD;;;;;OAKG;IACI,MAAM,IAAI,MAAM;IAOhB,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IACnC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI;IAyBpD;;;;;;OAMG;IACI,YAAY,CAAC,QAAQ,EAAE,OAAO;IAKrC;;;;;OAKG;IACI,YAAY;IAKnB;;;;;OAKG;IACI,MAAM;IAKb;;;;;;OAMG;IACI,aAAa;CAKvB;AAED,OAAO,EAAE,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type HttpRequestMethod = 'DELETE' | 'GET' | 'OPTIONS' | 'POST' | 'PUT';
|
|
2
|
+
export type HttpRequestUrl = string | URL;
|
|
3
|
+
export declare class HttpRequest {
|
|
4
|
+
private request;
|
|
5
|
+
private constructor();
|
|
6
|
+
static create(method: HttpRequestMethod, url: string | HttpRequestUrl): HttpRequest;
|
|
7
|
+
inner(): XMLHttpRequest;
|
|
8
|
+
setHeader(name: string, value: string): this;
|
|
9
|
+
setAccessToken(value: string): this;
|
|
10
|
+
setPublicKey(value: string): this;
|
|
11
|
+
setContentTypeJson(): this;
|
|
12
|
+
setSdkVersion(): this;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=http-request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-request.d.ts","sourceRoot":"","sources":["../../../src/shared/http/http-request.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,KAAK,CAAA;AAC7E,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,GAAG,CAAA;AAEzC,qBAAa,WAAW;IACtB,OAAO,CAAC,OAAO,CAAgB;IAE/B,OAAO;WAIO,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,GAAG,cAAc;IAQrE,KAAK;IAIL,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAMrC,cAAc,CAAC,KAAK,EAAE,MAAM;IAI5B,YAAY,CAAC,KAAK,EAAE,MAAM;IAI1B,kBAAkB;IAIlB,aAAa;CAQrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/http/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MicroAgent } from '@newrelic/browser-agent/loaders/micro-agent';
|
|
2
|
+
type AgentPrototype = Pick<(typeof MicroAgent)['prototype'], 'addPageAction' | 'noticeError'>;
|
|
3
|
+
type AgentMethodNames = keyof AgentPrototype;
|
|
4
|
+
type AgentMethodParameters<T extends AgentMethodNames> = Parameters<AgentPrototype[T]>;
|
|
5
|
+
declare class InstrumentationAgent extends MicroAgent {
|
|
6
|
+
private static agent;
|
|
7
|
+
private static available;
|
|
8
|
+
private static initialized;
|
|
9
|
+
private constructor();
|
|
10
|
+
static get instance(): InstrumentationAgent;
|
|
11
|
+
isAvailable(): boolean;
|
|
12
|
+
call: <T extends "addPageAction" | "noticeError">(method: T, ...args: AgentMethodParameters<T>) => void;
|
|
13
|
+
}
|
|
14
|
+
export { InstrumentationAgent };
|
|
15
|
+
//# sourceMappingURL=instrumentation.agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentation.agent.d.ts","sourceRoot":"","sources":["../../../../src/shared/services/instrumentation/instrumentation.agent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AAMzE,KAAK,cAAc,GAAG,IAAI,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,WAAW,CAAC,EAAE,eAAe,GAAG,aAAa,CAAC,CAAC;AAC9F,KAAK,gBAAgB,GAAG,MAAM,cAAc,CAAC;AAC7C,KAAK,qBAAqB,CAAC,CAAC,SAAS,gBAAgB,IAAI,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;AAEvF,cAAM,oBAAqB,SAAQ,UAAU;IACzC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAuB;IAC3C,OAAO,CAAC,MAAM,CAAC,SAAS,CAAU;IAClC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAU;IAEpC,OAAO;IAIP,WAAkB,QAAQ,yBAmBzB;IAEM,WAAW;IAIX,IAAI,sDAAwC,CAAC,WAAW,sBAAsB,CAAC,CAAC,UAIrF;CACL;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|