@paydock/client-sdk 1.143.0-beta → 1.144.0-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 +158 -0
- package/bundles/index.cjs +523 -312
- package/bundles/index.cjs.d.ts +751 -116
- package/bundles/index.mjs +518 -313
- package/bundles/index.mjs.d.ts +751 -116
- package/bundles/types/api/api-charge-internal.d.ts +3 -49
- package/bundles/types/api/api-charge-internal.d.ts.map +1 -1
- package/bundles/types/api/api-checkout-internal.d.ts +1 -47
- package/bundles/types/api/api-checkout-internal.d.ts.map +1 -1
- package/bundles/types/api/api-shared-types.d.ts +53 -0
- package/bundles/types/api/api-shared-types.d.ts.map +1 -0
- package/bundles/types/canvas-3ds/canvas-3ds-event-map.d.ts +95 -0
- package/bundles/types/canvas-3ds/canvas-3ds-event-map.d.ts.map +1 -0
- package/bundles/types/canvas-3ds/canvas-3ds.d.ts +10 -7
- package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +1 -1
- package/bundles/types/canvas-3ds/index.d.ts +4 -0
- package/bundles/types/canvas-3ds/index.d.ts.map +1 -1
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts +41 -12
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +1 -1
- package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts +20 -2
- package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +1 -1
- package/bundles/types/checkout/checkout-event-map.d.ts +43 -0
- package/bundles/types/checkout/checkout-event-map.d.ts.map +1 -0
- package/bundles/types/checkout/checkout.d.ts +25 -9
- package/bundles/types/checkout/checkout.d.ts.map +1 -1
- package/bundles/types/checkout/v1/instructions/instruction.canvas_3ds.show.d.ts.map +1 -1
- package/bundles/types/checkout/v3/instructions/instruction.canvas_3ds.show.d.ts.map +1 -1
- package/bundles/types/components/param.d.ts +29 -0
- package/bundles/types/components/param.d.ts.map +1 -1
- package/bundles/types/helper/event-error.d.ts +49 -1
- package/bundles/types/helper/event-error.d.ts.map +1 -1
- package/bundles/types/index-cba.d.ts +3 -1
- package/bundles/types/index-cba.d.ts.map +1 -1
- package/bundles/types/index.d.ts +12 -1
- package/bundles/types/index.d.ts.map +1 -1
- package/bundles/types/open-wallets/base/open-wallet-buttons.d.ts +37 -0
- package/bundles/types/open-wallets/base/open-wallet-buttons.d.ts.map +1 -1
- package/bundles/types/open-wallets/base/open-wallet.service.d.ts +12 -0
- package/bundles/types/open-wallets/base/open-wallet.service.d.ts.map +1 -1
- package/bundles/types/open-wallets/google-pay-open-wallet-button.d.ts.map +1 -1
- package/bundles/types/open-wallets/index.d.ts +25 -0
- package/bundles/types/open-wallets/index.d.ts.map +1 -1
- package/bundles/types/open-wallets/interfaces/apple-pay/apple-pay-payment-request.interface.d.ts +2 -2
- package/bundles/types/open-wallets/interfaces/apple-pay/apple-pay-payment-request.interface.d.ts.map +1 -1
- package/bundles/types/open-wallets/interfaces/apple-pay/index.d.ts +1 -1
- package/bundles/types/open-wallets/interfaces/apple-pay/index.d.ts.map +1 -1
- package/bundles/types/open-wallets/interfaces/events.interface.d.ts +1 -1
- package/bundles/types/open-wallets/interfaces/events.interface.d.ts.map +1 -1
- package/bundles/types/open-wallets/interfaces/google-pay/google-pay-meta.interface.d.ts +46 -0
- package/bundles/types/open-wallets/interfaces/google-pay/google-pay-meta.interface.d.ts.map +1 -1
- package/bundles/types/open-wallets/services/apple-pay/apple-pay.open-wallet.service.d.ts +48 -2
- package/bundles/types/open-wallets/services/apple-pay/apple-pay.open-wallet.service.d.ts.map +1 -1
- package/bundles/types/open-wallets/services/google-pay/google-pay.open-wallet.service.d.ts.map +1 -1
- package/bundles/types/open-wallets/types/index.d.ts +1 -1
- package/bundles/types/open-wallets/types/index.d.ts.map +1 -1
- package/bundles/types/open-wallets/types/payment-source.type.d.ts +104 -0
- package/bundles/types/open-wallets/types/payment-source.type.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/interfaces.d.ts +55 -1
- package/bundles/types/wallet-buttons/interfaces.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/base-wallet-meta.interface.d.ts +7 -0
- package/bundles/types/wallet-buttons-express/interfaces/base-wallet-meta.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-wallet-meta.interface.d.ts +23 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-wallet-meta.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/services/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 -1
- package/bundles/widget.umd.js +523 -312
- package/bundles/widget.umd.js.d.ts +751 -116
- package/bundles/widget.umd.js.min.d.ts +751 -116
- package/bundles/widget.umd.min.js +1 -1
- package/docs/api-canvas3ds.md +19 -12
- package/docs/open-wallet-buttons.md +158 -0
- package/package.json +1 -1
|
@@ -4,15 +4,27 @@ import type { OpenWalletMeta, OpenWalletMetaStyles } from '../open-wallet-meta.i
|
|
|
4
4
|
export type GooglePayAuthMethod = 'PAN_ONLY' | 'CRYPTOGRAM_3DS';
|
|
5
5
|
export type GooglePayCardNetwork = 'AMEX' | 'DISCOVER' | 'ELECTRON' | 'ELO' | 'ELO_DEBIT' | 'INTERAC' | 'JCB' | 'MAESTRO' | 'MASTERCARD' | 'VISA';
|
|
6
6
|
type BillingAddressFormat = 'MIN' | 'FULL';
|
|
7
|
+
/**
|
|
8
|
+
* Styling configuration for the Google Pay button.
|
|
9
|
+
*/
|
|
7
10
|
export interface GooglePayOpenWalletMetaStyles extends OpenWalletMetaStyles {
|
|
11
|
+
/** Variant displayed on the button (e.g. `'pay'`, `'buy'`, `'checkout'`). */
|
|
8
12
|
button_type?: GooglePayButtonType;
|
|
13
|
+
/** Sizing strategy: `'static'` keeps the intrinsic size; `'fill'` stretches to the container. */
|
|
9
14
|
button_size_mode?: GooglePayButtonSizeMode;
|
|
15
|
+
/** Color scheme: `'default'`, `'black'`, or `'white'`. */
|
|
10
16
|
button_color?: GooglePayButtonColor;
|
|
11
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Metadata required to configure a Google Pay Open Wallet button.
|
|
20
|
+
* Extends {@link OpenWalletMeta} (amount, currency, country) with Google Pay specifics.
|
|
21
|
+
*/
|
|
12
22
|
export interface GooglePayOpenWalletMeta extends OpenWalletMeta {
|
|
23
|
+
/** Display name shown in the Google Pay sheet (e.g. `'Demo Store'`). */
|
|
13
24
|
merchant_name?: string;
|
|
14
25
|
/** Whether shipping address collection is required. */
|
|
15
26
|
request_shipping?: boolean;
|
|
27
|
+
/** Whether to surface billing address fields in the sheet. */
|
|
16
28
|
show_billing_address?: boolean;
|
|
17
29
|
/**
|
|
18
30
|
* Available shipping options to display in the payment sheet.
|
|
@@ -20,38 +32,72 @@ export interface GooglePayOpenWalletMeta extends OpenWalletMeta {
|
|
|
20
32
|
* Requires `request_shipping` to be `true`.
|
|
21
33
|
*/
|
|
22
34
|
shipping_options?: IGooglePayShippingOption[];
|
|
35
|
+
/** Label shown next to the total amount in the sheet (e.g. `'TOTAL'`). */
|
|
23
36
|
amount_label?: string;
|
|
37
|
+
/** Visual styling for the button. */
|
|
24
38
|
style?: GooglePayOpenWalletMetaStyles;
|
|
39
|
+
/** Override the default card configuration (auth methods, allowed networks, tokenization). */
|
|
25
40
|
card_config?: GooglePayCardConfig;
|
|
26
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Card configuration passed to Google Pay's `PaymentDataRequest`.
|
|
44
|
+
* Mirrors Google Pay's
|
|
45
|
+
* [PaymentMethodSpecification](https://developers.google.com/pay/api/web/reference/request-objects#PaymentMethod)
|
|
46
|
+
* with snake_case keys.
|
|
47
|
+
*/
|
|
27
48
|
export interface GooglePayCardConfig {
|
|
49
|
+
/** Payment method type Google Pay should display. `'CARD'` for card payments, `'PAYPAL'` for PayPal-via-Google Pay. */
|
|
28
50
|
type: 'CARD' | 'PAYPAL';
|
|
51
|
+
/** Method-specific parameters that filter the cards Google Pay will offer. */
|
|
29
52
|
parameters: {
|
|
53
|
+
/** Allowed authentication methods. `'PAN_ONLY'` for FPAN (server-side decryption); `'CRYPTOGRAM_3DS'` for DPAN (device tokens). */
|
|
30
54
|
allowed_auth_methods: GooglePayAuthMethod[];
|
|
55
|
+
/** Card networks the merchant accepts. */
|
|
31
56
|
allowed_card_networks: GooglePayCardNetwork[];
|
|
57
|
+
/** Whether prepaid cards are allowed. Defaults to Google Pay's default. */
|
|
32
58
|
allow_prepaid_cards?: boolean;
|
|
59
|
+
/** Whether credit cards are allowed. Defaults to Google Pay's default. */
|
|
33
60
|
allow_credit_cards?: boolean;
|
|
61
|
+
/** Request `assuranceDetails` in the payment response (gives risk-signal hints from Google). */
|
|
34
62
|
assurance_details_required?: boolean;
|
|
63
|
+
/** Whether the billing address must be collected. */
|
|
35
64
|
billing_address_required?: boolean;
|
|
65
|
+
/** Billing address collection options. Only honored when `billing_address_required` is `true`. */
|
|
36
66
|
billing_address_parameters?: {
|
|
67
|
+
/** Format of the collected billing address: `'MIN'` (minimal) or `'FULL'`. */
|
|
37
68
|
format: BillingAddressFormat;
|
|
69
|
+
/** Whether to also collect the phone number. */
|
|
38
70
|
phone_number_required?: boolean;
|
|
39
71
|
};
|
|
72
|
+
/** Per-network parameters such as acquirer routing hints. */
|
|
40
73
|
card_network_parameters?: {
|
|
74
|
+
/** The card network this entry applies to. */
|
|
41
75
|
card_network: GooglePayCardNetwork;
|
|
76
|
+
/** Acquirer BIN — used by the gateway to route the transaction. */
|
|
42
77
|
acquirer_bin?: string;
|
|
78
|
+
/** Acquirer-assigned merchant identifier. */
|
|
43
79
|
acquirer_merchant_id?: string;
|
|
44
80
|
}[];
|
|
45
81
|
};
|
|
82
|
+
/**
|
|
83
|
+
* How Google Pay should tokenize the payment method. Paydock typically configures this server-side
|
|
84
|
+
* and you should NOT pass it unless you fully understand the implications of overriding the default.
|
|
85
|
+
*/
|
|
46
86
|
tokenization_specification?: {
|
|
87
|
+
/** Standard payment-gateway tokenization. */
|
|
47
88
|
type: 'PAYMENT_GATEWAY';
|
|
89
|
+
/** Gateway-specific tokenization parameters (e.g. `gateway`, `gatewayMerchantId`). */
|
|
48
90
|
parameters: {
|
|
49
91
|
[key: string]: string;
|
|
50
92
|
};
|
|
51
93
|
} | {
|
|
94
|
+
/** Direct integration where Google encrypts the payload with the merchant's public key. */
|
|
52
95
|
type: 'DIRECT';
|
|
96
|
+
/** Direct-tokenization parameters required by Google's payload encryption. */
|
|
53
97
|
parameters: {
|
|
98
|
+
/** Protocol version expected by the merchant (currently `'ECv2'`). */
|
|
54
99
|
protocol_version: string;
|
|
100
|
+
/** Merchant's public key used to encrypt the payload. */
|
|
55
101
|
public_key: string;
|
|
56
102
|
};
|
|
57
103
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-pay-meta.interface.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/interfaces/google-pay/google-pay-meta.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,KAAK,EACV,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,gBAAgB,CAAC;AAChE,MAAM,MAAM,oBAAoB,GAC5B,MAAM,GACN,UAAU,GACV,UAAU,GACV,KAAK,GACL,WAAW,GACX,SAAS,GACT,KAAK,GACL,SAAS,GACT,YAAY,GACZ,MAAM,CAAC;AACX,KAAK,oBAAoB,GAAG,KAAK,GAAG,MAAM,CAAC;AAE3C,MAAM,WAAW,6BAA8B,SAAQ,oBAAoB;IACzE,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,gBAAgB,CAAC,EAAE,uBAA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zB,UAAU,EAAE,MAAM,CAAC;SACpB,CAAC;KACH,CAAC;CACP"}
|
|
1
|
+
{"version":3,"file":"google-pay-meta.interface.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/interfaces/google-pay/google-pay-meta.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,KAAK,EACV,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,gBAAgB,CAAC;AAChE,MAAM,MAAM,oBAAoB,GAC5B,MAAM,GACN,UAAU,GACV,UAAU,GACV,KAAK,GACL,WAAW,GACX,SAAS,GACT,KAAK,GACL,SAAS,GACT,YAAY,GACZ,MAAM,CAAC;AACX,KAAK,oBAAoB,GAAG,KAAK,GAAG,MAAM,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,oBAAoB;IACzE,6EAA6E;IAC7E,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,iGAAiG;IACjG,gBAAgB,CAAC,EAAE,uBAAuB,CAAC;IAC3C,0DAA0D;IAC1D,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC7D,wEAAwE;IACxE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uDAAuD;IACvD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,8DAA8D;IAC9D,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAC9C,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,KAAK,CAAC,EA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YACzB,yDAAyD;YACzD,UAAU,EAAE,MAAM,CAAC;SACpB,CAAC;KACH,CAAC;CACP"}
|
|
@@ -6,7 +6,7 @@ import type { IApplePayShippingOption } from '../../../components/param';
|
|
|
6
6
|
import type { EventEmitter } from '../../../helper/event-emitter';
|
|
7
7
|
import { OpenWalletService } from '../../base/open-wallet.service';
|
|
8
8
|
import type { OpenWalletMeta } from '../../interfaces';
|
|
9
|
-
import type { ApplePayPaymentRequest } from '../../interfaces/apple-pay';
|
|
9
|
+
import type { ApplePayLineItem, ApplePayMerchantCapability, ApplePayPaymentRequest } from '../../interfaces/apple-pay';
|
|
10
10
|
import type { OpenWalletMetaStyles } from '../../interfaces/open-wallet-meta.interface';
|
|
11
11
|
import type { ApplePayButtonStyle, ApplePayButtonType } from '../../types/apple-pay';
|
|
12
12
|
declare global {
|
|
@@ -14,13 +14,53 @@ declare global {
|
|
|
14
14
|
ApplePaySession: ApplePaySession;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
+
/** Styling configuration for the Apple Pay button. */
|
|
17
18
|
interface ApplePayOpenWalletMetaStyles extends OpenWalletMetaStyles {
|
|
19
|
+
/** Variant displayed on the button (e.g. `'buy'`, `'donate'`, `'plain'`, `'check-out'`). */
|
|
18
20
|
button_type?: ApplePayButtonType;
|
|
21
|
+
/** Color scheme: `'black'`, `'white'`, or `'white-outline'`. */
|
|
19
22
|
button_style?: ApplePayButtonStyle;
|
|
20
23
|
}
|
|
21
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Fields that the SDK auto-populates in `adaptMeta()` if not provided by the merchant.
|
|
26
|
+
* Declared here so we can override them as optional in `ApplePayOpenWalletMeta` while
|
|
27
|
+
* keeping the strict `ApplePayPaymentRequest` intact for internal consumers.
|
|
28
|
+
*/
|
|
29
|
+
type ApplePayAutoFilledFields = 'merchant_capabilities' | 'supported_networks' | 'country_code' | 'currency_code' | 'total';
|
|
30
|
+
/**
|
|
31
|
+
* Metadata required to configure an Apple Pay Open Wallet button.
|
|
32
|
+
* Extends {@link OpenWalletMeta} (amount, currency, country) plus most of the
|
|
33
|
+
* fields from Apple's `ApplePayPaymentRequest`. Fields that the SDK auto-populates
|
|
34
|
+
* in `adaptMeta()` are redeclared as optional below.
|
|
35
|
+
*/
|
|
36
|
+
export interface ApplePayOpenWalletMeta extends OpenWalletMeta, Omit<ApplePayPaymentRequest, ApplePayAutoFilledFields> {
|
|
37
|
+
/** Label shown next to the total in the Apple Pay sheet (e.g. `'TOTAL'`, `'Order total'`). */
|
|
22
38
|
amount_label: string;
|
|
39
|
+
/** Merchant's store name displayed during payment authorization. */
|
|
23
40
|
store_name: string;
|
|
41
|
+
/**
|
|
42
|
+
* Auto-populated from `country.toUpperCase()` if not provided.
|
|
43
|
+
* Only set explicitly when you need a different country code than `country`.
|
|
44
|
+
*/
|
|
45
|
+
country_code?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Auto-populated from `currency.toUpperCase()` if not provided.
|
|
48
|
+
* Only set explicitly when you need a different currency code than `currency`.
|
|
49
|
+
*/
|
|
50
|
+
currency_code?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Auto-populated from `amount` and `amount_label` if not provided.
|
|
53
|
+
* Set explicitly to customize the total line item (e.g. with a specific `type`).
|
|
54
|
+
*/
|
|
55
|
+
total?: ApplePayLineItem;
|
|
56
|
+
/**
|
|
57
|
+
* Defaults to `['supports3DS', 'supportsCredit', 'supportsDebit']` if not provided.
|
|
58
|
+
*/
|
|
59
|
+
merchant_capabilities?: ApplePayMerchantCapability[];
|
|
60
|
+
/**
|
|
61
|
+
* Defaults to `['visa', 'masterCard', 'amex', 'discover']` if not provided.
|
|
62
|
+
*/
|
|
63
|
+
supported_networks?: string[];
|
|
24
64
|
/** Whether shipping address collection is required. */
|
|
25
65
|
request_shipping?: boolean;
|
|
26
66
|
/**
|
|
@@ -29,8 +69,14 @@ export interface ApplePayOpenWalletMeta extends OpenWalletMeta, ApplePayPaymentR
|
|
|
29
69
|
* Requires `request_shipping` to be `true`.
|
|
30
70
|
*/
|
|
31
71
|
shipping_options?: IApplePayShippingOption[];
|
|
72
|
+
/** Whether to surface billing address fields in the sheet. When `true` and `required_billing_contact_fields` is unset, the SDK defaults the latter to `['name', 'postalAddress']`. */
|
|
32
73
|
show_billing_address?: boolean;
|
|
74
|
+
/** Visual styling for the Apple Pay button. */
|
|
33
75
|
style?: ApplePayOpenWalletMetaStyles;
|
|
76
|
+
/**
|
|
77
|
+
* Device capabilities allowed for the wallet button to be considered available.
|
|
78
|
+
* Used as a relaxation knob for testing — defaults to `['paymentCredentialsAvailable']` only.
|
|
79
|
+
*/
|
|
34
80
|
apple_pay_capabilities?: Array<'credentials_available' | 'credentials_status_unknown' | 'credentials_unavailable'>;
|
|
35
81
|
}
|
|
36
82
|
/**
|
package/bundles/types/open-wallets/services/apple-pay/apple-pay.open-wallet.service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apple-pay.open-wallet.service.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/services/apple-pay/apple-pay.open-wallet.service.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"apple-pay.open-wallet.service.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/services/apple-pay/apple-pay.open-wallet.service.ts"],"names":[],"mappings":";AAAA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C,uBAAuB;IAmC/B,OAAO,CAAC,eAAe,CAIrB;IAEF,OAAO,CAAC,kBAAkB;IAqB1B,OAAO,CAAC,kBAAkB,CAcxB;YAEY,gCAAgC;IAW9C,OAAO,CAAC,mBAAmB,CAgDzB;IAEF,OAAO,CAAC,qBAAqB,CAQvB;IAEN,OAAO,CAAC,kBAAkB;IAc1B,OAAO,CAAC,iBAAiB;IA2BzB,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,wBAAwB,CAmD9B;IAEF,OAAO,CAAC,+BAA+B;IAuBvC,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,uBAAuB,CA+C7B;IAEF,OAAO,CAAC,8BAA8B;IAWtC,OAAO,CAAC,yCAAyC;IA2BjD,OAAO,CAAC,+BAA+B;IAsEvC,OAAO,CAAC,mBAAmB;CAK5B"}
|
package/bundles/types/open-wallets/services/google-pay/google-pay.open-wallet.service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-pay.open-wallet.service.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/services/google-pay/google-pay.open-wallet.service.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAG/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGnE,OAAO,KAAK,EAIV,uBAAuB,EAExB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAoB3C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,OAAO,MAAM,CAAC;KACvB;CACF;AAED;;;;;;;;GAQG;AACH,qBAAa,0BAA2B,SAAQ,iBAAiB;IAwB7D,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,aAAa;IAxBvB,SAAgB,UAAU,2BAA2B;IACrD,OAAO,CAAC,cAAc,CAAqC;IAC3D,OAAO,CAAC,kCAAkC,CAE5B;IACd,OAAO,CAAC,iCAAiC,CAAyC;IAClF,OAAO,CAAC,sBAAsB,CAA2B;IACzD,OAAO,CAAC,qBAAqB,CAAS;IACtC,OAAO,CAAC,yBAAyB,CAAS;IAE1C;;;;;;;OAOG;gBAED,GAAG,EAAE,WAAW,EAChB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,SAAS,EACZ,IAAI,EAAE,uBAAuB,EAC7B,aAAa,EAAE,iBAAiB;IAY7B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAa3B,OAAO,CAAC,IAAI,EAAE,uBAAuB,GAAG,IAAI;IAInD,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,mBAAmB;IA6B3B,OAAO,CAAC,cAAc;YAmCR,iBAAiB;IAW/B,OAAO,CAAC,KAAK;IAcb,OAAO,CAAC,wBAAwB;
|
|
1
|
+
{"version":3,"file":"google-pay.open-wallet.service.d.ts","sourceRoot":"","sources":["../../../../src/open-wallets/services/google-pay/google-pay.open-wallet.service.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAG/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGnE,OAAO,KAAK,EAIV,uBAAuB,EAExB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAA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oEf"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { OpenWalletBaseEvent, OpenWalletDataEvent } from './base-event-data.interface';
|
|
1
|
+
export type { OpenWalletBaseEvent, OpenWalletDataEvent, } from './base-event-data.interface';
|
|
2
2
|
export type { Billing, CheckoutActionCode, CheckoutResponse, CreateOTTData, CreateOTTRequest, CreateOTTResponse, CreateSessionRequest, CreateSessionResponse, OTTResponse, Shipping, } from './payment-source.type';
|
|
3
3
|
export type { WalletType } from './wallet-type.type';
|
|
4
4
|
export { WALLET_TYPES } from './wallet-type.type';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/open-wallets/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/open-wallets/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,OAAO,EACP,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,QAAQ,GACT,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -6,80 +6,184 @@ import type { PAYLOAD_FORMAT } from '../enum/payload-format.enum';
|
|
|
6
6
|
import type { SERVICE_GROUP } from '../enum/service-group.enum';
|
|
7
7
|
import type { TOKEN_TYPE } from '../enum/token-type.enum';
|
|
8
8
|
import type { WalletType } from './wallet-type.type';
|
|
9
|
+
/**
|
|
10
|
+
* The created One-Time Token (OTT) returned by the SDK after the user authorizes
|
|
11
|
+
* a wallet payment. Use `temp_token` server-side to create the actual charge via
|
|
12
|
+
* `POST /v1/charges` (or equivalent).
|
|
13
|
+
*/
|
|
9
14
|
export interface CreateOTTResponse {
|
|
15
|
+
/** The temporary one-time token string. Single use, short TTL — exchange it server-side immediately. */
|
|
10
16
|
temp_token: string;
|
|
17
|
+
/** Token classification. `CARD` for FPAN (Google Pay only); `CARD_SCHEME_TOKEN` for DPAN (Apple Pay & Google Pay). */
|
|
11
18
|
token_type: TOKEN_TYPE;
|
|
12
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Billing address captured from the wallet payment sheet, when requested via
|
|
22
|
+
* `required_billing_contact_fields` (Apple Pay) or equivalent (Google Pay).
|
|
23
|
+
*/
|
|
13
24
|
export interface Billing {
|
|
25
|
+
/** First street address line. */
|
|
14
26
|
address_line1: string;
|
|
27
|
+
/** Second street address line. Empty string when the wallet did not provide it. */
|
|
15
28
|
address_line2: string;
|
|
29
|
+
/** ISO 3166-1 alpha-2 country code (e.g. `'AU'`, `'US'`). */
|
|
16
30
|
address_country: string;
|
|
31
|
+
/** City. */
|
|
17
32
|
address_city: string;
|
|
33
|
+
/** Postal/ZIP code. */
|
|
18
34
|
address_postcode: string;
|
|
35
|
+
/** State or administrative area (e.g. `'NSW'`, `'CA'`). */
|
|
19
36
|
address_state: string;
|
|
20
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Card details captured when the wallet returns a card-scheme token (DPAN).
|
|
40
|
+
* Only the non-sensitive metadata is exposed — full card numbers never reach the SDK.
|
|
41
|
+
*/
|
|
21
42
|
export interface CardInfo {
|
|
43
|
+
/** Card network identifier from the wallet (e.g. `'visa'`, `'mastercard'`, `'amex'`). */
|
|
22
44
|
card_scheme: string;
|
|
45
|
+
/** Last 4 digits of the card, when the wallet provider exposes them. */
|
|
23
46
|
card_number_last4?: string;
|
|
24
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Internal payload the SDK sends to Paydock when creating a One-Time Token.
|
|
50
|
+
* Exposed publicly so integrators can construct fixtures for testing.
|
|
51
|
+
*/
|
|
25
52
|
export interface CreateOTTData {
|
|
53
|
+
/** Charge amount as a number (e.g. `19.99`). */
|
|
26
54
|
amount: number;
|
|
55
|
+
/** Shipping address and contact info captured from the wallet. */
|
|
27
56
|
shipping: Shipping;
|
|
57
|
+
/** Billing address captured from the wallet. */
|
|
28
58
|
billing: Billing;
|
|
59
|
+
/** Card metadata captured from the wallet (network, last 4). */
|
|
29
60
|
card_info: CardInfo;
|
|
61
|
+
/** Wallet-provider reference token (DPAN/FPAN payload) used by Paydock to settle the charge. */
|
|
30
62
|
ref_token: string;
|
|
31
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Request body used internally when calling Paydock's OTT-creation endpoint.
|
|
66
|
+
* Exposed publicly so integrators can mirror the shape if they need to. */
|
|
32
67
|
export interface CreateOTTRequest {
|
|
68
|
+
/** The Paydock service ID configured in the merchant dashboard for this wallet. */
|
|
33
69
|
service_id: string;
|
|
70
|
+
/** Wallet type identifier (Apple Pay, Google Pay, etc.). */
|
|
34
71
|
service_type: SERVICE_TYPES;
|
|
72
|
+
/** Service group classification (e.g. `'WALLET'`). */
|
|
35
73
|
service_group: SERVICE_GROUP;
|
|
74
|
+
/** Encrypted/encoded payload from the wallet (DPAN/FPAN data). */
|
|
36
75
|
payload: string;
|
|
76
|
+
/** Encoding format of `payload` — currently `'encrypted_string'`. */
|
|
37
77
|
payload_format: PAYLOAD_FORMAT;
|
|
38
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Request body sent when initiating a wallet session against Paydock
|
|
81
|
+
* (used by the Apple Pay merchant validation flow).
|
|
82
|
+
*/
|
|
39
83
|
export interface CreateSessionRequest {
|
|
84
|
+
/** The Paydock service ID for the wallet. */
|
|
40
85
|
service_id: string;
|
|
86
|
+
/** Caller-controlled session identifier — Paydock binds the session to this id. */
|
|
41
87
|
session_id: string;
|
|
88
|
+
/** Whether the wallet sheet should ask the user for shipping. */
|
|
42
89
|
request_shipping?: boolean;
|
|
90
|
+
/** Merchant store name displayed in the wallet sheet. */
|
|
43
91
|
store_name: string;
|
|
44
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Response returned by Paydock after creating a wallet session.
|
|
95
|
+
* Used internally by the SDK to drive merchant validation; rarely consumed directly.
|
|
96
|
+
*/
|
|
45
97
|
export interface CreateSessionResponse {
|
|
98
|
+
/** Paydock session identifier. */
|
|
46
99
|
id: string;
|
|
100
|
+
/** Session status (e.g. `'active'`). */
|
|
47
101
|
status: string;
|
|
102
|
+
/** HTTP method the SDK should use to invoke the callback URL. */
|
|
48
103
|
callback_method: string;
|
|
104
|
+
/** Relation/role of the callback (e.g. `'merchant_validation'`). */
|
|
49
105
|
callback_rel: string;
|
|
106
|
+
/** URL the SDK calls to complete the merchant validation step. */
|
|
50
107
|
callback_url: string;
|
|
51
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Union of the native wallet authorization payloads the SDK may receive
|
|
111
|
+
* from Apple Pay or Google Pay at the moment of payment authorization.
|
|
112
|
+
* Used internally; rarely exposed to integrators directly.
|
|
113
|
+
*/
|
|
52
114
|
export type CheckoutResponse = ApplePayJS.ApplePayPaymentAuthorizedEvent | google.payments.api.PaymentAuthorizationResult | google.payments.api.PaymentData;
|
|
115
|
+
/**
|
|
116
|
+
* Action codes returned by the SDK during the wallet checkout lifecycle.
|
|
117
|
+
* Mirrors the ApplePay payment authorization completion codes used internally
|
|
118
|
+
* to decide what UI/state transition to perform next.
|
|
119
|
+
*/
|
|
53
120
|
export declare enum CheckoutActionCode {
|
|
121
|
+
/** Payment completed successfully. */
|
|
54
122
|
COMPLETE = "COMPLETE",
|
|
123
|
+
/** User cancelled the wallet sheet. */
|
|
55
124
|
CANCEL = "CANCEL",
|
|
125
|
+
/** An error occurred during payment authorization. */
|
|
56
126
|
ERROR = "ERROR",
|
|
127
|
+
/** User opted to switch to a different card in the wallet. */
|
|
57
128
|
CHANGE_CARD = "CHANGE_CARD",
|
|
129
|
+
/** User opted to add a new card to the wallet. */
|
|
58
130
|
ADD_CARD = "ADD_CARD",
|
|
131
|
+
/** User switched to a different consumer (Click to Pay flow). */
|
|
59
132
|
SWITCH_CONSUMER = "SWITCH_CONSUMER"
|
|
60
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* Token response shape returned by Paydock after creating an OTT.
|
|
136
|
+
* Used by the SDK to decide whether a follow-up 3DS step is required.
|
|
137
|
+
*/
|
|
61
138
|
export interface OTTResponse {
|
|
139
|
+
/** The OTT string. */
|
|
62
140
|
token: string;
|
|
141
|
+
/** Token type identifier (string form of {@link TOKEN_TYPE}). */
|
|
63
142
|
token_type: string;
|
|
143
|
+
/** When `true`, the integrator must invoke a Canvas3DS step before settling the charge. */
|
|
64
144
|
three_ds_required?: boolean;
|
|
145
|
+
/** Which wallet produced the token (Apple Pay or Google Pay). */
|
|
65
146
|
wallet_type: WalletType;
|
|
66
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* Shipping address and contact information captured from the wallet payment sheet,
|
|
150
|
+
* when requested via `request_shipping` (and friends) on the wallet meta.
|
|
151
|
+
*
|
|
152
|
+
* All fields are optional because each wallet provider returns a different subset.
|
|
153
|
+
* Address line fields are typically Apple Pay-only (Google Pay returns a coarser shape).
|
|
154
|
+
*/
|
|
67
155
|
export interface Shipping {
|
|
156
|
+
/** Selected shipping method identifier (e.g. `'standard'`, `'express'`). */
|
|
68
157
|
method?: string;
|
|
158
|
+
/** Updated shipping options that were available when the user made their selection. */
|
|
69
159
|
options?: IShippingOption[];
|
|
160
|
+
/** First street address line (Apple Pay only). */
|
|
70
161
|
address_line1?: string;
|
|
162
|
+
/** Second street address line (Apple Pay only). */
|
|
71
163
|
address_line2?: string;
|
|
164
|
+
/** City. */
|
|
72
165
|
address_city?: string;
|
|
166
|
+
/** Postal/ZIP code. */
|
|
73
167
|
address_postcode?: string;
|
|
168
|
+
/** State or administrative area. */
|
|
74
169
|
address_state?: string;
|
|
170
|
+
/** ISO 3166-1 alpha-2 country code. */
|
|
75
171
|
address_country?: string;
|
|
172
|
+
/** Company name on the address (when the wallet captured it). */
|
|
76
173
|
address_company?: string;
|
|
174
|
+
/** Origin postal code — used for shipping calculations when the merchant ships from a fixed location. */
|
|
77
175
|
address_origin_postcode?: string;
|
|
176
|
+
/** Shipping contact information (Apple Pay only). */
|
|
78
177
|
contact?: {
|
|
178
|
+
/** Contact first name. */
|
|
79
179
|
first_name?: string;
|
|
180
|
+
/** Contact last name. */
|
|
80
181
|
last_name?: string;
|
|
182
|
+
/** Contact email address. */
|
|
81
183
|
email?: string;
|
|
184
|
+
/** Contact phone number. */
|
|
82
185
|
phone?: string;
|
|
186
|
+
/** Contact secondary phone number. */
|
|
83
187
|
phone2?: string;
|
|
84
188
|
};
|
|
85
189
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-source.type.d.ts","sourceRoot":"","sources":["../../../src/open-wallets/types/payment-source.type.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,WAAW,OAAO;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,QAAQ;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,i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Q;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,OAAO,CAAC,EAAE;QACR,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACH"}
|
|
1
|
+
{"version":3,"file":"payment-source.type.d.ts","sourceRoot":"","sources":["../../../src/open-wallets/types/payment-source.type.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,wGAAwG;IACxG,UAAU,EAAE,MAAM,CAAC;IACnB,sHAAsH;IACtH,UAAU,EAAE,UAAU,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,iCAAiC;IACjC,aA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aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uCAAuC;IACvC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iEAAiE;IACjE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yGAAyG;IACzG,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,qDAAqD;IACrD,OAAO,CAAC,EAAE;QACR,0BAA0B;QAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,yBAAyB;QACzB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,6BAA6B;QAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,4BAA4B;QAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,sCAAsC;QACtC,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACH"}
|
|
@@ -1,46 +1,100 @@
|
|
|
1
|
-
import { IShippingOption, WALLET_TYPE } from './../components/param';
|
|
1
|
+
import type { IShippingOption, WALLET_TYPE } from './../components/param';
|
|
2
|
+
/**
|
|
3
|
+
* Payload of the `paymentSuccessful` event emitted by `WalletButtons`.
|
|
4
|
+
* Represents the final charge result returned by the backend.
|
|
5
|
+
*
|
|
6
|
+
* For tamper-resistant validation, do a server-to-server fetch using `id`
|
|
7
|
+
* — never trust this payload alone for fulfillment decisions.
|
|
8
|
+
*/
|
|
2
9
|
export interface IWalletPaymentSuccessful {
|
|
10
|
+
/** Charge identifier returned by the backend. */
|
|
3
11
|
id: string;
|
|
12
|
+
/** Final charge amount as a number. */
|
|
4
13
|
amount: number;
|
|
14
|
+
/** ISO 4217 currency code of the charge. */
|
|
5
15
|
currency: string;
|
|
16
|
+
/** Backend charge status (e.g. `'complete'`, `'pending'`). */
|
|
6
17
|
status: string;
|
|
18
|
+
/** Payer's full name if collected by the wallet. */
|
|
7
19
|
payer_name?: string;
|
|
20
|
+
/** Payer's email if collected by the wallet. */
|
|
8
21
|
payer_email?: string;
|
|
22
|
+
/** Payer's phone number if collected by the wallet. */
|
|
9
23
|
payer_phone?: string;
|
|
10
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Payload of the `unavailable` event emitted by `WalletButtons`.
|
|
27
|
+
* Identifies which wallet became unavailable when more than one is configured.
|
|
28
|
+
*/
|
|
11
29
|
export interface IWalletUnavailable {
|
|
30
|
+
/** The wallet type that is unavailable. Absent when the unavailability is generic. */
|
|
12
31
|
wallet?: WALLET_TYPE;
|
|
13
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Payload of the `onClick` event emitted by `WalletButtons`.
|
|
35
|
+
* Hand back a `Promise<void>` (defer the wallet sheet) or `Promise<boolean>` /
|
|
36
|
+
* `boolean` (return `false` to abort the flow) via `attachResult`.
|
|
37
|
+
*/
|
|
14
38
|
export interface IWalletOnClick {
|
|
39
|
+
/** Attach the result of an async operation to control the wallet flow. Resolving with `false` aborts; `void`/`true` continues. */
|
|
15
40
|
attachResult: (result: Promise<void> | boolean) => void;
|
|
16
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Payload of the `update` event emitted by `WalletButtons` during the wallet flow
|
|
44
|
+
* (e.g. when the user authorizes the payment in the wallet sheet but before the
|
|
45
|
+
* server-side capture completes).
|
|
46
|
+
*/
|
|
17
47
|
export interface IWalletUpdate {
|
|
48
|
+
/** Response code from the wallet provider (provider-specific). */
|
|
18
49
|
wallet_response_code?: string;
|
|
50
|
+
/** Wallet provider's order identifier for this transaction. */
|
|
19
51
|
wallet_order_id?: string;
|
|
52
|
+
/** Wallet provider's session identifier for this interaction. */
|
|
20
53
|
wallet_session_id?: string;
|
|
54
|
+
/** Payment source details captured from the wallet. */
|
|
21
55
|
payment_source?: {
|
|
56
|
+
/** Wallet's internal payment method identifier. */
|
|
22
57
|
wallet_payment_method_id?: string;
|
|
58
|
+
/** Last 4 digits of the card. */
|
|
23
59
|
card_number_last4?: string;
|
|
60
|
+
/** Card network/scheme (e.g. `'visa'`, `'mastercard'`). */
|
|
24
61
|
card_scheme?: string;
|
|
25
62
|
};
|
|
63
|
+
/** Loyalty account details if the wallet provider supports loyalty. */
|
|
26
64
|
wallet_loyalty_account?: {
|
|
65
|
+
/** Loyalty account identifier. */
|
|
27
66
|
id?: string;
|
|
67
|
+
/** Loyalty account barcode. */
|
|
28
68
|
barcode?: string;
|
|
29
69
|
};
|
|
70
|
+
/** Shipping address selected in the wallet sheet. */
|
|
30
71
|
shipping?: {
|
|
72
|
+
/** Street address line 1. */
|
|
31
73
|
address_line1?: string;
|
|
74
|
+
/** Street address line 2. */
|
|
32
75
|
address_line2?: string;
|
|
76
|
+
/** Postal/ZIP code. */
|
|
33
77
|
address_postcode?: string;
|
|
78
|
+
/** City. */
|
|
34
79
|
address_city?: string;
|
|
80
|
+
/** State or administrative area. */
|
|
35
81
|
address_state?: string;
|
|
82
|
+
/** ISO 3166 country code. */
|
|
36
83
|
address_country?: string;
|
|
84
|
+
/** Company name on the address. */
|
|
37
85
|
address_company?: string;
|
|
86
|
+
/** Post office box number. */
|
|
38
87
|
post_office_box_number?: string;
|
|
88
|
+
/** Wallet provider's identifier for this saved address. */
|
|
39
89
|
wallet_address_id?: string;
|
|
90
|
+
/** Display name for this saved address (e.g. `'Home'`). */
|
|
40
91
|
wallet_address_name?: string;
|
|
92
|
+
/** ISO 8601 timestamp of when the address was saved. */
|
|
41
93
|
wallet_address_created_timestamp?: string;
|
|
94
|
+
/** ISO 8601 timestamp of the last update to the address. */
|
|
42
95
|
wallet_address_updated_timestamp?: string;
|
|
43
96
|
};
|
|
97
|
+
/** The shipping option the user selected in the wallet sheet. */
|
|
44
98
|
selected_shipping_option?: IShippingOption;
|
|
45
99
|
}
|
|
46
100
|
export interface IFlypayPaymentSuccessful {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../src/wallet-buttons/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"interfaces.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AM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,oBAAoB,CAAC;CAC5B;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,wBAAwB,CAAC,EAAE;QACzB,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,OAAO,CAAC;QAClB,IAAI,EAAE,UAAU,GAAG,QAAQ,CAAC;QAC5B,MAAM,EAAE;YACN,aAAa,EAAE,MAAM,CAAC;YACtB,KAAK,EAAE,MAAM,CAAC;SACf,CAAC;KACH,CAAC;CACH"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base metadata required by every Wallet Buttons Express button.
|
|
3
|
+
* Concrete wallet metas (e.g. `ApplePayWalletMeta`, `PaypalWalletMeta`) extend
|
|
4
|
+
* this with wallet-specific configuration.
|
|
5
|
+
*/
|
|
1
6
|
export interface BaseWalletMeta {
|
|
7
|
+
/** The payment amount as a number (e.g. `19.99`). */
|
|
2
8
|
amount: number;
|
|
9
|
+
/** The ISO 4217 currency code (e.g. `'AUD'`, `'USD'`). */
|
|
3
10
|
currency: string;
|
|
4
11
|
}
|
|
5
12
|
//# sourceMappingURL=base-wallet-meta.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-wallet-meta.interface.d.ts","sourceRoot":"","sources":["../../../src/wallet-buttons-express/interfaces/base-wallet-meta.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
|
1
|
+
{"version":3,"file":"base-wallet-meta.interface.d.ts","sourceRoot":"","sources":["../../../src/wallet-buttons-express/interfaces/base-wallet-meta.interface.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -3,20 +3,43 @@ import type { ApplePayButtonStyle } from '../types/apple-pay-button-style.type';
|
|
|
3
3
|
import type { ApplePayButtonType } from '../types/apple-pay-button-type.type';
|
|
4
4
|
import type { ContactShippingEditingMode } from '../types/apple-pay-contact-editing-mode.type';
|
|
5
5
|
import type { AppleShippingType } from '../types/apple-pay-shipping-data';
|
|
6
|
+
/**
|
|
7
|
+
* Metadata required to configure an `ApplePayWalletButtonExpress` button.
|
|
8
|
+
* Extends {@link BaseWalletMeta} (`amount`, `currency`) plus Apple Pay specifics.
|
|
9
|
+
*
|
|
10
|
+
* The walletToken (JWT) returned from the `onClick` handler authorizes the actual
|
|
11
|
+
* charge; this meta only configures the button presentation and the Apple Pay sheet.
|
|
12
|
+
*/
|
|
6
13
|
export interface ApplePayWalletMeta extends BaseWalletMeta {
|
|
14
|
+
/** Label shown next to the total in the Apple Pay sheet (e.g. `'TOTAL'`). */
|
|
7
15
|
amount_label: string;
|
|
16
|
+
/** ISO 3166-1 alpha-2 country code (e.g. `'AU'`, `'US'`). Required by Apple Pay. */
|
|
8
17
|
country: string;
|
|
18
|
+
/** Payment capabilities the merchant supports. Must include at least `'supports3DS'`. */
|
|
9
19
|
merchant_capabilities?: Array<'supports3DS' | 'supportsEMV' | 'supportsCredit' | 'supportsDebit'>;
|
|
20
|
+
/** Card networks the merchant accepts. */
|
|
10
21
|
supported_networks?: Array<'visa' | 'masterCard' | 'amex' | 'chinaUnionPay' | 'discover' | 'interac' | 'jcb' | 'privateLabel'>;
|
|
22
|
+
/** Billing contact fields the user must provide. Note: Apple does not currently return `'phone'` or `'email'`. */
|
|
11
23
|
required_billing_contact_fields?: Array<'email' | 'name' | 'phone' | 'postalAddress'>;
|
|
24
|
+
/** Shipping contact fields the user must provide. Include `'postalAddress'` to surface the address fields in the sheet. */
|
|
12
25
|
required_shipping_contact_fields?: Array<'email' | 'phone' | 'postalAddress'>;
|
|
26
|
+
/**
|
|
27
|
+
* Device capabilities allowed for the wallet button to be considered available.
|
|
28
|
+
* Used as a relaxation knob for testing — defaults to `['paymentCredentialsAvailable']` only.
|
|
29
|
+
*/
|
|
13
30
|
apple_pay_capabilities?: Array<'credentials_available' | 'credentials_status_unknown' | 'credentials_unavailable'>;
|
|
31
|
+
/** Restrict the cards Apple Pay offers to those issued in these ISO 3166 country codes. */
|
|
14
32
|
supported_countries?: string[];
|
|
33
|
+
/** Visual styling for the Apple Pay button. */
|
|
15
34
|
style?: {
|
|
35
|
+
/** Variant displayed on the button (e.g. `'buy'`, `'donate'`, `'plain'`). */
|
|
16
36
|
button_type?: ApplePayButtonType;
|
|
37
|
+
/** Color scheme: `'black'`, `'white'`, or `'white-outline'`. */
|
|
17
38
|
button_style?: ApplePayButtonStyle;
|
|
18
39
|
};
|
|
40
|
+
/** Pre-filled shipping data to seed the Apple Pay sheet. */
|
|
19
41
|
shipping?: AppleShippingType;
|
|
42
|
+
/** Whether the user can edit the shipping address: `'available'` allows editing; `'store_pickup'` locks it. */
|
|
20
43
|
shipping_editing_mode?: ContactShippingEditingMode;
|
|
21
44
|
}
|
|
22
45
|
//# sourceMappingURL=apple-pay-wallet-meta.interface.d.ts.map
|
|
@@ -1 +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,KAAK,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAC/F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACxD,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB,CAAC,EAAE,KAAK,CAC3B,aAAa,GAAG,aAAa,GAAG,gBAAgB,GAAG,eAAe,CACnE,CAAC;IACF,kBAAkB,CAAC,EAAE,KAAK,CACtB,MAAM,GACN,YAAY,GACZ,MAAM,GACN,eAAe,GACf,UAAU,GACV,SAAS,GACT,KAAK,GACL,cAAc,CACjB,CAAC;IACF,+BAA+B,CAAC,EAAE,KAAK,CAAC,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,eAAe,CAAC,CAAC;IACtF,gCAAgC,CAAC,EAAE,KAAK,CAAC,OAAO,GAAG,OAAO,GAAG,eAAe,CAAC,CAAC;IAC9E,sBAAsB,CAAC,EAAE,KAAK,CAC5B,uBAAuB,GAAG,4BAA4B,GAAG,yBAAyB,CACnF,CAAC;IACF,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,KAAK,CAAC,EAAE;QACN,WAAW,CAAC,EAAE,kBAAkB,CAAC;QACjC,YAAY,CAAC,EAAE,mBAAmB,CAAC;KACpC,CAAC;IACF,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,qBAAqB,CAAC,EAAE,0BAA0B,CAAC;CACpD"}
|
|
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.inter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