@olo/pay-react-native
Version:
Olo Pay React Native SDK
42 lines • 1.9 kB
JavaScript
// Copyright © 2022 Olo Inc. All rights reserved.
// This software is made available under the Olo Pay SDK License (See LICENSE.md file)
import { NativeEventEmitter, NativeModules } from 'react-native';
import useOloPayNativeModule from './hooks/useOloPayNativeModule';
import { version, buildType } from '../package.json';
const OlopaysdkReactNative = useOloPayNativeModule();
export * from './definitions';
export * from './components/PaymentCardDetailsView';
export * from './components/PaymentCardDetailsForm';
export * from './components/PaymentCardCvvView';
export const OloPayEvents = new NativeEventEmitter(NativeModules.OlopaysdkReactNativeEventEmitter);
export const OloPaySDK = {
initialize: async function (options) {
if (options.freshInstall) {
console.warn("@olo/pay-react-native: 'OloPayInitializationConfig.freshInstall' is deprecated and is safe to remove. It is no longer used by the Olo Pay SDK and will be removed in a future version.");
}
await OlopaysdkReactNative.initializeMetadata({
version,
buildType
});
return await OlopaysdkReactNative.initializeOloPay(options);
},
initializeGooglePay: async function (options) {
return await OlopaysdkReactNative.initializeGooglePay(options);
},
changeGooglePayVendor: async function (options) {
return await OlopaysdkReactNative.changeGooglePayVendor(options);
},
isDigitalWalletReady: async function () {
return await OlopaysdkReactNative.isDigitalWalletReady();
},
getDigitalWalletPaymentMethod: async function (options) {
return await OlopaysdkReactNative.getDigitalWalletPaymentMethod(options);
},
isInitialized: async function () {
return await OlopaysdkReactNative.isOloPayInitialized();
},
isDigitalWalletInitialized: async function () {
return await OlopaysdkReactNative.isDigitalWalletInitialized();
}
};
//# sourceMappingURL=index.js.map