Skip to content

Commit

Permalink
add type tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bdaily-stripe committed Oct 1, 2024
1 parent a0ea5ab commit 31722f3
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions tests/types/src/valid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2745,7 +2745,17 @@ stripe
.confirmCashappSetup('', {
return_url: window.location.href,
})
.then((result: {setupIntent?: SetupIntent; error?: StripeError}) => null);
.then((result: {setupIntent?: SetupIntent; error?: StripeError}) => {
if (
result.setupIntent?.next_action
?.cashapp_handle_redirect_or_display_qr_code
) {
console.log(
result.setupIntent?.next_action
?.cashapp_handle_redirect_or_display_qr_code.hosted_instructions_url
);
}
});

stripe
.confirmCashappSetup(
Expand Down Expand Up @@ -2854,7 +2864,13 @@ stripe

stripe
.verifyMicrodepositsForSetup('', {amounts: [32, 45]})
.then((result: {setupIntent?: SetupIntent; error?: StripeError}) => null);
.then((result: {setupIntent?: SetupIntent; error?: StripeError}) => {
if (result.setupIntent?.next_action?.verify_with_microdeposits) {
console.log(
result.setupIntent?.next_action?.verify_with_microdeposits.arrival_date
);
}
});

stripe
.verifyMicrodepositsForSetup('', {
Expand Down

0 comments on commit 31722f3

Please sign in to comment.