
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
@checkout.com/checkout-web-components
Advanced tools
Loader for CheckoutWebComponents.
For more information on how to use the CheckoutWebComponents, please refer to the CheckoutWebComponents documentation.
Use npm
to install the package.
npm install @checkout.com/checkout-web-components
The loadCheckoutWebComponents
function is the entry point for the library.
The function returns a Promise
resolving with a CheckoutWebComponents
instance, and handles loading the CheckoutWebComponents
script. This instance can then be used to create a Flow component that can be mounted.
import { loadCheckoutWebComponents } from '@checkout.com/checkout-web-components';
// Insert your public key here
const publicKey = '{your_public_key}';
// Initialise a new Checkout Web Components instance
const checkout = await loadCheckoutWebComponents({
paymentSession,
publicKey,
environment: 'sandbox'
});
// You can now create and mount a Flow component using 'checkout'
const flowComponent = checkout.create('flow');
// Mount Flow component to div element with an ID of 'flow-container'
flowComponent.mount('#flow-container');
You can find/create your public key in the Developers section of your Checkout.com Production Dashboard or Checkout.com Sandbox Dashboard. See our API keys documentation for more information.
This project is licensed under the MIT License.
FAQs
Checkout Payment Components loader
The npm package @checkout.com/checkout-web-components receives a total of 10,901 weekly downloads. As such, @checkout.com/checkout-web-components popularity was classified as popular.
We found that @checkout.com/checkout-web-components demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.