#tarantino_47

1 messages · Page 1 of 1 (latest)

half finchBOT
jade basin
#

Hello 👋
Can you share the code you're using for this?

#

are you using expo?

crimson needle
#

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>
 )
}
jade basin
#

if you log isPlatformPaySupported, what value are you seeing?

crimson needle
jade basin
#

Interesting

#

Are you seeing any errors or anything else in your console?

crimson needle
#

no

jade basin
#

do you have any styling or something that might affect the button appearance?

crimson needle
#

no, I intentionally removed all props except onPress

jade basin
#

What device are you testing on?

crimson needle
#

Iphone 13 emulator

half finchBOT
jade basin
#

Have you tested on a real device? I wonder if that makes a difference

crimson needle
#

not yet, let me try

jade basin
crimson needle
#

oh, that could be a reason, let me try. I'm reinstalling npm right now