feat: update payment handling in LobbyScreen and configure Stripe merchant identifiers
This commit is contained in:
@@ -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
|
||||
|
||||
5
App.js
5
App.js
@@ -31,7 +31,10 @@ export default function App() {
|
||||
|
||||
return (
|
||||
<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 ? (
|
||||
<LoginScreen onLogin={login} loading={loading} />
|
||||
) : selectedTable ? (
|
||||
|
||||
2
app.json
2
app.json
@@ -21,7 +21,7 @@
|
||||
[
|
||||
"@stripe/stripe-react-native",
|
||||
{
|
||||
"merchantIdentifier": "merchant.com.blackjack.vegas",
|
||||
"merchantIdentifier": "merchant.com.devbeni.vegasblackjack",
|
||||
"enableGooglePay": true
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user