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

Add FPX types #7

Merged
merged 5 commits into from
Feb 13, 2020
Merged

Add FPX types #7

merged 5 commits into from
Feb 13, 2020

Conversation

dweedon-stripe
Copy link
Contributor

Summary & motivation

Add the types for the FPX PaymentMethod and the fpxBank element.

https://stripe.com/docs/js/payment_intents/confirm_fpx_payment
https://stripe.com/docs/js/elements_object/create_element?type=fpxBank
https://stripe.com/docs/payments/fpx#web

Testing & documentation

Documentation is available in the Stripe docs.
I added type level tests.

Copy link
Contributor

@christopher-stripe christopher-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed two small issues but 👍 after that

*/
create(
elementType: 'fpxBank',
options?: StripeFpxBankElementOptions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
options?: StripeFpxBankElementOptions
options: StripeFpxBankElementOptions

I think options must be passed with at least a accountHolderType field.

on(
eventType: 'change',
handler: (event: StripeFpxBankElementChangeEvent) => any
): void;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be

Suggested change
): void;
): StripeFpxBankElement;

? I think so, it looks like the other element types have this wrong too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating them all.

@dweedon-stripe dweedon-stripe merged commit 3c60c1c into master Feb 13, 2020
@hofman-stripe hofman-stripe deleted the fpx branch February 23, 2020 17:41
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

Successfully merging this pull request may close these issues.

2 participants