diff --git a/.gitignore b/.gitignore index 5c48122c..00096064 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .DS_Store .vscode +.idea build node_modules tmp diff --git a/types/lib/paypal.d.ts b/types/lib/paypal.d.ts index 33340596..1aeba353 100644 --- a/types/lib/paypal.d.ts +++ b/types/lib/paypal.d.ts @@ -1,13 +1,16 @@ import { Emitter } from './emitter'; +export type PayPalDisplayConfig = { + locale?: string; + displayName?: string; + amount?: string; +} + export type BraintreeConfig = { braintree: { clientAuthorization: string; }; - display?: { - locale?: string; - displayName?: string; - amount?: string; + display?: PayPalDisplayConfig & { enableShippingAddress?: boolean; shippingAddressOverride?: any; shippingAddressEditable?: boolean; @@ -18,16 +21,18 @@ export type BraintreeConfig = { export type DirectConfig = { gatewayCode?: string; - display?: { - locale?: string; - displayName?: string; - amount?: string; + display?: PayPalDisplayConfig & { logoImageUrl?: string; headerImageUrl?: string; }; }; -export type PayPalConfig = BraintreeConfig | DirectConfig; +export type PayPalCompleteConfig = { + payPalComplete?: boolean; + display?: PayPalDisplayConfig; +} + +export type PayPalConfig = BraintreeConfig | DirectConfig | PayPalCompleteConfig export type PayPalEvent = 'error' | 'token' | 'cancel' | 'ready';