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

104
Views
La opción de pago de Google no viene en franja

back-end

 @app.route('/create-payment-intent', methods=['POST']) def create_payment(): try: data = json.loads(request.data) # Create a PaymentIntent with the order amount and currency intent = stripe.PaymentIntent.create( amount=calculate_order_amount(data['items']), currency='usd', automatic_payment_methods={ 'enabled': True, }, ) return jsonify({ 'clientSecret': intent['client_secret'] }) except Exception as e: return jsonify(error=str(e)), 403

Interfaz

 export default function App() { const [clientSecret, setClientSecret] = useState(""); useEffect(() => { // Create PaymentIntent as soon as the page loads fetch("/create-payment-intent", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ items: [{ id: "xl-tshirt" }] }), }) .then((res) => res.json()) .then((data) => setClientSecret(data.clientSecret)); }, []); const appearance = { theme: "stripe", }; const options = { clientSecret, appearance, }; return ( <div className="App"> {clientSecret && ( <Elements options={options} stripe={stripePromise}> <CheckoutForm /> </Elements> )} </div> ); }

aquí está mi código de banda donde espero que llegue Google Pay pero no viene en mi servidor local. Estoy usando una cuenta de banda en vivo para probar. ¿Google pay btn no viene debido a localhost?

Por favor, compruebe la captura de pantalla de cómo viene. ingrese la descripción de la imagen aquí

No estoy seguro de lo que esto significa allí doc ingrese la descripción de la imagen aquí

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

0

Google Pay con elemento de pago tiene los mismos requisitos previos que la integración del botón de solicitud de pago de Stripe. En su documentación , especifican que su aplicación debe servirse a través de HTTPS, lo que su integración no está haciendo actualmente. Puede usar algo como ngrok para servir su aplicación a través de HTTPS y verificar que aparezca Google Pay.

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!