Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThreeDSecure missing types #722

Closed
fhetriucGH opened this issue Aug 20, 2024 · 1 comment
Closed

ThreeDSecure missing types #722

fhetriucGH opened this issue Aug 20, 2024 · 1 comment

Comments

@fhetriucGH
Copy link

fhetriucGH commented Aug 20, 2024

General information

  • SDK version: 3.88.0
  • Environment: Sandbox and Production
  • Browser and OS Chrome Version 127.0.6533.89 on MacOS 14.4.1

Issue description

We recently integrated braintree-web's ThreeDSecure (TypeScript version) into our checkout process and encountered an issue where certain interfaces do not include all the properties present in the corresponding data structures.

For example, in the lookup-complete callback, we receive data: ThreeDSecureVerificationData, where we need to access data.paymentMethod.threeDSecureInfo.status. However, TypeScript raises an error because the status property does not exist on the ThreeDSecureInfo type.

To resolve this, we extended the ThreeDSecureInfo interface to include the status property. While this workaround solves the issue temporarily, it is not an ideal long-term solution.

It would be highly beneficial if the types/interfaces were updated to reflect the complete structure, including the status property. Additionally, it would be helpful to expose enums such as ThreeDSecureEvent (among others) to improve clarity and consistency:

export enum ThreeDSecureEvent {
    LOOKUP_COMPLETE = 'lookup-complete',
    CUSTOMER_CANCELED = 'customer-canceled',
    AUTHENTICATION_IFRAME_AVAILABLE = 'authentication-iframe-available',
    AUTHENTICATION_MODAL_RENDER = 'authentication-modal-render',
    AUTHENTICATION_MODAL_CLOSE = 'authentication-modal-close'
}
@SancSalix
Copy link
Contributor

Hi there! We can't speak to the typescript library wrapper for braintree-web, as we don't own that, and unfortunately don't have one of our own. We encourage you to submit a PR against that library for changes, or raise the issue with them. Apologies I cannot be of more assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants