mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
[stripe-v3] Add typings for paymentRequestButton.on('paymentmethod') (#36871)
* [stripe-v3] Add typings for paymentRequestButton.on('paymentmethod')
Relevant documentation: https://stripe.com/docs/stripe-js/reference#payment-response-object
* Update index.d.ts
* Fix linting error
This commit is contained in:
committed by
Andrew Branch
parent
26fcfa878e
commit
d91639eff2
Vendored
+5
@@ -623,12 +623,17 @@ declare namespace stripe {
|
||||
source: Source;
|
||||
}
|
||||
|
||||
interface StripePaymentMethodPaymentResponse extends StripePaymentResponse {
|
||||
paymentMethod: paymentMethod.PaymentMethod;
|
||||
}
|
||||
|
||||
interface StripePaymentRequest {
|
||||
canMakePayment(): Promise<{ applePay?: boolean } | null>;
|
||||
show(): void;
|
||||
update(options: StripePaymentRequestUpdateOptions): void;
|
||||
on(event: 'token', handler: (response: StripeTokenPaymentResponse) => void): void;
|
||||
on(event: 'source', handler: (response: StripeSourcePaymentResponse) => void): void;
|
||||
on(event: 'paymentmethod', handler: (response: StripePaymentMethodPaymentResponse) => void): void;
|
||||
on(event: 'cancel', handler: () => void): void;
|
||||
on(event: 'shippingaddresschange', handler: (response: { updateWith: (options: UpdateDetails) => void, shippingAddress: ShippingAddress }) => void): void;
|
||||
on(event: 'shippingoptionchange', handler: (response: { updateWith: (options: UpdateDetails) => void, shippingOption: ShippingOption }) => void): void;
|
||||
|
||||
Reference in New Issue
Block a user