UNPKG

@paydock/client-sdk

Version:

Paydock client sdk

49 lines 2.15 kB
/// <reference types="applepayjs" /> import type { Container } from "../../components/container"; import { type ApplePayRawDataInitialization, type ApplePayStyles, type IApplePayShippingOption } from "../../components/param"; import type { EventEmitter } from '../../helper/event-emitter'; import { type IWalletService, type IWalletServiceMeta, type IWalletServiceUpdate, WalletService } from "./wallet-service"; declare global { interface Window { ApplePaySession: ApplePaySession; } } interface LatestShippingData { shippingContact?: ApplePayJS.ApplePayPaymentContact; shippingMethod?: ApplePayJS.ApplePayShippingMethod; } export declare class AppleWalletService extends WalletService implements IWalletService { protected gatewayName: string; protected eventEmitter: EventEmitter; private paymentSession; protected latestShippingChangePromiseResolve: (value: unknown) => void; protected latestShippingChangePromiseReject: () => void; protected selectedShippingOption: IApplePayShippingOption; protected latestShippingData: LatestShippingData; constructor(publicKey: string, meta: IWalletServiceMeta, gatewayName: string, eventEmitter: EventEmitter); protected getGatewayName(): string; protected getMerchantId(): string; protected getMetaStyles(): ApplePayStyles; protected getMetaRawDataInitialization(): ApplePayRawDataInitialization; protected isShippingRequired(): boolean; protected hasShippingOptions(): boolean; load(container: Container): Promise<void>; update(data: IWalletServiceUpdate): void; private checkAvailability; private mount; private onApplePayButtonClicked; private onCancelPayment; private createRequest; private getMerchantSession; private onValidateMerchant; private handleMerchantOnButtonClickEvent; private onPaymentAuthorized; private onShippingContactSelected; private onShippingMethodSelected; private parseUpdateData; private formatShippingOptions; private formatCapabilities; private createButtonStyle; } export {}; //# sourceMappingURL=apple.wallet-service.d.ts.map