#tarantino_47
1 messages · Page 1 of 1 (latest)
I don't use expo
just a minute
import { isPlatformPaySupported, PlatformPay, PlatformPayButton } from '@stripe/stripe-react-native';
const PaymentFormButton = (props: IPaymentFormButtonProps) => {
const [isApplePaySupported, setIsApplePaySupported] = useState(false);
useEffect(() => {
(async function () {
setIsApplePaySupported(await isPlatformPaySupported());
})();
}, [isPlatformPaySupported]);
return (
<View>
{isApplePaySupported ? (
<>
<Text>BUtton</Text>
<PlatformPayButton
onPress={() => {}}
/>
<Text>BUtton end</Text>
</>
) : (
<Button />
</View>
)
}
if you log isPlatformPaySupported, what value are you seeing?
true
no
do you have any styling or something that might affect the button appearance?
no, I intentionally removed all props except onPress
What device are you testing on?
Iphone 13 emulator
Have you tested on a real device? I wonder if that makes a difference
not yet, let me try
also try setting the props we have in our doc/example here
https://stripe.com/docs/apple-pay?platform=react-native#check-if-apple-pay-supported
I feel like it's missing the height/width
oh, that could be a reason, let me try. I'm reinstalling npm right now