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

204
Visualizações
Braintree: test nonces are resulting in Payment Method Nonce is Invalid

I am in the process of using the sandbox to test creating a new recurring billing subscription using a fake nonce but I keep getting an error indicating the payment nonce is invalid, here is the object I am sending to the gateway.subscription.create method:

{
  paymentMethodNonce: 'fake-valid-nonce',
  planId: 'ip19',
  price: 2.5,
  options: { startImmediately: true }
}

This is the error I am receiving when I make me call to gateway.subscription.create:

[
  ValidationError {
    attribute: 'payment_method_nonce',
    code: '91925',
    message: 'Payment method nonce is invalid.'
  }
]

I am using the fake nonces listed in this article, https://developer.paypal.com/braintree/docs/reference/general/testing/node#nonce-fake-valid-nonce

I am passing the sandbox credentials when I make my initial connection but it seems like it is not honoring the fake nonce.

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Payment method nonces can only be used in certain specific conditions. Fake nonces do not support these specific use cases. You need to use a payment method token to create a subscription or use a generated payment method nonce from the specific client workflows mentioned in the API reference.

about 4 years ago · Juan Pablo Isaza Relatório

0

None of them have ever worked? They should work at least once. Otherwise, if you have a payment method in your vault, do something like braintree.PaymentMethodNonce.create('token').payment_method_nonce.nonce to generate a new nonce for server-side testing.

about 4 years ago · Juan Pablo Isaza Relatório
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