feat: update payment handling in LobbyScreen and configure Stripe merchant identifiers

This commit is contained in:
2025-12-20 23:28:23 +01:00
parent 36e2cde26b
commit adefca23ca
4 changed files with 14 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
EXPO_PUBLIC_API_URL=http://localhost:4000 EXPO_PUBLIC_API_URL=http://localhost:4000
EXPO_PUBLIC_WS_URL=ws://localhost:4000 EXPO_PUBLIC_WS_URL=ws://localhost:4000
EXPO_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_... EXPO_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
EXPO_PUBLIC_STRIPE_MERCHANT_ID=merchant.com.devbeni.vegasblackjack

5
App.js
View File

@@ -31,7 +31,10 @@ export default function App() {
return ( return (
<SafeAreaProvider> <SafeAreaProvider>
<StripeProvider publishableKey={process.env.EXPO_PUBLIC_STRIPE_PUBLISHABLE_KEY || ''}> <StripeProvider
publishableKey={process.env.EXPO_PUBLIC_STRIPE_PUBLISHABLE_KEY || ''}
merchantIdentifier={process.env.EXPO_PUBLIC_STRIPE_MERCHANT_ID || 'merchant.com.devbeni.vegasblackjack'}
>
{!token || !user ? ( {!token || !user ? (
<LoginScreen onLogin={login} loading={loading} /> <LoginScreen onLogin={login} loading={loading} />
) : selectedTable ? ( ) : selectedTable ? (

View File

@@ -21,7 +21,7 @@
[ [
"@stripe/stripe-react-native", "@stripe/stripe-react-native",
{ {
"merchantIdentifier": "merchant.com.blackjack.vegas", "merchantIdentifier": "merchant.com.devbeni.vegasblackjack",
"enableGooglePay": true "enableGooglePay": true
} }
] ]

View File

@@ -39,7 +39,14 @@ export default function LobbyScreen({ user, token, onLogout, onSelectTable, onRe
const init = await initPaymentSheet({ const init = await initPaymentSheet({
merchantDisplayName: 'Vegas Blackjack', merchantDisplayName: 'Vegas Blackjack',
paymentIntentClientSecret: data.clientSecret paymentIntentClientSecret: data.clientSecret,
applePay: {
merchantCountryCode: 'HU'
},
googlePay: {
merchantCountryCode: 'HU',
testEnv: __DEV__
}
}); });
if (init.error) { if (init.error) {