Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

256
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda