UNPKG

551 BJavaScriptView Raw
1import { NativeModules, Platform } from 'react-native';
2
3exports.initialize = function() {
4 if (!NativeModules.TPSStripeManager && Platform.OS === 'ios') {
5 console.warn(
6 `We temporarily moved the Expo Payments API to ExpoKit. Please see the SDK 20 release notes for more information: https://blog.expo.io/expo-sdk-v20-0-0-is-now-available-79f84232a9d1`
7 );
8 }
9};
10
11if (NativeModules.TPSStripeManager && Platform.OS === 'ios') {
12 module.exports = NativeModules.TPSStripeManager;
13} else {
14 module.exports = NativeModules.StripeModule;
15}