• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

123
Vistas
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 3 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

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 3 years ago · Juan Pablo Isaza Denunciar

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 3 years ago · Juan Pablo Isaza Denunciar
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 Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda