Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

173
Views
React Native: Google Pay/Apple pay usando CardField en lugar de PaymentSheet en Stripe SDK

actualmente parece que no puedo encontrar cómo usar Google Pay o Apple Pay con el componente CardField, ¿es posible actualmente?

Estoy usando el sdk nativo nativo de este Stripe:

https://github.com/stripe/stripe-react-nativo

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

puede usar initPaymentSheet . Esto es por lo que puedo ver y sé que la única solución que tenemos en este momento (utilizada por mí) para Apple o Google Pay... No sé por qué los documentos ( https://github.com/stripe/stripe -react-native ) no hablan en su página principal sobre esta opción, pero para mí funcionó bien. Además, asegúrese de consultar los documentos oficiales de Stipe para obtener más información, ya que también ayudan con ejemplos y explican la lógica de por qué/cómo/qué hacer ciertas cosas ( stripe docs ).

Un pequeño ejemplo que puede ayudarte a ti y a otros está a continuación:

 import { useStripe, } from '@stripe/stripe-react-native'; const {initPaymentSheet, presentPaymentSheet} = useStripe();

IMPORTANT:

Para mostrar ('trabajar') la hoja inferior (initPaymentSheet) necesita paymentIntentClientSecret O setupIntentClientSecret . Asegúrese de tener uno de estos 2, de lo contrario obtendrá un error :).

 await initPaymentSheet({ applePay: true, googlePay: true, customerId: customerId, merchantCountryCode: merchantCountryCode, merchantDisplayName: merchantDisplayName, paymentIntentClientSecret: paymentIntentClientSecret, setupIntentClientSecret: setupIntentClientSecret, customerEphemeralKeySecret:ephemeralKeySecret, style: 'alwaysLight', primaryButtonColor: 'red', allowsDelayedPaymentMethods: true, testEnv: 'development', customFlow: false, defaultBillingDetails: { address: { city: city, country: country, line1: line1, line2: line2, postalCode: postalCode, state: state, }, name: name, email: email, phone: phone, }, returnURL: returnURL, });
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!