Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

257
Vistas
Payment method fails - Laravel & Stripe

I'm working with Laravel and Stripe, and I want to create a customer via code. Still, I can't do it cause the payment method fails. Stripe puts the default card, and I want to create it before the payment method. I'm working with Omnipay, so I can't get the card number and other properties from my card. It's necessary to create my payment method to assign it to my customer. The card element doesn't permit me to get that information. How can I get the information from my card to register a specific payment method and create my customer after that?

$metodopago = \Stripe\PaymentMethod::create([
    'type' => 'card',
    'card' => [
        'number' => 4242424242424242,
        'exp_month' => 8,
        'exp_year' => 2022,
        'cvc' => '314',
    ],
]);

I want to get this information from my card element.

'number' => ?,
'exp_month' => ?,
'exp_year' => ?,
'cvc' => ?,

When I get my payment method only need 'ID' to payment_method.

$customer = \Stripe\Customer::create([
    'name' => '',
    'email' => '',
    'payment_method' => 'pm_card_visa',
    'invoice_settings' => [
        'default_payment_method' => 'pm_card_visa',
    ],
]);
over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda