@comgate/checkout
v1.0.8
Published
Comgate pre-built checkout library
Downloads
90
Maintainers
Readme
@comgate/checkout
Checkout is a library for easily implement Comgate payment methods directly into the online store cart. It allows you to create a clean, non-disruptive design, including the payment processing through our systems.
Comprehensive API documentation can be found on our website. It is used for custom implementation of e-shop connection to API. It contains CURL, PHP, JAVA, Python and C# examples.
The complete documentation for this library is available in our API documentation, in the Checkout Library section.
Features
- ✔ Apple Pay
- ✔ Google Pay
- more features coming soon...
Usage
Installing dependency:
npm i @comgate/checkout
Include package into your project:
import ComgateCheckout from '@comgate/checkout';
// styles used for Checkout SDK components
import '@comgate/checkout/lib/comgate-checkout.css';
And then it is possible to create an instance of ComgateCheckout by general documentation for this library.
ComgateCheckout({
checkoutId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // (mandatory) checkout ID
locale: 'en', // (optional, default: cs) UI language
debug: true, // (optional, default: false) enable debug mode
transactionId: 'XXXX-XXXX-XXXX', // (required) Comgate Transaction ID
// ...
})
.then((checkoutInstance) => {
// instance ready
// TODO DIY
})
.catch((error) => {
// error during instance creation
// TODO DIY
});
License
Copyright © 2023, Comgate a. s. Released under the BUSL-1.1.