@paydock/client-sdk 1.108.2 → 1.110.3-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 +990 -1
- package/bundles/index.cjs +3859 -3036
- package/bundles/index.cjs.d.ts +465 -47
- package/bundles/index.mjs +3857 -3036
- package/bundles/index.mjs.d.ts +465 -47
- package/bundles/types/api/api-gateway-internal.d.ts +12 -0
- package/bundles/types/api/api-gateway-internal.d.ts.map +1 -0
- package/bundles/types/api/api-internal.d.ts +2 -0
- package/bundles/types/api/api-internal.d.ts.map +1 -1
- package/bundles/types/helper/event-emitter.d.ts +1 -0
- package/bundles/types/helper/event-emitter.d.ts.map +1 -1
- package/bundles/types/index.d.ts +1 -0
- package/bundles/types/index.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/index.d.ts +1 -1
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts +4 -4
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts +4 -4
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/{afterpay.wallet-service.d.ts → wallet-services/afterpay.wallet-service.d.ts} +1 -1
- package/bundles/types/wallet-buttons/wallet-services/afterpay.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/{apple.wallet-service.d.ts → wallet-services/apple.wallet-service.d.ts} +3 -3
- package/bundles/types/wallet-buttons/wallet-services/apple.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/{flypay-v2.wallet-service.d.ts → wallet-services/flypay-v2.wallet-service.d.ts} +3 -3
- package/bundles/types/wallet-buttons/wallet-services/flypay-v2.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/{flypay.wallet-service.d.ts → wallet-services/flypay.wallet-service.d.ts} +6 -6
- package/bundles/types/wallet-buttons/wallet-services/flypay.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/{google.wallet-service.d.ts → wallet-services/google.wallet-service.d.ts} +4 -4
- package/bundles/types/wallet-buttons/wallet-services/google.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/wallet-services/mastercard.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/{paypal.wallet-service.d.ts → wallet-services/paypal.wallet-service.d.ts} +1 -1
- package/bundles/types/wallet-buttons/wallet-services/paypal.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/{stripe.wallet-service.d.ts → wallet-services/stripe.wallet-service.d.ts} +1 -1
- package/bundles/types/wallet-buttons/wallet-services/stripe.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/{wallet-service.d.ts → wallet-services/wallet-service.d.ts} +3 -3
- package/bundles/types/wallet-buttons/wallet-services/wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts +195 -0
- package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/enum/event.enum.d.ts +10 -0
- package/bundles/types/wallet-buttons-express/enum/event.enum.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/index.d.ts +131 -0
- package/bundles/types/wallet-buttons-express/index.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/base-event-data.interface.d.ts +6 -0
- package/bundles/types/wallet-buttons-express/interfaces/base-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/base-gateway-config.interface.d.ts +6 -0
- package/bundles/types/wallet-buttons-express/interfaces/base-gateway-config.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/base-wallet-meta.interface.d.ts +5 -0
- package/bundles/types/wallet-buttons-express/interfaces/base-wallet-meta.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/charge-wallet-token-meta.interface.d.ts +14 -0
- package/bundles/types/wallet-buttons-express/interfaces/charge-wallet-token-meta.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-click-event-data.interface.d.ts +6 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-click-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-close-event-data.interface.d.ts +6 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-close-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-error-event-data.interface.d.ts +6 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-error-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-error-event-data.interface.d.ts +9 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-error-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-in-review-event-data.interface.d.ts +6 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-in-review-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-successful-event-data.interface.d.ts +11 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-successful-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-unavailable-event-data.interface.d.ts +6 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-unavailable-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/wallet-capture-request.interface.d.ts +21 -0
- package/bundles/types/wallet-buttons-express/interfaces/wallet-capture-request.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/apple-pay.wallet-button-express.d.ts +50 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/apple-pay.wallet-button-express.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/constants/apple-pay-button-style.constant.d.ts +3 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/constants/apple-pay-button-style.constant.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-gateway-config.interface.d.ts +6 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-gateway-config.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-wallet-meta.interface.d.ts +17 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-wallet-meta.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-button-style.type.d.ts +2 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-button-style.type.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-button-type.type.d.ts +2 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-button-type.type.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-gateway-config.interface.d.ts +4 -0
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-gateway-config.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts +31 -0
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/paypal/paypal.wallet-button-express.d.ts +47 -0
- package/bundles/types/wallet-buttons-express/services/paypal/paypal.wallet-button-express.d.ts.map +1 -0
- package/bundles/widget.umd.js +3859 -3036
- package/bundles/widget.umd.js.d.ts +465 -47
- package/bundles/widget.umd.js.min.d.ts +465 -47
- package/bundles/widget.umd.min.js +6 -6
- package/docs/click-to-pay.md +1 -1
- package/docs/html/layout.html +1 -0
- package/docs/wallet-buttons-express-examples.md +201 -0
- package/docs/wallet-buttons-express.md +786 -0
- package/package.json +4 -3
- package/bundles/types/wallet-buttons/afterpay.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/flypay.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/mastercard.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/stripe.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/wallet-service.d.ts.map +0 -1
- /package/bundles/types/wallet-buttons/{mastercard.wallet-service.d.ts → wallet-services/mastercard.wallet-service.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"on-payment-error-event-data.interface.d.ts","sourceRoot":"","sources":["../../../src/wallet-buttons-express/interfaces/on-payment-error-event-data.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,MAAM,WAAW,uBAAwB,SAAQ,aAAa,CAAC;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;IACE,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC;CAC9B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EVENT } from "../enum/event.enum";
|
|
2
|
+
import { OnPaymentSuccessfulEventData } from "./on-payment-successful-event-data.interface";
|
|
3
|
+
export interface OnPaymentInReviewEventData extends Omit<OnPaymentSuccessfulEventData, 'event'> {
|
|
4
|
+
event: EVENT.PAYMENT_IN_REVIEW;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=on-payment-in-review-event-data.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"on-payment-in-review-event-data.interface.d.ts","sourceRoot":"","sources":["../../../src/wallet-buttons-express/interfaces/on-payment-in-review-event-data.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAE5F,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CAAC,4BAA4B,EAAE,OAAO,CAAC;IAC3F,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC;CAClC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EVENT } from "../enum/event.enum";
|
|
2
|
+
import { BaseEventData } from "./base-event-data.interface";
|
|
3
|
+
export interface OnPaymentSuccessfulEventData extends BaseEventData<{
|
|
4
|
+
id: string;
|
|
5
|
+
amount: number;
|
|
6
|
+
currency: string;
|
|
7
|
+
status: string;
|
|
8
|
+
}> {
|
|
9
|
+
event: EVENT.PAYMENT_SUCCESSFUL;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=on-payment-successful-event-data.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"on-payment-successful-event-data.interface.d.ts","sourceRoot":"","sources":["../../../src/wallet-buttons-express/interfaces/on-payment-successful-event-data.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,MAAM,WAAW,4BAA6B,SAAQ,aAAa,CAAC;IAChE,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC;IACE,KAAK,EAAE,KAAK,CAAC,kBAAkB,CAAC;CACnC"}
|
package/bundles/types/wallet-buttons-express/interfaces/on-unavailable-event-data.interface.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EVENT } from "../enum/event.enum";
|
|
2
|
+
import { BaseEventData } from "./base-event-data.interface";
|
|
3
|
+
export interface OnUnavailableEventData extends BaseEventData<undefined> {
|
|
4
|
+
event: EVENT.UNAVAILABLE;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=on-unavailable-event-data.interface.d.ts.map
|
package/bundles/types/wallet-buttons-express/interfaces/on-unavailable-event-data.interface.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"on-unavailable-event-data.interface.d.ts","sourceRoot":"","sources":["../../../src/wallet-buttons-express/interfaces/on-unavailable-event-data.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,MAAM,WAAW,sBAAuB,SAAQ,aAAa,CAAC,SAAS,CAAC;IACpE,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC;CAC5B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface WalletCaptureRequest {
|
|
2
|
+
payment_method_id?: string;
|
|
3
|
+
customer: {
|
|
4
|
+
email?: string;
|
|
5
|
+
phone?: string;
|
|
6
|
+
first_name?: string;
|
|
7
|
+
last_name?: string;
|
|
8
|
+
payment_source?: {
|
|
9
|
+
wallet_type?: string;
|
|
10
|
+
address_line1?: string;
|
|
11
|
+
address_line2?: string;
|
|
12
|
+
address_country?: string;
|
|
13
|
+
address_city?: string;
|
|
14
|
+
address_postcode?: string;
|
|
15
|
+
address_state?: string;
|
|
16
|
+
ref_token?: string;
|
|
17
|
+
external_payer_id?: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=wallet-capture-request.interface.d.ts.map
|
package/bundles/types/wallet-buttons-express/interfaces/wallet-capture-request.interface.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet-capture-request.interface.d.ts","sourceRoot":"","sources":["../../../src/wallet-buttons-express/interfaces/wallet-capture-request.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACjC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE;QACN,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,cAAc,CAAC,EAAE;YACb,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,aAAa,CAAC,EAAE,MAAM,CAAC;YACvB,aAAa,CAAC,EAAE,MAAM,CAAC;YACvB,eAAe,CAAC,EAAE,MAAM,CAAC;YACzB,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;YAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;YACvB,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;SAC9B,CAAC;KACL,CAAC;CACL"}
|
package/bundles/types/wallet-buttons-express/services/apple-pay/apple-pay.wallet-button-express.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { BaseWalletButton } from '../../base.wallet-button-express';
|
|
2
|
+
import { ApplePayWalletMeta } from './interfaces/apple-pay-wallet-meta.interface';
|
|
3
|
+
/**
|
|
4
|
+
* Class ApplePayWalletButtonExpress to work with Apple Pay Wallet.
|
|
5
|
+
*
|
|
6
|
+
* @extends BaseWalletButton
|
|
7
|
+
*
|
|
8
|
+
* @constructor
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* var button = new ApplePayWalletButtonExpress('#wallet-buttons', 'publicKeyOrAccessToken', 'gatewayId', meta);
|
|
12
|
+
*
|
|
13
|
+
* @param {string} selector - Selector of html element. Container for the ApplePayWalletButtonExpress.
|
|
14
|
+
* @param {string} publicKeyOrAccessToken - Public key or Access token for the ApplePayWalletButtonExpress.
|
|
15
|
+
* @param {string} gatewayId - Gateway ID for the ApplePayWalletButtonExpress.
|
|
16
|
+
* @param {ApplePayWalletMeta} meta - data that configures the Apple Pay Wallet.
|
|
17
|
+
*/
|
|
18
|
+
declare class ApplePayWalletButtonExpress extends BaseWalletButton<ApplePayWalletMeta> {
|
|
19
|
+
private paymentSession;
|
|
20
|
+
/** @constructs */ constructor(selector: string, publicKeyOrAccessToken: string, gatewayId: string, meta: ApplePayWalletMeta);
|
|
21
|
+
/**
|
|
22
|
+
* Initializes the availability checks and inserts the button if possible.
|
|
23
|
+
* Otherwise function onUnavailable(handler: VoidFunction) will be called.
|
|
24
|
+
* **Important**: Is required to invoke this method to render the wallet button.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* button.load();
|
|
28
|
+
*/
|
|
29
|
+
load(): void;
|
|
30
|
+
/**
|
|
31
|
+
* Call this method if updating the originally-provided meta object after order information changed.
|
|
32
|
+
* For example, if the order amount has changed from the time where the button was originally rendered.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* button.setMeta(meta);
|
|
36
|
+
*
|
|
37
|
+
* @param {ApplePayWalletMeta} meta - // data that configures the Apple Pay Wallet.
|
|
38
|
+
*/
|
|
39
|
+
setMeta(meta: ApplePayWalletMeta): void;
|
|
40
|
+
private checkAvailability;
|
|
41
|
+
private mount;
|
|
42
|
+
private onApplePayButtonClicked;
|
|
43
|
+
private createRequest;
|
|
44
|
+
private onValidateMerchant;
|
|
45
|
+
private getMerchantSession;
|
|
46
|
+
private onPaymentAuthorized;
|
|
47
|
+
private onCancelPayment;
|
|
48
|
+
}
|
|
49
|
+
export { ApplePayWalletButtonExpress };
|
|
50
|
+
//# sourceMappingURL=apple-pay.wallet-button-express.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple-pay.wallet-button-express.d.ts","sourceRoot":"","sources":["../../../../src/wallet-buttons-express/services/apple-pay/apple-pay.wallet-button-express.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAElF;;;;;;;;;;;;;;GAcG;AACH,cAAM,2BAA4B,SAAQ,gBAAgB,CAAC,kBAAkB,CAAC;IAC1E,OAAO,CAAC,cAAc,CAAkB;IAExC,kBAAkB,aACN,QAAQ,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB;IAIzG;;;;;;;OAOG;IACI,IAAI;IAqBX;;;;;;;;OAQG;IACI,OAAO,CAAC,IAAI,EAAE,kBAAkB,GAAG,IAAI;IAI9C,OAAO,CAAC,iBAAiB;IAgBzB,OAAO,CAAC,KAAK;IAcb,OAAO,CAAC,uBAAuB;IAS/B,OAAO,CAAC,aAAa;IAmBrB,OAAO,CAAC,kBAAkB,CAczB;IAED,OAAO,CAAC,kBAAkB;IAQ1B,OAAO,CAAC,mBAAmB,CAyB1B;IAED,OAAO,CAAC,eAAe,CAEtB;CACJ;AAED,OAAO,EAAE,2BAA2B,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple-pay-button-style.constant.d.ts","sourceRoot":"","sources":["../../../../../src/wallet-buttons-express/services/apple-pay/constants/apple-pay-button-style.constant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAEzE,eAAO,MAAM,4BAA4B,gBAAgB,kBAAkB,KAAa,MAqDvF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple-pay-gateway-config.interface.d.ts","sourceRoot":"","sources":["../../../../../src/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-gateway-config.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE;QACN,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseWalletMeta } from "../../../interfaces/base-wallet-meta.interface";
|
|
2
|
+
import { ApplePayButtonStyle } from "../types/apple-pay-button-style.type";
|
|
3
|
+
import { ApplePayButtonType } from "../types/apple-pay-button-type.type";
|
|
4
|
+
export interface ApplePayWalletMeta extends BaseWalletMeta {
|
|
5
|
+
amount_label: string;
|
|
6
|
+
country: string;
|
|
7
|
+
merchant_capabilities?: Array<'supports3DS' | 'supportsEMV' | 'supportsCredit' | 'supportsDebit'>;
|
|
8
|
+
supported_networks?: Array<'visa' | 'masterCard' | 'amex' | 'chinaUnionPay' | 'discover' | 'interac' | 'jcb' | 'privateLabel'>;
|
|
9
|
+
required_billing_contact_fields?: Array<'email' | 'name' | 'phone' | 'postalAddress'>;
|
|
10
|
+
required_shipping_contact_fields?: Array<'email' | 'phone'>;
|
|
11
|
+
supported_countries?: string[];
|
|
12
|
+
style?: {
|
|
13
|
+
button_type?: ApplePayButtonType;
|
|
14
|
+
button_style?: ApplePayButtonStyle;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=apple-pay-wallet-meta.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple-pay-wallet-meta.interface.d.ts","sourceRoot":"","sources":["../../../../../src/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-wallet-meta.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAEzE,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,aAAa,GAAG,gBAAgB,GAAG,eAAe,CAAC,CAAC;IAClG,kBAAkB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,YAAY,GAAG,MAAM,GAAG,eAAe,GAAG,UAAU,GAAG,SAAS,GAAG,KAAK,GAAG,cAAc,CAAC,CAAC;IAC/H,+BAA+B,CAAC,EAAE,KAAK,CAAC,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,eAAe,CAAC,CAAC;IACtF,gCAAgC,CAAC,EAAE,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC,CAAC;IAC5D,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,KAAK,CAAC,EAAE;QACJ,WAAW,CAAC,EAAE,kBAAkB,CAAC;QACjC,YAAY,CAAC,EAAE,mBAAmB,CAAC;KACtC,CAAC;CACL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple-pay-button-style.type.d.ts","sourceRoot":"","sources":["../../../../../src/wallet-buttons-express/services/apple-pay/types/apple-pay-button-style.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,OAAO,GAAG,eAAe,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type ApplePayButtonType = 'add-money' | 'book' | 'buy' | 'check-out' | 'continue' | 'contribute' | 'donate' | 'order' | 'pay' | 'plain' | 'reload' | 'rent' | 'set-up' | 'subscribe' | 'support' | 'tip' | 'top-up';
|
|
2
|
+
//# sourceMappingURL=apple-pay-button-type.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple-pay-button-type.type.d.ts","sourceRoot":"","sources":["../../../../../src/wallet-buttons-express/services/apple-pay/types/apple-pay-button-type.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAC1B,WAAW,GACX,MAAM,GACN,KAAK,GACL,WAAW,GACX,UAAU,GACV,YAAY,GACZ,QAAQ,GACR,OAAO,GACP,KAAK,GACL,OAAO,GACP,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,WAAW,GACX,SAAS,GACT,KAAK,GACL,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paypal-gateway-config.interface.d.ts","sourceRoot":"","sources":["../../../../../src/wallet-buttons-express/services/paypal/interfaces/paypal-gateway-config.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BaseWalletMeta } from "../../../interfaces/base-wallet-meta.interface";
|
|
2
|
+
export interface PaypalWalletMeta extends BaseWalletMeta {
|
|
3
|
+
pay_later?: boolean;
|
|
4
|
+
standalone?: boolean;
|
|
5
|
+
capture?: boolean;
|
|
6
|
+
style?: {
|
|
7
|
+
layout?: 'vertical' | 'horizontal';
|
|
8
|
+
color?: 'gold' | 'blue' | 'silver' | 'black' | 'white';
|
|
9
|
+
shape?: 'rect' | 'pill' | 'sharp';
|
|
10
|
+
borderRadius?: number;
|
|
11
|
+
height?: number;
|
|
12
|
+
disableMaxWidth?: boolean;
|
|
13
|
+
label?: 'paypal' | 'checkout' | 'buynow' | 'pay' | 'installment';
|
|
14
|
+
tagline?: boolean;
|
|
15
|
+
messages?: {
|
|
16
|
+
layout?: 'text' | 'flex';
|
|
17
|
+
logo?: {
|
|
18
|
+
type?: 'primary' | 'alternative' | 'inline' | 'none';
|
|
19
|
+
position?: 'left' | 'right' | 'top';
|
|
20
|
+
};
|
|
21
|
+
text?: {
|
|
22
|
+
color?: 'black' | 'white' | 'monochrome' | 'grayscale';
|
|
23
|
+
size?: 10 | 11 | 12 | 13 | 14 | 15 | 16;
|
|
24
|
+
align?: 'left' | 'center' | 'right';
|
|
25
|
+
};
|
|
26
|
+
color?: 'blue' | 'black' | 'white' | 'white-no-border' | 'gray' | 'monochrome' | 'grayscale';
|
|
27
|
+
ratio?: '1x1' | '1x4' | '8x1' | '20x1';
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=paypal-wallet-meta.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paypal-wallet-meta.interface.d.ts","sourceRoot":"","sources":["../../../../../src/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAEhF,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACpD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE;QACJ,MAAM,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;QACnC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;QACvD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;QAClC,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,KAAK,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,aAAa,CAAC;QACjE,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,QAAQ,CAAC,EAAE;YACP,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;YACzB,IAAI,CAAC,EAAE;gBACH,IAAI,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,QAAQ,GAAG,MAAM,CAAC;gBACrD,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;aACvC,CAAC;YACF,IAAI,CAAC,EAAE;gBACH,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,YAAY,GAAG,WAAW,CAAC;gBACvD,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;gBACxC,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;aACvC,CAAC;YACF,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,iBAAiB,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,CAAC;YAC7F,KAAK,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;SAC1C,CAAC;KACL,CAAA;CACJ"}
|
package/bundles/types/wallet-buttons-express/services/paypal/paypal.wallet-button-express.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { BaseWalletButton } from '../../base.wallet-button-express';
|
|
2
|
+
import { PaypalWalletMeta } from './interfaces/paypal-wallet-meta.interface';
|
|
3
|
+
/**
|
|
4
|
+
* Class PaypalWalletButtonExpress to work with Paypal Wallet.
|
|
5
|
+
*
|
|
6
|
+
* @extends BaseWalletButton
|
|
7
|
+
*
|
|
8
|
+
* @constructor
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* var button = new PaypalWalletButtonExpress('#wallet-buttons', 'publicKeyOrAccessToken', 'gatewayId', meta);
|
|
12
|
+
*
|
|
13
|
+
* @param {string} selector - Selector of html element. Container for the PaypalWalletButtonExpress.
|
|
14
|
+
* @param {string} publicKeyOrAccessToken - Public key or Access token for the PaypalWalletButtonExpress.
|
|
15
|
+
* @param {string} gatewayId - Gateway ID for the PaypalWalletButtonExpress.
|
|
16
|
+
* @param {PaypalWalletMeta} meta - data that configures the Paypal Wallet.
|
|
17
|
+
*/
|
|
18
|
+
declare class PaypalWalletButtonExpress extends BaseWalletButton<PaypalWalletMeta> {
|
|
19
|
+
private config;
|
|
20
|
+
protected paypal: any;
|
|
21
|
+
protected pendingApprovalPromise?: Promise<any>;
|
|
22
|
+
/** @constructs */ constructor(selector: string, publicKeyOrAccessToken: string, gatewayId: string, meta: PaypalWalletMeta);
|
|
23
|
+
/**
|
|
24
|
+
* Initializes the availability checks and inserts the button if possible.
|
|
25
|
+
* Otherwise function onUnavailable(handler: VoidFunction) will be called.
|
|
26
|
+
* **Important**: Is required to invoke this method to render the wallet button.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* button.load();
|
|
30
|
+
*/
|
|
31
|
+
load(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Call this method if updating the originally-provided meta object after order information changed.
|
|
34
|
+
* For example, if the order amount has changed from the time where the button was originally rendered.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* button.setMeta(meta);
|
|
38
|
+
* @param {PaypalWalletMeta} meta - // data that configures the Paypal Wallet.
|
|
39
|
+
*/
|
|
40
|
+
setMeta(meta: PaypalWalletMeta): void;
|
|
41
|
+
private renderPaypalButton;
|
|
42
|
+
private renderPaypalCommonComponent;
|
|
43
|
+
private renderPaypalStandaloneComponent;
|
|
44
|
+
private paypalSharedProps;
|
|
45
|
+
}
|
|
46
|
+
export { PaypalWalletButtonExpress };
|
|
47
|
+
//# sourceMappingURL=paypal.wallet-button-express.d.ts.map
|
package/bundles/types/wallet-buttons-express/services/paypal/paypal.wallet-button-express.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paypal.wallet-button-express.d.ts","sourceRoot":"","sources":["../../../../src/wallet-buttons-express/services/paypal/paypal.wallet-button-express.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAE7E;;;;;;;;;;;;;;GAcG;AACH,cAAM,yBAA0B,SAAQ,gBAAgB,CAAC,gBAAgB,CAAC;IACtE,OAAO,CAAC,MAAM,CAAyC;IACvD,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC;IACtB,SAAS,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IAEhD,kBAAkB,aACN,QAAQ,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB;IAIvG;;;;;;;OAOG;IACI,IAAI;IAiBX;;;;;;;OAOG;IACI,OAAO,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI;IAK5C,OAAO,CAAC,kBAAkB;IAQ1B,OAAO,CAAC,2BAA2B;IAkBnC,OAAO,CAAC,+BAA+B;IAqCvC,OAAO,CAAC,iBAAiB;CA+C5B;AAED,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
|