Created
June 15, 2023 13:46
-
-
Save Kudo/1d976feb403c325828b61b301bea3276 to your computer and use it in GitHub Desktop.
Patch to stripe-react-native for local Expo Go testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/example/app.json b/example/app.json | |
index b85d133..d0c1de7 100644 | |
--- a/example/app.json | |
+++ b/example/app.json | |
@@ -4,6 +4,6 @@ | |
"expo": { | |
"name": "StripeSdkExample", | |
"slug": "StripeSdkExample", | |
- "sdkVersion": "44.0.0" | |
+ "sdkVersion": "UNVERSIONED" | |
} | |
} | |
diff --git a/example/package.json b/example/package.json | |
index 672930a..def81c2 100644 | |
--- a/example/package.json | |
+++ b/example/package.json | |
@@ -11,15 +11,24 @@ | |
"start:server": "yarn build:server & nodemon ./dist" | |
}, | |
"dependencies": { | |
- "@react-native-masked-view/masked-view": "^0.2.6", | |
- "@react-native-picker/picker": "^2.4.1", | |
+ "@react-native-masked-view/masked-view": "0.2.8", | |
+ "@react-native-picker/picker": "2.4.8", | |
"@react-navigation/native": "^6.0.10", | |
"@react-navigation/native-stack": "^6.6.1", | |
- "react": "18.0.0", | |
- "react-native": "0.69.7", | |
+ "expo": "file:/path/to/expo/expo/packages/expo", | |
+ "expo-application": "file:/path/to/expo/expo/packages/expo-application", | |
+ "expo-asset": "file:/path/to/expo/expo/packages/expo-asset", | |
+ "expo-constants": "file:/path/to/expo/expo/packages/expo-constants", | |
+ "expo-file-system": "file:/path/to/expo/expo/packages/expo-file-system", | |
+ "expo-font": "file:/path/to/expo/expo/packages/expo-font", | |
+ "expo-keep-awake": "file:/path/to/expo/expo/packages/expo-keep-awake", | |
+ "expo-modules-autolinking": "file:/path/to/expo/expo/packages/expo-modules-autolinking", | |
+ "expo-modules-core": "file:/path/to/expo/expo/packages/expo-modules-core", | |
+ "react": "18.2.0", | |
+ "react-native": "0.72.0-rc.5", | |
"react-native-config": "^1.4.5", | |
- "react-native-safe-area-context": "^4.2.4", | |
- "react-native-screens": "^3.13.1" | |
+ "react-native-safe-area-context": "4.5.0", | |
+ "react-native-screens": "~3.20.0" | |
}, | |
"devDependencies": { | |
"@babel/cli": "^7.12.1", | |
@@ -29,8 +38,7 @@ | |
"@types/express": "^4.17.2", | |
"@types/jest": "^27.4.0", | |
"@types/node": "^14.14.7", | |
- "@types/react": "^17.0.38", | |
- "@types/react-native": "^0.66.15", | |
+ "@types/react": "~18.0.27", | |
"babel-plugin-module-resolver": "^4.0.0", | |
"dotenv": "^8.2.0", | |
"express": "^4.17.3", | |
diff --git a/example/src/Config.ts b/example/src/Config.ts | |
index 8112ba3..a2e6cc6 100644 | |
--- a/example/src/Config.ts | |
+++ b/example/src/Config.ts | |
@@ -5,4 +5,4 @@ import ENV from 'react-native-config'; | |
export const LOCAL_URL = | |
Platform.OS === 'android' ? 'http://10.0.2.2:4242' : 'http://localhost:4242'; | |
-export const API_URL = ENV.API_URL ? ENV.API_URL : LOCAL_URL; | |
+export const API_URL = 'https://rigorous-heartbreaking-cephalopod.glitch.me' | |
diff --git a/example/src/components/PaymentScreen.tsx b/example/src/components/PaymentScreen.tsx | |
index f1276a3..1af2b03 100644 | |
--- a/example/src/components/PaymentScreen.tsx | |
+++ b/example/src/components/PaymentScreen.tsx | |
@@ -23,7 +23,7 @@ const PaymentScreen: React.FC<Props> = ({ | |
await initStripe({ | |
publishableKey, | |
merchantIdentifier: 'merchant.com.stripe.react.native', | |
- urlScheme: 'stripe-example', | |
+ urlScheme: 'exp', | |
setReturnUrlSchemeOnAndroid: true, | |
}); | |
setLoading(false); | |
diff --git a/example/src/screens/MultilineWebhookPaymentScreen.tsx b/example/src/screens/MultilineWebhookPaymentScreen.tsx | |
index 32d2e4c..a44ef29 100644 | |
--- a/example/src/screens/MultilineWebhookPaymentScreen.tsx | |
+++ b/example/src/screens/MultilineWebhookPaymentScreen.tsx | |
@@ -164,7 +164,7 @@ const inputStyles: CardFormView.Styles = { | |
borderRadius: 10, | |
cursorColor: '#000000', | |
fontSize: 16, | |
- fontFamily: 'Macondo-Regular', | |
+ // fontFamily: 'Macondo-Regular', | |
placeholderColor: '#A020F0', | |
textErrorColor: '#ff0000', | |
}; | |
diff --git a/example/src/screens/PaymentSheetAppearance.ts b/example/src/screens/PaymentSheetAppearance.ts | |
index 35f595b..c4eda49 100644 | |
--- a/example/src/screens/PaymentSheetAppearance.ts | |
+++ b/example/src/screens/PaymentSheetAppearance.ts | |
@@ -4,7 +4,7 @@ import type { PaymentSheet } from '@stripe/stripe-react-native'; | |
const appearance: PaymentSheet.AppearanceParams = { | |
font: { | |
scale: 1.1, | |
- family: Platform.OS === 'android' ? 'macondoregular' : 'Macondo-Regular', | |
+ // family: Platform.OS === 'android' ? 'macondoregular' : 'Macondo-Regular', | |
}, | |
colors: { | |
light: { | |
diff --git a/example/src/screens/WebhookPaymentScreen.tsx b/example/src/screens/WebhookPaymentScreen.tsx | |
index 1432071..99c05a3 100644 | |
--- a/example/src/screens/WebhookPaymentScreen.tsx | |
+++ b/example/src/screens/WebhookPaymentScreen.tsx | |
@@ -153,7 +153,7 @@ const inputStyles: CardFieldInput.Styles = { | |
borderColor: '#000000', | |
borderRadius: 8, | |
fontSize: 14, | |
- fontFamily: 'Macondo-Regular', | |
+ // fontFamily: 'Macondo-Regular', | |
placeholderColor: '#A020F0', | |
textColor: '#0000ff', | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment