forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6cb00a7
commit 3b4ded1
Showing
8 changed files
with
55 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Emitter } from './emitter'; | ||
|
||
export type AmazonPayOptions = { | ||
/** | ||
* 2 Digit Country Code | ||
*/ | ||
region?: string; | ||
|
||
/** | ||
* Specify which Payment Gateway in Recurly must handle the payment. | ||
*/ | ||
gatewayCode?: string | ||
|
||
/** | ||
* Sets button to Sandbox environment | ||
*/ | ||
sandbox?: boolean; | ||
}; | ||
|
||
export type AmazonPayEvent = 'ready' | 'token' | 'error' | 'close' | 'done'; | ||
|
||
export interface AmazonPayInstance extends Emitter<AmazonPayEvent> { | ||
/** | ||
* Invokes the Amazon Payment Modal | ||
*/ | ||
start: () => void; | ||
|
||
/** | ||
* Attaches an Element to the DOM, as a child of the specified parent target. | ||
* | ||
*/ | ||
attach: () => void; | ||
|
||
/** | ||
* Renders Amazon Pay button to the page | ||
*/ | ||
renderButton: (element: string) => void; | ||
} | ||
|
||
export type AmazonPay = (amazonPayOptions?: AmazonPayOptions) => AmazonPayInstance; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,6 @@ export default function googlePay () { | |
buttonColor: 'black', | ||
}, | ||
callbacks: { | ||
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type | ||
onPaymentAuthorized: (paymentData: GooglePayPaymentData): Promise<GooglePayPaymentAuthorizationResult> | void => { | ||
if (paymentData.email === '[email protected]') { | ||
return Promise.reject({ | ||
|