@adyen/react-native
Version:
Wraps Adyen Checkout Drop-In and Components for iOS and Android for convenient use with React Native
22 lines (19 loc) • 767 B
JavaScript
;
import { PaymentComponentWrapper } from '../base/PaymentComponentWrapper';
/** Native module interface specific to ApplePay */
/**
* Apple Pay wrapper - no additional events beyond inherited ones.
* @warning handle() implementation throws an exception as Apple Pay doesn't support action handling.
* @todo add express payment events
*/
export class ApplePayWrapper extends PaymentComponentWrapper {
name = 'ApplePay';
isAvailable(paymentMethods, configuration) {
return this.nativeModule.isAvailable(paymentMethods, configuration);
}
handle(_action) {
throw new Error(ACTIONS_NOT_SUPPORTED_ERROR);
}
}
const ACTIONS_NOT_SUPPORTED_ERROR = 'Apple Pay does not support action handling.';
//# sourceMappingURL=ApplePayWrapper.js.map