New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

checkout-web-components

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

checkout-web-components

Checkout Payment Components loader

  • 0.2.0-beta
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-87.1%
Maintainers
1
Weekly downloads
 
Created
Source

Checkout Web Components Loader

License: MIT

Loader for Checkout Web Components.


Table of contents


Installation

Use npm to install the package.

npm install checkout-web-components

Usage

The loadCheckoutWebComponents function is the entry point for the library.

The function returns a Promise resolving with a CheckoutWebComponents instance, and handles loading the Checkout Web Components script. This instance can then be used to create PaymentComponents that can be mounted.

import { loadCheckoutWebComponents } from 'checkout-web-components';

Example

const cko = await loadCheckoutWebComponents({
  publicKey: 'pk_XXXXXX',
  paymentSession,
  environment: 'sandbox'
});

// You can now create and mount a payment component using 'cko'
const paymentsComponent = cko.create('payments');

// Mount payments component to div with an id of 'payments'
paymentsComponent.mount('#payments');

Replace the example pk_XXXXXX value with your own public key. You can find 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.


License

This project is licensed under the MIT License.

FAQs

Package last updated on 04 Oct 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc