apple-pay
Version:
Wrapper for working with Apple Pay payments
26 lines (23 loc) • 1.35 kB
TypeScript
import { TOptions, TStatusCode } from './types';
declare class ApplePay {
private options;
private session?;
constructor(options: TOptions);
static get isPaymentAvailable(): boolean;
startSession(): void;
completeMerchantValidation(response: any): void;
abort(): void;
completePayment(status: TStatusCode): void;
private getAppalePayVersion;
private filterSupportedNetworksByVersion;
private getApplePayRequest;
}
declare const STATUS_FAILURE = TStatusCode['STATUS_SUCCESS'];
declare const STATUS_INVALID_BILLING_POSTAL_ADDRESS = TStatusCode['STATUS_INVALID_BILLING_POSTAL_ADDRESS'];
declare const STATUS_INVALID_SHIPPING_CONTACT = TStatusCode['STATUS_INVALID_SHIPPING_CONTACT'];
declare const STATUS_INVALID_SHIPPING_POSTAL_ADDRESS = TStatusCode['STATUS_INVALID_SHIPPING_POSTAL_ADDRESS'];
declare const STATUS_PIN_INCORRECT = TStatusCode['STATUS_PIN_INCORRECT'];
declare const STATUS_PIN_LOCKOUT = TStatusCode['STATUS_PIN_LOCKOUT'];
declare const STATUS_PIN_REQUIRED = TStatusCode['STATUS_PIN_REQUIRED'];
declare const STATUS_SUCCESS = TStatusCode['STATUS_SUCCESS'];
export { STATUS_FAILURE, STATUS_INVALID_BILLING_POSTAL_ADDRESS, STATUS_INVALID_SHIPPING_CONTACT, STATUS_INVALID_SHIPPING_POSTAL_ADDRESS, STATUS_PIN_INCORRECT, STATUS_PIN_LOCKOUT, STATUS_PIN_REQUIRED, STATUS_SUCCESS, ApplePay as default };