@paydock/client-sdk 1.108.2-beta → 1.110.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +990 -1
- package/bundles/index.cjs +4373 -3527
- package/bundles/index.cjs.d.ts +465 -47
- package/bundles/index.mjs +4371 -3527
- 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 +4373 -3527
- 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 +5 -4
- 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
package/bundles/index.mjs.d.ts
CHANGED
|
@@ -689,7 +689,7 @@ interface IEventData$1 {
|
|
|
689
689
|
data?: any;
|
|
690
690
|
ref_id?: string;
|
|
691
691
|
}
|
|
692
|
-
declare const EVENT: {
|
|
692
|
+
declare const EVENT$1: {
|
|
693
693
|
AFTER_LOAD: string;
|
|
694
694
|
SUBMIT: string;
|
|
695
695
|
FINISH: string;
|
|
@@ -895,6 +895,7 @@ declare class Configuration {
|
|
|
895
895
|
declare class EventEmitter {
|
|
896
896
|
private events;
|
|
897
897
|
emit<T>(eventName: string, data?: T): void;
|
|
898
|
+
emitWithResult<T, R>(eventName: string, data?: T): Promise<R[]>;
|
|
898
899
|
subscribe<T>(eventName: string, handler: (data: T) => void): () => void;
|
|
899
900
|
}
|
|
900
901
|
|
|
@@ -1877,6 +1878,17 @@ interface ProcessAuthenticationResponse {
|
|
|
1877
1878
|
};
|
|
1878
1879
|
}
|
|
1879
1880
|
|
|
1881
|
+
declare class ApiGatewayInternal {
|
|
1882
|
+
protected api: ApiInternal;
|
|
1883
|
+
constructor(api: ApiInternal);
|
|
1884
|
+
getWalletConfig(gateway_id: string): Promise<GetWalletConfigResponse>;
|
|
1885
|
+
}
|
|
1886
|
+
interface GetWalletConfigResponse {
|
|
1887
|
+
type: string;
|
|
1888
|
+
mode: string;
|
|
1889
|
+
credentials?: object;
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1880
1892
|
declare class ApiServiceInternal {
|
|
1881
1893
|
protected api: ApiInternal;
|
|
1882
1894
|
constructor(api: ApiInternal);
|
|
@@ -1894,6 +1906,7 @@ interface GetConfigResponse {
|
|
|
1894
1906
|
declare class ApiInternal extends ApiBase {
|
|
1895
1907
|
charge(): ApiChargeInternal;
|
|
1896
1908
|
service(): ApiServiceInternal;
|
|
1909
|
+
gateway(): ApiGatewayInternal;
|
|
1897
1910
|
}
|
|
1898
1911
|
|
|
1899
1912
|
interface SRCProvider {
|
|
@@ -2123,51 +2136,6 @@ declare class VaultDisplayWidget {
|
|
|
2123
2136
|
load(): void;
|
|
2124
2137
|
}
|
|
2125
2138
|
|
|
2126
|
-
interface IWalletPaymentSuccessful {
|
|
2127
|
-
id: string;
|
|
2128
|
-
amount: number;
|
|
2129
|
-
currency: string;
|
|
2130
|
-
status: string;
|
|
2131
|
-
payer_name?: string;
|
|
2132
|
-
payer_email?: string;
|
|
2133
|
-
payer_phone?: string;
|
|
2134
|
-
}
|
|
2135
|
-
interface IWalletUnavailable {
|
|
2136
|
-
wallet?: WALLET_TYPE;
|
|
2137
|
-
}
|
|
2138
|
-
interface IWalletOnClick {
|
|
2139
|
-
attachResult: (result: Promise<void> | boolean) => void;
|
|
2140
|
-
}
|
|
2141
|
-
interface IWalletUpdate {
|
|
2142
|
-
wallet_response_code?: string;
|
|
2143
|
-
wallet_order_id?: string;
|
|
2144
|
-
wallet_session_id?: string;
|
|
2145
|
-
payment_source?: {
|
|
2146
|
-
wallet_payment_method_id?: string;
|
|
2147
|
-
card_number_last4?: string;
|
|
2148
|
-
card_scheme?: string;
|
|
2149
|
-
};
|
|
2150
|
-
wallet_loyalty_account?: {
|
|
2151
|
-
id?: string;
|
|
2152
|
-
barcode?: string;
|
|
2153
|
-
};
|
|
2154
|
-
shipping?: {
|
|
2155
|
-
address_line1?: string;
|
|
2156
|
-
address_line2?: string;
|
|
2157
|
-
address_postcode?: string;
|
|
2158
|
-
address_city?: string;
|
|
2159
|
-
address_state?: string;
|
|
2160
|
-
address_country?: string;
|
|
2161
|
-
address_company?: string;
|
|
2162
|
-
post_office_box_number?: string;
|
|
2163
|
-
wallet_address_id?: string;
|
|
2164
|
-
wallet_address_name?: string;
|
|
2165
|
-
wallet_address_created_timestamp?: string;
|
|
2166
|
-
wallet_address_updated_timestamp?: string;
|
|
2167
|
-
};
|
|
2168
|
-
selected_shipping_option?: IShippingOption;
|
|
2169
|
-
}
|
|
2170
|
-
|
|
2171
2139
|
interface IWalletServiceUpdateData {
|
|
2172
2140
|
amount: number;
|
|
2173
2141
|
shipping_options?: IShippingOption[];
|
|
@@ -2237,6 +2205,51 @@ interface IWalletService {
|
|
|
2237
2205
|
on(eventName: string, cb?: (data: IUnavailableWalletEventBody | IPaymentMethodSelectedWalletEventBody | any) => void): any;
|
|
2238
2206
|
}
|
|
2239
2207
|
|
|
2208
|
+
interface IWalletPaymentSuccessful {
|
|
2209
|
+
id: string;
|
|
2210
|
+
amount: number;
|
|
2211
|
+
currency: string;
|
|
2212
|
+
status: string;
|
|
2213
|
+
payer_name?: string;
|
|
2214
|
+
payer_email?: string;
|
|
2215
|
+
payer_phone?: string;
|
|
2216
|
+
}
|
|
2217
|
+
interface IWalletUnavailable {
|
|
2218
|
+
wallet?: WALLET_TYPE;
|
|
2219
|
+
}
|
|
2220
|
+
interface IWalletOnClick {
|
|
2221
|
+
attachResult: (result: Promise<void> | boolean) => void;
|
|
2222
|
+
}
|
|
2223
|
+
interface IWalletUpdate {
|
|
2224
|
+
wallet_response_code?: string;
|
|
2225
|
+
wallet_order_id?: string;
|
|
2226
|
+
wallet_session_id?: string;
|
|
2227
|
+
payment_source?: {
|
|
2228
|
+
wallet_payment_method_id?: string;
|
|
2229
|
+
card_number_last4?: string;
|
|
2230
|
+
card_scheme?: string;
|
|
2231
|
+
};
|
|
2232
|
+
wallet_loyalty_account?: {
|
|
2233
|
+
id?: string;
|
|
2234
|
+
barcode?: string;
|
|
2235
|
+
};
|
|
2236
|
+
shipping?: {
|
|
2237
|
+
address_line1?: string;
|
|
2238
|
+
address_line2?: string;
|
|
2239
|
+
address_postcode?: string;
|
|
2240
|
+
address_city?: string;
|
|
2241
|
+
address_state?: string;
|
|
2242
|
+
address_country?: string;
|
|
2243
|
+
address_company?: string;
|
|
2244
|
+
post_office_box_number?: string;
|
|
2245
|
+
wallet_address_id?: string;
|
|
2246
|
+
wallet_address_name?: string;
|
|
2247
|
+
wallet_address_created_timestamp?: string;
|
|
2248
|
+
wallet_address_updated_timestamp?: string;
|
|
2249
|
+
};
|
|
2250
|
+
selected_shipping_option?: IShippingOption;
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2240
2253
|
interface IEventData {
|
|
2241
2254
|
event: string;
|
|
2242
2255
|
data: void | IWalletPaymentSuccessful | IWalletUpdate | IWalletUnavailable | IWalletOnClick | any;
|
|
@@ -3269,4 +3282,409 @@ declare class HtmlWidget extends HtmlMultiWidget {
|
|
|
3269
3282
|
setGiftCardScheme(giftCardScheme: any, processingNetwork: any): void;
|
|
3270
3283
|
}
|
|
3271
3284
|
|
|
3272
|
-
|
|
3285
|
+
declare enum EVENT {
|
|
3286
|
+
UNAVAILABLE = "unavailable",
|
|
3287
|
+
ERROR = "error",
|
|
3288
|
+
PAYMENT_SUCCESSFUL = "paymentSuccessful",
|
|
3289
|
+
PAYMENT_ERROR = "paymentError",
|
|
3290
|
+
PAYMENT_IN_REVIEW = "paymentInReview",
|
|
3291
|
+
ON_CLICK = "onClick",
|
|
3292
|
+
ON_CHECKOUT_CLOSE = "onCheckoutClose"
|
|
3293
|
+
}
|
|
3294
|
+
|
|
3295
|
+
interface BaseEventData<T> {
|
|
3296
|
+
event: string;
|
|
3297
|
+
chargeId?: string;
|
|
3298
|
+
data?: T | undefined;
|
|
3299
|
+
}
|
|
3300
|
+
|
|
3301
|
+
interface OnClickEventData extends BaseEventData<undefined> {
|
|
3302
|
+
event: EVENT.ON_CLICK;
|
|
3303
|
+
}
|
|
3304
|
+
|
|
3305
|
+
interface OnPaymentSuccessfulEventData extends BaseEventData<{
|
|
3306
|
+
id: string;
|
|
3307
|
+
amount: number;
|
|
3308
|
+
currency: string;
|
|
3309
|
+
status: string;
|
|
3310
|
+
}> {
|
|
3311
|
+
event: EVENT.PAYMENT_SUCCESSFUL;
|
|
3312
|
+
}
|
|
3313
|
+
|
|
3314
|
+
interface OnCloseEventData extends BaseEventData<undefined> {
|
|
3315
|
+
event: EVENT.ON_CHECKOUT_CLOSE;
|
|
3316
|
+
}
|
|
3317
|
+
|
|
3318
|
+
interface OnPaymentInReviewEventData extends Omit<OnPaymentSuccessfulEventData, 'event'> {
|
|
3319
|
+
event: EVENT.PAYMENT_IN_REVIEW;
|
|
3320
|
+
}
|
|
3321
|
+
|
|
3322
|
+
interface OnPaymentErrorEventData extends BaseEventData<{
|
|
3323
|
+
message?: string;
|
|
3324
|
+
code?: string;
|
|
3325
|
+
}> {
|
|
3326
|
+
event: EVENT.PAYMENT_ERROR;
|
|
3327
|
+
}
|
|
3328
|
+
|
|
3329
|
+
interface WalletCaptureRequest {
|
|
3330
|
+
payment_method_id?: string;
|
|
3331
|
+
customer: {
|
|
3332
|
+
email?: string;
|
|
3333
|
+
phone?: string;
|
|
3334
|
+
first_name?: string;
|
|
3335
|
+
last_name?: string;
|
|
3336
|
+
payment_source?: {
|
|
3337
|
+
wallet_type?: string;
|
|
3338
|
+
address_line1?: string;
|
|
3339
|
+
address_line2?: string;
|
|
3340
|
+
address_country?: string;
|
|
3341
|
+
address_city?: string;
|
|
3342
|
+
address_postcode?: string;
|
|
3343
|
+
address_state?: string;
|
|
3344
|
+
ref_token?: string;
|
|
3345
|
+
external_payer_id?: string;
|
|
3346
|
+
};
|
|
3347
|
+
};
|
|
3348
|
+
}
|
|
3349
|
+
|
|
3350
|
+
interface OnUnavailableEventData extends BaseEventData<undefined> {
|
|
3351
|
+
event: EVENT.UNAVAILABLE;
|
|
3352
|
+
}
|
|
3353
|
+
|
|
3354
|
+
interface BaseGatewayConfig<T> {
|
|
3355
|
+
type: string;
|
|
3356
|
+
mode: string;
|
|
3357
|
+
credentials?: T;
|
|
3358
|
+
}
|
|
3359
|
+
|
|
3360
|
+
interface BaseWalletMeta {
|
|
3361
|
+
amount: number;
|
|
3362
|
+
currency: string;
|
|
3363
|
+
}
|
|
3364
|
+
|
|
3365
|
+
interface OnErrorEventData extends BaseEventData<Error> {
|
|
3366
|
+
event: EVENT.ERROR;
|
|
3367
|
+
}
|
|
3368
|
+
|
|
3369
|
+
declare abstract class BaseWalletButton<T extends BaseWalletMeta> {
|
|
3370
|
+
protected container: Container;
|
|
3371
|
+
protected api: ApiInternal;
|
|
3372
|
+
protected env: string;
|
|
3373
|
+
protected gatewayId: string;
|
|
3374
|
+
protected meta: T;
|
|
3375
|
+
private eventEmitter;
|
|
3376
|
+
private chargeWalletTokenMeta?;
|
|
3377
|
+
constructor(selector: string, publicKeyOrAccessToken: string, gatewayId: string, meta: T, requiredMetaFields: string[]);
|
|
3378
|
+
private getApiAuthType;
|
|
3379
|
+
/**
|
|
3380
|
+
* Current method can change environment. By default environment = sandbox.
|
|
3381
|
+
* Also we can change domain alias for this environment. By default domain_alias = paydock.com
|
|
3382
|
+
* Bear in mind that you must set an environment before calling `button.load()`.
|
|
3383
|
+
*
|
|
3384
|
+
* @example
|
|
3385
|
+
* button.setEnv('production', 'paydock.com');
|
|
3386
|
+
* @param {string} env - sandbox, production
|
|
3387
|
+
* @param {string} [alias] - Own domain alias
|
|
3388
|
+
*/
|
|
3389
|
+
setEnv(env: string, alias?: string): void;
|
|
3390
|
+
/**
|
|
3391
|
+
* Callback for onClick method.
|
|
3392
|
+
*
|
|
3393
|
+
* @callback OnClickCallback
|
|
3394
|
+
* @param {OnClickEventData} data
|
|
3395
|
+
* @return {Promise<string>} walletToken string result
|
|
3396
|
+
*/
|
|
3397
|
+
/**
|
|
3398
|
+
* Registers a callback function to be invoked when the wallet button gets clicked.
|
|
3399
|
+
* **Note:** is mandatory to handle this event to perform the wallet initialization (and optionally any validation logic).
|
|
3400
|
+
* The event handler needs to return the wallet token string in order for the Wallet charge processing to proceed, or throw an error in case of failure or validation errors.
|
|
3401
|
+
* **Note:** this callback may be called multiple times as the customer closes the payment checkout and re-clicks the button.
|
|
3402
|
+
* It's the merchant's responsibility to handle this situation and evaluate in each case if generating a new WalletCharge Token is required or the previous one can be used in each case, depending on order data and updates.
|
|
3403
|
+
* In case a new one needs to be generated, remember it will need to be preceded by a `setMeta` call.
|
|
3404
|
+
*
|
|
3405
|
+
* @example
|
|
3406
|
+
* button.onClick(async (data) => {
|
|
3407
|
+
* const responseData = await fetch('https://your-server.com/init-wallet-charge');
|
|
3408
|
+
* return responseData.walletToken;
|
|
3409
|
+
* });
|
|
3410
|
+
*
|
|
3411
|
+
* @param {OnClickCallback} handler - Function to be called when the wallet button is clicked.
|
|
3412
|
+
*/
|
|
3413
|
+
onClick(handler: (data: OnClickEventData) => Promise<string>): () => void;
|
|
3414
|
+
/**
|
|
3415
|
+
* Callback for onPaymentSuccessful method.
|
|
3416
|
+
*
|
|
3417
|
+
* @callback OnPaymentSuccessfulCallback
|
|
3418
|
+
* @param {OnPaymentSuccessfulEventData} data
|
|
3419
|
+
*/
|
|
3420
|
+
/**
|
|
3421
|
+
* If the payment was successful, the function passed as parameter will be called.
|
|
3422
|
+
* Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
3423
|
+
*
|
|
3424
|
+
* @example
|
|
3425
|
+
* button.onPaymentSuccessful((data) => {
|
|
3426
|
+
* console.log('Payment successful!');
|
|
3427
|
+
* });
|
|
3428
|
+
*
|
|
3429
|
+
* @example
|
|
3430
|
+
* button.onPaymentSuccessful().then((data) => console.log('Payment successful!'));
|
|
3431
|
+
*
|
|
3432
|
+
* @param {OnPaymentSuccessfulCallback} [handler] - Function to be called when the payment was successful.
|
|
3433
|
+
*/
|
|
3434
|
+
onPaymentSuccessful(handler?: (data: OnPaymentSuccessfulEventData) => void): Promise<unknown> | (() => void);
|
|
3435
|
+
/**
|
|
3436
|
+
* Callback for onPaymentInReview method.
|
|
3437
|
+
*
|
|
3438
|
+
* @callback OnPaymentInReviewCallback
|
|
3439
|
+
* @param {OnPaymentInReviewEventData} data
|
|
3440
|
+
*/
|
|
3441
|
+
/**
|
|
3442
|
+
* If the payment was left in fraud review, the function passed as parameter will be called.
|
|
3443
|
+
* Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
3444
|
+
*
|
|
3445
|
+
* @example
|
|
3446
|
+
* button.onPaymentInReview((data) => {
|
|
3447
|
+
* console.log('Payment in fraud review');
|
|
3448
|
+
* });
|
|
3449
|
+
*
|
|
3450
|
+
* @example
|
|
3451
|
+
* button.onPaymentInReview().then((data) => console.log('Payment in fraud review'));
|
|
3452
|
+
*
|
|
3453
|
+
* @param {OnPaymentInReviewCallback} [handler] - Function to be called when the payment was left in fraud review status.
|
|
3454
|
+
*/
|
|
3455
|
+
onPaymentInReview(handler?: (err: OnPaymentInReviewEventData) => void): Promise<unknown> | (() => void);
|
|
3456
|
+
/**
|
|
3457
|
+
* Callback for onPaymentError method.
|
|
3458
|
+
*
|
|
3459
|
+
* @callback OnPaymentErrorCallback
|
|
3460
|
+
* @param {OnPaymentErrorEventData} data
|
|
3461
|
+
*/
|
|
3462
|
+
/**
|
|
3463
|
+
* If the payment was not successful, the function passed as parameter will be called.
|
|
3464
|
+
* Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
3465
|
+
*
|
|
3466
|
+
* @example
|
|
3467
|
+
* button.onPaymentError((err) => {
|
|
3468
|
+
* console.log('Payment not successful');
|
|
3469
|
+
* });
|
|
3470
|
+
*
|
|
3471
|
+
* @example
|
|
3472
|
+
* button.onPaymentError().then((err) => console.log('Payment not successful'));
|
|
3473
|
+
*
|
|
3474
|
+
* @param {OnPaymentErrorCallback} [handler] - Function to be called when the payment was not successful.
|
|
3475
|
+
*/
|
|
3476
|
+
onPaymentError(handler?: (err: OnPaymentErrorEventData) => void): Promise<unknown> | (() => void);
|
|
3477
|
+
/**
|
|
3478
|
+
* Callback for onCheckoutClose method.
|
|
3479
|
+
*
|
|
3480
|
+
* @callback OnCheckoutCloseCallback
|
|
3481
|
+
* @param {OnCloseEventData} data
|
|
3482
|
+
*/
|
|
3483
|
+
/**
|
|
3484
|
+
* Registers a callback function to be invoked when the wallet checkout closes.
|
|
3485
|
+
*
|
|
3486
|
+
* @example
|
|
3487
|
+
* button.onCheckoutClose(() => {
|
|
3488
|
+
* console.log('Wallet checkout closes');
|
|
3489
|
+
* });
|
|
3490
|
+
*
|
|
3491
|
+
* @param {OnCheckoutCloseCallback} handler - Function to be called when the wallet checkout closes.
|
|
3492
|
+
*/
|
|
3493
|
+
onCheckoutClose(handler?: (err: OnCloseEventData) => void): Promise<unknown> | (() => void);
|
|
3494
|
+
/**
|
|
3495
|
+
* Callback for onUnavailable method.
|
|
3496
|
+
*
|
|
3497
|
+
* @callback OnUnavailableCallback
|
|
3498
|
+
* @param {OnUnavailableEventData} data
|
|
3499
|
+
*/
|
|
3500
|
+
/**
|
|
3501
|
+
* Registers a callback function to be invoked when the wallet is not available in the current context.
|
|
3502
|
+
*
|
|
3503
|
+
* @example
|
|
3504
|
+
* button.onUnavailable(() => {
|
|
3505
|
+
* console.log('Wallet not available');
|
|
3506
|
+
* });
|
|
3507
|
+
*
|
|
3508
|
+
* @param {OnUnavailableCallback} handler - Function to be called when the wallet is not available in the current context.
|
|
3509
|
+
*/
|
|
3510
|
+
onUnavailable(handler?: (err: OnUnavailableEventData) => void): Promise<unknown> | (() => void);
|
|
3511
|
+
/**
|
|
3512
|
+
* Callback for onError method.
|
|
3513
|
+
*
|
|
3514
|
+
* @callback OnErrorCallback
|
|
3515
|
+
* @param {OnErrorEventData} data
|
|
3516
|
+
*/
|
|
3517
|
+
/**
|
|
3518
|
+
* Registers a callback function to be invoked when an error that is not related to payment execution occurs.
|
|
3519
|
+
* For example, if the amount of the wallet token injected via the `onClick` event handler does not match the amount provided via the initial `meta` or `setMeta` method.
|
|
3520
|
+
*
|
|
3521
|
+
* @example
|
|
3522
|
+
* button.onError((error) => {
|
|
3523
|
+
* console.log('WalletButtonExpress error', error);
|
|
3524
|
+
* });
|
|
3525
|
+
*
|
|
3526
|
+
* @param {OnErrorCallback} handler - Function to be called when the WalletButton has an error.
|
|
3527
|
+
*/
|
|
3528
|
+
onError(handler?: (err: OnErrorEventData) => void): Promise<unknown> | (() => void);
|
|
3529
|
+
/**
|
|
3530
|
+
* Add docs on each child class
|
|
3531
|
+
*/
|
|
3532
|
+
abstract load(): void;
|
|
3533
|
+
/**
|
|
3534
|
+
* Add docs on each child class
|
|
3535
|
+
*/
|
|
3536
|
+
abstract setMeta(meta: object): void;
|
|
3537
|
+
protected getGatewayWalletConfig<T>(): Promise<BaseGatewayConfig<T>>;
|
|
3538
|
+
protected executeWalletCallback<T, U extends {
|
|
3539
|
+
request_type: string;
|
|
3540
|
+
}>(data: U): Promise<T>;
|
|
3541
|
+
protected executeWalletCapture<T>(data: WalletCaptureRequest): Promise<T>;
|
|
3542
|
+
protected handleMerchantOnExpressButtonClickEvent(): Promise<void>;
|
|
3543
|
+
private setWalletToken;
|
|
3544
|
+
protected handleCheckoutClose(): void;
|
|
3545
|
+
protected handleOnUnavailable(): void;
|
|
3546
|
+
protected handleOnError(error?: Error): void;
|
|
3547
|
+
protected eventDataFromApiError(err: any): OnPaymentErrorEventData['data'];
|
|
3548
|
+
protected validateRequiredMetaFields(requiredMetaFields: string[]): void;
|
|
3549
|
+
}
|
|
3550
|
+
|
|
3551
|
+
type ApplePayButtonStyle = 'black' | 'white' | 'white-outline';
|
|
3552
|
+
|
|
3553
|
+
type ApplePayButtonType = 'add-money' | 'book' | 'buy' | 'check-out' | 'continue' | 'contribute' | 'donate' | 'order' | 'pay' | 'plain' | 'reload' | 'rent' | 'set-up' | 'subscribe' | 'support' | 'tip' | 'top-up';
|
|
3554
|
+
|
|
3555
|
+
interface ApplePayWalletMeta extends BaseWalletMeta {
|
|
3556
|
+
amount_label: string;
|
|
3557
|
+
country: string;
|
|
3558
|
+
merchant_capabilities?: Array<'supports3DS' | 'supportsEMV' | 'supportsCredit' | 'supportsDebit'>;
|
|
3559
|
+
supported_networks?: Array<'visa' | 'masterCard' | 'amex' | 'chinaUnionPay' | 'discover' | 'interac' | 'jcb' | 'privateLabel'>;
|
|
3560
|
+
required_billing_contact_fields?: Array<'email' | 'name' | 'phone' | 'postalAddress'>;
|
|
3561
|
+
required_shipping_contact_fields?: Array<'email' | 'phone'>;
|
|
3562
|
+
supported_countries?: string[];
|
|
3563
|
+
style?: {
|
|
3564
|
+
button_type?: ApplePayButtonType;
|
|
3565
|
+
button_style?: ApplePayButtonStyle;
|
|
3566
|
+
};
|
|
3567
|
+
}
|
|
3568
|
+
|
|
3569
|
+
/**
|
|
3570
|
+
* Class ApplePayWalletButtonExpress to work with Apple Pay Wallet.
|
|
3571
|
+
*
|
|
3572
|
+
* @extends BaseWalletButton
|
|
3573
|
+
*
|
|
3574
|
+
* @constructor
|
|
3575
|
+
*
|
|
3576
|
+
* @example
|
|
3577
|
+
* var button = new ApplePayWalletButtonExpress('#wallet-buttons', 'publicKeyOrAccessToken', 'gatewayId', meta);
|
|
3578
|
+
*
|
|
3579
|
+
* @param {string} selector - Selector of html element. Container for the ApplePayWalletButtonExpress.
|
|
3580
|
+
* @param {string} publicKeyOrAccessToken - Public key or Access token for the ApplePayWalletButtonExpress.
|
|
3581
|
+
* @param {string} gatewayId - Gateway ID for the ApplePayWalletButtonExpress.
|
|
3582
|
+
* @param {ApplePayWalletMeta} meta - data that configures the Apple Pay Wallet.
|
|
3583
|
+
*/
|
|
3584
|
+
declare class ApplePayWalletButtonExpress extends BaseWalletButton<ApplePayWalletMeta> {
|
|
3585
|
+
private paymentSession;
|
|
3586
|
+
/** @constructs */ constructor(selector: string, publicKeyOrAccessToken: string, gatewayId: string, meta: ApplePayWalletMeta);
|
|
3587
|
+
/**
|
|
3588
|
+
* Initializes the availability checks and inserts the button if possible.
|
|
3589
|
+
* Otherwise function onUnavailable(handler: VoidFunction) will be called.
|
|
3590
|
+
* **Important**: Is required to invoke this method to render the wallet button.
|
|
3591
|
+
*
|
|
3592
|
+
* @example
|
|
3593
|
+
* button.load();
|
|
3594
|
+
*/
|
|
3595
|
+
load(): void;
|
|
3596
|
+
/**
|
|
3597
|
+
* Call this method if updating the originally-provided meta object after order information changed.
|
|
3598
|
+
* For example, if the order amount has changed from the time where the button was originally rendered.
|
|
3599
|
+
*
|
|
3600
|
+
* @example
|
|
3601
|
+
* button.setMeta(meta);
|
|
3602
|
+
*
|
|
3603
|
+
* @param {ApplePayWalletMeta} meta - // data that configures the Apple Pay Wallet.
|
|
3604
|
+
*/
|
|
3605
|
+
setMeta(meta: ApplePayWalletMeta): void;
|
|
3606
|
+
private checkAvailability;
|
|
3607
|
+
private mount;
|
|
3608
|
+
private onApplePayButtonClicked;
|
|
3609
|
+
private createRequest;
|
|
3610
|
+
private onValidateMerchant;
|
|
3611
|
+
private getMerchantSession;
|
|
3612
|
+
private onPaymentAuthorized;
|
|
3613
|
+
private onCancelPayment;
|
|
3614
|
+
}
|
|
3615
|
+
|
|
3616
|
+
interface PaypalWalletMeta extends BaseWalletMeta {
|
|
3617
|
+
pay_later?: boolean;
|
|
3618
|
+
standalone?: boolean;
|
|
3619
|
+
capture?: boolean;
|
|
3620
|
+
style?: {
|
|
3621
|
+
layout?: 'vertical' | 'horizontal';
|
|
3622
|
+
color?: 'gold' | 'blue' | 'silver' | 'black' | 'white';
|
|
3623
|
+
shape?: 'rect' | 'pill' | 'sharp';
|
|
3624
|
+
borderRadius?: number;
|
|
3625
|
+
height?: number;
|
|
3626
|
+
disableMaxWidth?: boolean;
|
|
3627
|
+
label?: 'paypal' | 'checkout' | 'buynow' | 'pay' | 'installment';
|
|
3628
|
+
tagline?: boolean;
|
|
3629
|
+
messages?: {
|
|
3630
|
+
layout?: 'text' | 'flex';
|
|
3631
|
+
logo?: {
|
|
3632
|
+
type?: 'primary' | 'alternative' | 'inline' | 'none';
|
|
3633
|
+
position?: 'left' | 'right' | 'top';
|
|
3634
|
+
};
|
|
3635
|
+
text?: {
|
|
3636
|
+
color?: 'black' | 'white' | 'monochrome' | 'grayscale';
|
|
3637
|
+
size?: 10 | 11 | 12 | 13 | 14 | 15 | 16;
|
|
3638
|
+
align?: 'left' | 'center' | 'right';
|
|
3639
|
+
};
|
|
3640
|
+
color?: 'blue' | 'black' | 'white' | 'white-no-border' | 'gray' | 'monochrome' | 'grayscale';
|
|
3641
|
+
ratio?: '1x1' | '1x4' | '8x1' | '20x1';
|
|
3642
|
+
};
|
|
3643
|
+
};
|
|
3644
|
+
}
|
|
3645
|
+
|
|
3646
|
+
/**
|
|
3647
|
+
* Class PaypalWalletButtonExpress to work with Paypal Wallet.
|
|
3648
|
+
*
|
|
3649
|
+
* @extends BaseWalletButton
|
|
3650
|
+
*
|
|
3651
|
+
* @constructor
|
|
3652
|
+
*
|
|
3653
|
+
* @example
|
|
3654
|
+
* var button = new PaypalWalletButtonExpress('#wallet-buttons', 'publicKeyOrAccessToken', 'gatewayId', meta);
|
|
3655
|
+
*
|
|
3656
|
+
* @param {string} selector - Selector of html element. Container for the PaypalWalletButtonExpress.
|
|
3657
|
+
* @param {string} publicKeyOrAccessToken - Public key or Access token for the PaypalWalletButtonExpress.
|
|
3658
|
+
* @param {string} gatewayId - Gateway ID for the PaypalWalletButtonExpress.
|
|
3659
|
+
* @param {PaypalWalletMeta} meta - data that configures the Paypal Wallet.
|
|
3660
|
+
*/
|
|
3661
|
+
declare class PaypalWalletButtonExpress extends BaseWalletButton<PaypalWalletMeta> {
|
|
3662
|
+
private config;
|
|
3663
|
+
protected paypal: any;
|
|
3664
|
+
protected pendingApprovalPromise?: Promise<any>;
|
|
3665
|
+
/** @constructs */ constructor(selector: string, publicKeyOrAccessToken: string, gatewayId: string, meta: PaypalWalletMeta);
|
|
3666
|
+
/**
|
|
3667
|
+
* Initializes the availability checks and inserts the button if possible.
|
|
3668
|
+
* Otherwise function onUnavailable(handler: VoidFunction) will be called.
|
|
3669
|
+
* **Important**: Is required to invoke this method to render the wallet button.
|
|
3670
|
+
*
|
|
3671
|
+
* @example
|
|
3672
|
+
* button.load();
|
|
3673
|
+
*/
|
|
3674
|
+
load(): void;
|
|
3675
|
+
/**
|
|
3676
|
+
* Call this method if updating the originally-provided meta object after order information changed.
|
|
3677
|
+
* For example, if the order amount has changed from the time where the button was originally rendered.
|
|
3678
|
+
*
|
|
3679
|
+
* @example
|
|
3680
|
+
* button.setMeta(meta);
|
|
3681
|
+
* @param {PaypalWalletMeta} meta - // data that configures the Paypal Wallet.
|
|
3682
|
+
*/
|
|
3683
|
+
setMeta(meta: PaypalWalletMeta): void;
|
|
3684
|
+
private renderPaypalButton;
|
|
3685
|
+
private renderPaypalCommonComponent;
|
|
3686
|
+
private renderPaypalStandaloneComponent;
|
|
3687
|
+
private paypalSharedProps;
|
|
3688
|
+
}
|
|
3689
|
+
|
|
3690
|
+
export { AfterpayCheckoutButton, Api, ApplePayWalletButtonExpress, CHECKOUT_BUTTON_EVENT, Canvas3ds, ClickToPay, Configuration, ELEMENT, EVENT$1 as EVENT, Builder$1 as ExternalCheckoutBuilder, Checker as ExternalCheckoutChecker, FORM_FIELD, HtmlMultiWidget, HtmlPaymentSourceWidget, HtmlWidget, type ICheckout, type IDetails, type IElementStyleInput, type IEventCheckoutFinishData, type IPayPalMeta, type IStyles$1 as IStyles, type ITexts, MultiWidget, PAYMENT_TYPE, PURPOSE, Builder as PaymentSourceBuilder, PaymentSourceWidget, PaypalCheckoutButton, PaypalWalletButtonExpress, STYLABLE_ELEMENT, STYLABLE_ELEMENT_STATE, STYLE, SUPPORTED_CARD_TYPES, TEXT, TRIGGER, TYPE, VAULT_DISPLAY_STYLE, type VaultDisplayStyle, VaultDisplayWidget, WalletButtons, ZipmoneyCheckoutButton };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ApiInternal } from './api-internal';
|
|
2
|
+
export declare class ApiGatewayInternal {
|
|
3
|
+
protected api: ApiInternal;
|
|
4
|
+
constructor(api: ApiInternal);
|
|
5
|
+
getWalletConfig(gateway_id: string): Promise<GetWalletConfigResponse>;
|
|
6
|
+
}
|
|
7
|
+
export interface GetWalletConfigResponse {
|
|
8
|
+
type: string;
|
|
9
|
+
mode: string;
|
|
10
|
+
credentials?: object;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=api-gateway-internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-gateway-internal.d.ts","sourceRoot":"","sources":["../../src/api/api-gateway-internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C,qBAAa,kBAAkB;IACf,SAAS,CAAC,GAAG,EAAE,WAAW;gBAAhB,GAAG,EAAE,WAAW;IAGtC,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;CAOxE;AAED,MAAM,WAAW,uBAAuB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ApiBase } from './api-base';
|
|
2
2
|
import { ApiChargeInternal } from './api-charge-internal';
|
|
3
|
+
import { ApiGatewayInternal } from './api-gateway-internal';
|
|
3
4
|
import { ApiServiceInternal } from './api-service-internal';
|
|
4
5
|
export { API_AUTH_TYPE } from './api-base';
|
|
5
6
|
export declare class ApiInternal extends ApiBase {
|
|
6
7
|
charge(): ApiChargeInternal;
|
|
7
8
|
service(): ApiServiceInternal;
|
|
9
|
+
gateway(): ApiGatewayInternal;
|
|
8
10
|
}
|
|
9
11
|
//# sourceMappingURL=api-internal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-internal.d.ts","sourceRoot":"","sources":["../../src/api/api-internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,qBAAa,WAAY,SAAQ,OAAO;IACpC,MAAM;IAIN,OAAO;CAGV"}
|
|
1
|
+
{"version":3,"file":"api-internal.d.ts","sourceRoot":"","sources":["../../src/api/api-internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,qBAAa,WAAY,SAAQ,OAAO;IACpC,MAAM;IAIN,OAAO;IAIP,OAAO;CAGV"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare class EventEmitter {
|
|
2
2
|
private events;
|
|
3
3
|
emit<T>(eventName: string, data?: T): void;
|
|
4
|
+
emitWithResult<T, R>(eventName: string, data?: T): Promise<R[]>;
|
|
4
5
|
subscribe<T>(eventName: string, handler: (data: T) => void): () => void;
|
|
5
6
|
}
|
|
6
7
|
//# sourceMappingURL=event-emitter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-emitter.d.ts","sourceRoot":"","sources":["../../src/helper/event-emitter.ts"],"names":[],"mappings":"AAIA,qBAAa,YAAY;IAErB,OAAO,CAAC,MAAM,CAAiB;IAExB,IAAI,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC;IASnC,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,SAMlD,IAAI;CAItB"}
|
|
1
|
+
{"version":3,"file":"event-emitter.d.ts","sourceRoot":"","sources":["../../src/helper/event-emitter.ts"],"names":[],"mappings":"AAIA,qBAAa,YAAY;IAErB,OAAO,CAAC,MAAM,CAAiB;IAExB,IAAI,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC;IASnC,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAW/D,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,SAMlD,IAAI;CAItB"}
|
package/bundles/types/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from './secure-remote-commerce';
|
|
|
8
8
|
export * from './vault-display-widget';
|
|
9
9
|
export * from './wallet-buttons';
|
|
10
10
|
export * from './widget';
|
|
11
|
+
export * from './wallet-buttons-express';
|
|
11
12
|
export { ELEMENT, FORM_FIELD, STYLE, SUPPORTED_CARD_TYPES, TEXT, VAULT_DISPLAY_STYLE, type IPayPalMeta, type IStyles, type ITexts, type VaultDisplayStyle, } from './components/param';
|
|
12
13
|
export { EVENT } from './components/iframe-event';
|
|
13
14
|
export { TRIGGER } from './components/trigger';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,0BAA0B,CAAC;AAEzC,OAAO,EACH,OAAO,EACP,UAAU,EACV,KAAK,EACL,oBAAoB,EACpB,IAAI,EACJ,mBAAmB,EACnB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,KAAK,iBAAiB,GACzB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -46,7 +46,7 @@ export { ClickToPay } from './click-to-pay-secure-remote-commerce';
|
|
|
46
46
|
* @param {string} [customer.first_name] Customer first name.
|
|
47
47
|
* @param {string} [customer.last_name] Customer last name.
|
|
48
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).
|
|
49
|
+
* @param {string} [customer.phone.country_code] Customer phone country code (example "1" for US).
|
|
50
50
|
* @param {string} [customer.phone.phone] Customer phone number.
|
|
51
51
|
* @param {string} [unaccepted_card_type] Used to block a specific card type. Options are 'CREDIT', 'DEBIT'.
|
|
52
52
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { ApiInternal } from "../api/api-internal";
|
|
1
2
|
import { Container } from "../components/container";
|
|
2
|
-
import { IWalletMeta } from "../components/param";
|
|
3
3
|
import { EventEmitter } from "../helper/event-emitter";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { type IWalletService } from "./wallet-services/wallet-service";
|
|
5
|
+
import { type IWalletMeta } from "../components/param";
|
|
6
|
+
import type { IWalletOnClick, IWalletPaymentSuccessful, IWalletUnavailable, IWalletUpdate } from "./interfaces";
|
|
7
7
|
/**
|
|
8
8
|
* List of available event's name in the wallet button lifecycle
|
|
9
9
|
* @const EVENT
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet-buttons.d.ts","sourceRoot":"","sources":["../../src/wallet-buttons/wallet-buttons.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wallet-buttons.d.ts","sourceRoot":"","sources":["../../src/wallet-buttons/wallet-buttons.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { ApiInternal } from "../api/api-internal";
|
|
1
2
|
import { Container } from "../components/container";
|
|
2
|
-
import { IWalletMeta } from "../components/param";
|
|
3
3
|
import { EventEmitter } from "../helper/event-emitter";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { type IWalletService } from "./wallet-services/wallet-service";
|
|
5
|
+
import { type IWalletMeta } from "../components/param";
|
|
6
|
+
import type { IWalletPaymentSuccessful, IWalletUnavailable, IWalletUpdate } from "./interfaces";
|
|
7
7
|
/**
|
|
8
8
|
* List of available event's name in the wallet button lifecycle
|
|
9
9
|
* @const EVENT
|