Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fake-gateway-rejected-fraud-nonce results in random accepted/failing transaction

See original GitHub issue

Hi braintree-team,

I just stumbled upon a weird issue. When I use fake-gateway-rejected-fraud-nonce for creating a transaction via the following snippet, I sometimes receive an authorized transaction and sometimes the transaction fails as it should, which breaks my tests.

Do you have any clue why this happens?

Thanks a lot! Bastian

return new Promise( (resolve, reject) => {{
      amount: 25.14,
      paymentMethodNonce: 'fake-gateway-rejected-fraud-nonce',
      options: { submitForSettlement: false }
    }, (err, res) => {
      if (err) {
        log.error(`Could not create transaction via braintree.`, {paymentMethodNonce, amount, options});
      } else {
        log.debug(`Payment transation via braintree successful.`, res);

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

armellarciercommented, Sep 20, 2017

I am, but I won’t be using braintree again. My tests break every now and then but that’s not a concern really.

Epreuvecommented, Mar 8, 2018

The reason for the Gateway rejection when using the fake-gateway-rejected-fraud-nonce is different than when using the amount 5001.00, as one is to replicate a rejection due to fraud rules, and the other an edge case with application status.

There is no need to use both to generate a Gateway rejected transaction, however the fake-gateway-rejected-fraud-nonce will not reject as expected, unless you have fraud tools enabled on your account.

If you’re having problems please feel free to open a new issue or reach out to support so we can take a look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found