@revolut/checkout
Advanced tools
Comparing version 1.0.7-1 to 1.0.7
@@ -6,9 +6,9 @@ "use strict"; | ||
/** | ||
* Load [`RevolutCheckout.js`](https://developer.revolut.com/docs/merchant-api/#revolutcheckout-js-reference-revolutcheckout) | ||
* and create [`Instance`](https://developer.revolut.com/docs/merchant-api/#revolutcheckout-js-reference-instance) for the order `token`. | ||
* Load [`RevolutCheckout.js`](https://developer.revolut.com/docs/revolut-checkout-js/#revolutcheckout) | ||
* and create [`Instance`](https://developer.revolut.com/docs/revolut-checkout-js/#instance) for the order `token`. | ||
* | ||
* @param token `public_id` from [create payment order](https://developer.revolut.com/docs/merchant-api/#api-reference-api-reference-orders-create-an-order) API request | ||
* @param mode [API](https://developer.revolut.com/docs/merchant-api/#api-reference) environment, default to `'prod'` | ||
* @param token `public_id` from [create payment order](https://developer.revolut.com/api-reference/merchant/#operation/createOrder) API request | ||
* @param mode [API](https://developer.revolut.com/docs/revolut-checkout-js/#revolutcheckout-parameters) environment, defaults to `'prod'` | ||
* | ||
* @see [`RevolutCheckout.js` reference](https://developer.revolut.com/docs/merchant-api/#revolutcheckout-js-reference) | ||
* @see [`RevolutCheckout.js` reference](https://developer.revolut.com/docs/revolut-checkout-js) | ||
* | ||
@@ -15,0 +15,0 @@ * @example |
import { MODE, URLS } from './constants'; | ||
var loaded = null; | ||
/** | ||
* Load [`RevolutCheckout.js`](https://developer.revolut.com/docs/merchant-api/#revolutcheckout-js-reference-revolutcheckout) | ||
* and create [`Instance`](https://developer.revolut.com/docs/merchant-api/#revolutcheckout-js-reference-instance) for the order `token`. | ||
* Load [`RevolutCheckout.js`](https://developer.revolut.com/docs/revolut-checkout-js/#revolutcheckout) | ||
* and create [`Instance`](https://developer.revolut.com/docs/revolut-checkout-js/#instance) for the order `token`. | ||
* | ||
* @param token `public_id` from [create payment order](https://developer.revolut.com/docs/merchant-api/#api-reference-api-reference-orders-create-an-order) API request | ||
* @param mode [API](https://developer.revolut.com/docs/merchant-api/#api-reference) environment, default to `'prod'` | ||
* @param token `public_id` from [create payment order](https://developer.revolut.com/api-reference/merchant/#operation/createOrder) API request | ||
* @param mode [API](https://developer.revolut.com/docs/revolut-checkout-js/#revolutcheckout-parameters) environment, defaults to `'prod'` | ||
* | ||
* @see [`RevolutCheckout.js` reference](https://developer.revolut.com/docs/merchant-api/#revolutcheckout-js-reference) | ||
* @see [`RevolutCheckout.js` reference](https://developer.revolut.com/docs/revolut-checkout-js) | ||
* | ||
@@ -12,0 +12,0 @@ * @example |
{ | ||
"name": "@revolut/checkout", | ||
"version": "1.0.7-1", | ||
"version": "1.0.7", | ||
"description": "RevolutCheckout.js as npm module", | ||
@@ -5,0 +5,0 @@ "author": "John Grishin <hi@johngrish.in>", |
import { RevolutCheckoutInstance, Mode } from './types'; | ||
/** | ||
* Load [`RevolutCheckout.js`](https://developer.revolut.com/docs/merchant-api/#revolutcheckout-js-reference-revolutcheckout) | ||
* and create [`Instance`](https://developer.revolut.com/docs/merchant-api/#revolutcheckout-js-reference-instance) for the order `token`. | ||
* Load [`RevolutCheckout.js`](https://developer.revolut.com/docs/revolut-checkout-js/#revolutcheckout) | ||
* and create [`Instance`](https://developer.revolut.com/docs/revolut-checkout-js/#instance) for the order `token`. | ||
* | ||
* @param token `public_id` from [create payment order](https://developer.revolut.com/docs/merchant-api/#api-reference-api-reference-orders-create-an-order) API request | ||
* @param mode [API](https://developer.revolut.com/docs/merchant-api/#api-reference) environment, default to `'prod'` | ||
* @param token `public_id` from [create payment order](https://developer.revolut.com/api-reference/merchant/#operation/createOrder) API request | ||
* @param mode [API](https://developer.revolut.com/docs/revolut-checkout-js/#revolutcheckout-parameters) environment, defaults to `'prod'` | ||
* | ||
* @see [`RevolutCheckout.js` reference](https://developer.revolut.com/docs/merchant-api/#revolutcheckout-js-reference) | ||
* @see [`RevolutCheckout.js` reference](https://developer.revolut.com/docs/revolut-checkout-js) | ||
* | ||
@@ -11,0 +11,0 @@ * @example |
@@ -103,2 +103,10 @@ import { MODE } from './constants'; | ||
} | ||
export interface PaymentRequestOptions extends CommonOptions { | ||
/** Empty element inside payment page */ | ||
target: HTMLElement; | ||
/** Request shipping in payment request UI */ | ||
requestShipping?: boolean; | ||
/** Disable payment request via basic card */ | ||
disableBasicCard?: boolean; | ||
} | ||
export interface RevolutCheckoutCardField extends RevolutCheckoutInstance { | ||
@@ -110,2 +118,12 @@ /** Submit entered card details along with a customer details */ | ||
} | ||
export interface PaymentRequestInstance { | ||
/** Render the payment request button */ | ||
render: () => Promise<void>; | ||
/** Check if user can make payment via a supported payment request method */ | ||
canMakePayment: () => Promise<boolean>; | ||
/** Manually destroy the payment request if needed */ | ||
destroy: () => void; | ||
} | ||
export interface WidgetPaymentRequestInstance extends PaymentRequestInstance, RevolutCheckoutInstance { | ||
} | ||
export interface RevolutCheckoutInstance { | ||
@@ -115,3 +133,3 @@ /** | ||
* | ||
* @see https://developer.revolut.com/docs/merchant-api/#revolutcheckout-js-reference-instance-paywithpopup | ||
* @see https://developer.revolut.com/docs/revolut-checkout-js/#instance-instance-paywithpopup | ||
*/ | ||
@@ -122,3 +140,3 @@ payWithPopup: (options?: PopupOptions) => RevolutCheckoutInstance; | ||
* | ||
* @see https://developer.revolut.com/docs/merchant-api/#revolutcheckout-js-reference-instance-createcardfield | ||
* @see https://developer.revolut.com/docs/revolut-checkout-js/#instance-instance-createcardfield | ||
*/ | ||
@@ -128,2 +146,4 @@ createCardField: (options?: CardFieldOptions) => RevolutCheckoutCardField; | ||
payWithRevolut?: (options: PayWithRevolutOptions) => RevolutCheckoutInstance; | ||
/** Accept payments via the W3C payment request API*/ | ||
paymentRequest: (options: PaymentRequestOptions) => PaymentRequestInstance; | ||
/** Manually destroy popup or card field if needed */ | ||
@@ -130,0 +150,0 @@ destroy: () => void; |
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
22371
348
0