Handler Function Is Never Hit In initializeChallengeWithLookupResponse API
See original GitHub issueGeneral information
- SDK version: 3.57.0
- Environment: Production
- Browser and OS: Chrome 84.0.4147.125 (64-bit) on MacOS 10.15.6 -->
Issue description
We are trying to customize iframe generated by initializeChallengeWithLookupResponse
API
braintree.client
.create({ authorization: braintreeClientToken })
.then((newBraintreeClient) => {
braintree.threeDSecure
.create({
client: newBraintreeClient,
version: '2-inline-iframe',
loggingEnabled: true,
})
.then((newThreeDSecureClient) => {
newThreeDSecureClient.on(
'authentication-iframe-available',
(payload, next) => {
console.log(JSON.stringify(payload));
next();
},
);
newThreeDSecureClient
.initializeChallengeWithLookupResponse(lookupResponse)
.then((payload, error) => {
// ...
})
.catch((error) => {
// ...
});
});
})
But the handler function in newThreeDSecureClient.on(‘authentication-iframe-available’, handler) is never triggered even though we can find authentication-iframe-available in events inside initializeChallengeWithLookupResponse. We never hit console.log(JSON.stringify(payload));
.
Is this a bug or the way we are using the APIs needs modification?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Node.js Error Handling Best Practices: Ship With Confidence
Want to ship your Node.js applications with confidence? Learn Node.js error handling best practices, tips and tricks with our simple guide.
Read more >The 10 Most Common JavaScript Issues Developers Face
If you need help figuring out why your JavaScript isn't working, consult this list of the 10 most common JavaScript issues from a...
Read more >ThreeDSecure (Braintree 3.12.0 API) - javadoc.io
Initialize a challenge from a server side lookup call. ... During lookup the original payment method nonce is consumed and a new one...
Read more >Troubleshoot execution issues in Lambda - AWS Documentation
Errors can occur during function initialization, when your handler code processes the event, or when your function returns (or fails to return) a...
Read more >REST API error codes - DocuSign Developers
In most cases, the response body contains a more detailed errorDetails structure when an error occurs. However, depending on the error, the server...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Either open a support ticket at https://help.braintreepayments.com/ or reach out to your Braintree account manager. Be sure to reference this issue.
Was able to go through your staging site. Looks like you created 2 three d secure instances, one using
version: '2'
and one usingversion: '2-inline-iframe'
. Sinceversion: '2'
was created first, the global Cardinal object was configured to use the normal Cardinal modal, and the second call to configure the Cardinal SDK was ignored. (not by Braintree, it’s ignord by the Cardinal SDK).You can fix this problem by either using a single 3D Secure instance or by instantiating both with
version: '2-inline-iframe'
.