@revolut/checkout
Advanced tools
Comparing version 0.1.0-0 to 1.0.0
{ | ||
"name": "@revolut/checkout", | ||
"version": "0.1.0-0", | ||
"description": "TODO", | ||
"version": "1.0.0", | ||
"description": "RevolutCheckout.js as npm module", | ||
"author": "John Grishin <hi@johngrish.in>", | ||
"license": "Apache-2.0", | ||
"homepage": "https://business.revolut.com", | ||
"repository": "revolut-engineering/revolut-checkout", | ||
@@ -8,0 +9,0 @@ "main": "cjs/index.js", |
@@ -40,10 +40,10 @@ import { MODE } from './constants'; | ||
export interface PopupOptions extends CustomerDetails { | ||
/** Callback if transaction is failed to complete, the reason should be available in the message parameter */ | ||
/** Callback will be called when the payment is completed successfully */ | ||
onSuccess?: () => void; | ||
/** Callback if transaction is failed to complete, the reason should be available in the message parameter */ | ||
onError?: (error: RevolutCheckoutError) => void; | ||
/** Callback if a user did not complete the transaction and canceled the authorisation or closed the checkout window */ | ||
/** Callback if an user did not complete the transaction and canceled the authorisation or closed the checkout window */ | ||
onCancel?: () => void; | ||
} | ||
export interface CardFieldOptions extends CustomerDetails { | ||
export interface CardFieldOptions extends PopupOptions { | ||
/** Empty `<div>` inside your form */ | ||
@@ -79,3 +79,3 @@ target: HTMLElement; | ||
* Callback called on field status change and contains status object, | ||
* depeding on current field state: | ||
* depending on current field state: | ||
* | ||
@@ -93,8 +93,2 @@ * ```ts | ||
onStatusChange?: (status: FieldStatus) => void; | ||
/** Callback will be called when the payment is completed successfully */ | ||
onSuccess?: () => void; | ||
/** Callback if transaction is failed to complete, the reason should be available in the message parameter */ | ||
onError?: (error: RevolutCheckoutError) => void; | ||
/** Callback if a user did not complete the transaction and canceled the authorisation or closed the checkout window */ | ||
onCancel?: () => void; | ||
} | ||
@@ -118,7 +112,7 @@ export interface RevolutCheckoutCardField extends RevolutCheckoutInstance { | ||
createCardField: (options?: CardFieldOptions) => RevolutCheckoutCardField; | ||
/** Destroy instance */ | ||
/** Manually destroy popup or card field if needed */ | ||
destroy: () => void; | ||
} | ||
export interface CreateRevolutCheckout { | ||
export interface RevolutCheckout { | ||
(token: string): Promise<RevolutCheckoutInstance>; | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
0
18033
286