@olo/pay-react-native
Version:
Olo Pay React Native SDK
98 lines (96 loc) • 3.98 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _exportNames = {
OloPayEvents: true,
OloPaySDK: true
};
exports.OloPaySDK = exports.OloPayEvents = void 0;
var _reactNative = require("react-native");
var _useOloPayNativeModule = _interopRequireDefault(require("./hooks/useOloPayNativeModule"));
var _package = require("../package.json");
var _definitions = require("./definitions");
Object.keys(_definitions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _definitions[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _definitions[key];
}
});
});
var _PaymentCardDetailsView = require("./components/PaymentCardDetailsView");
Object.keys(_PaymentCardDetailsView).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _PaymentCardDetailsView[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _PaymentCardDetailsView[key];
}
});
});
var _PaymentCardDetailsForm = require("./components/PaymentCardDetailsForm");
Object.keys(_PaymentCardDetailsForm).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _PaymentCardDetailsForm[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _PaymentCardDetailsForm[key];
}
});
});
var _PaymentCardCvvView = require("./components/PaymentCardCvvView");
Object.keys(_PaymentCardCvvView).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _PaymentCardCvvView[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _PaymentCardCvvView[key];
}
});
});
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// Copyright © 2022 Olo Inc. All rights reserved.
// This software is made available under the Olo Pay SDK License (See LICENSE.md file)
const OlopaysdkReactNative = (0, _useOloPayNativeModule.default)();
const OloPayEvents = exports.OloPayEvents = new _reactNative.NativeEventEmitter(_reactNative.NativeModules.OlopaysdkReactNativeEventEmitter);
const OloPaySDK = exports.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: _package.version,
buildType: _package.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