From adefca23ca056e74ddaaae11aa22456b9cfbad41 Mon Sep 17 00:00:00 2001 From: b3ni15 Date: Sat, 20 Dec 2025 23:28:23 +0100 Subject: [PATCH] feat: update payment handling in LobbyScreen and configure Stripe merchant identifiers --- .env.example | 1 + App.js | 5 ++++- app.json | 2 +- src/screens/LobbyScreen.js | 9 ++++++++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 26238db..16ef7fc 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,4 @@ EXPO_PUBLIC_API_URL=http://localhost:4000 EXPO_PUBLIC_WS_URL=ws://localhost:4000 EXPO_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_... +EXPO_PUBLIC_STRIPE_MERCHANT_ID=merchant.com.devbeni.vegasblackjack diff --git a/App.js b/App.js index 820c26b..3eb6021 100644 --- a/App.js +++ b/App.js @@ -31,7 +31,10 @@ export default function App() { return ( - + {!token || !user ? ( ) : selectedTable ? ( diff --git a/app.json b/app.json index 7aff224..0b04837 100644 --- a/app.json +++ b/app.json @@ -21,7 +21,7 @@ [ "@stripe/stripe-react-native", { - "merchantIdentifier": "merchant.com.blackjack.vegas", + "merchantIdentifier": "merchant.com.devbeni.vegasblackjack", "enableGooglePay": true } ] diff --git a/src/screens/LobbyScreen.js b/src/screens/LobbyScreen.js index 66b6303..ec3fb4c 100644 --- a/src/screens/LobbyScreen.js +++ b/src/screens/LobbyScreen.js @@ -39,7 +39,14 @@ export default function LobbyScreen({ user, token, onLogout, onSelectTable, onRe const init = await initPaymentSheet({ merchantDisplayName: 'Vegas Blackjack', - paymentIntentClientSecret: data.clientSecret + paymentIntentClientSecret: data.clientSecret, + applePay: { + merchantCountryCode: 'HU' + }, + googlePay: { + merchantCountryCode: 'HU', + testEnv: __DEV__ + } }); if (init.error) {