![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@shopmacher/easy-credit-commercetools-component
Advanced tools
This guide provides instructions on how to integrate and display the connector's provided web-components which are [EasyCredit Web Components](https://netzkollektiv.com/docs/easycredit-components/?path=/docs/getting-started-installation--docs) but with ou
This guide provides instructions on how to integrate and display the connector's provided web-components which are EasyCredit Web Components but with our connector's validation logic.
First, after install the connector into the shop, you must config all the necessary credentials that defined in the processor part, you can have a look at this file
Then, in your shop, you need to install our package to use provided components:
npm i @shopmacher/easy-credit-commercetools-component
.<script type="module" src="YOUR_ASSET_URL_HERE" />
Created from EasyCredit Label component
It is handled in label.component.ts
To use this component, you need to integrate this short snippet into your shop:
const enabler = new Enabler({
processorUrl: 'https://service-bk5phtyi8svk2ne51fw3ulsn.europe-west1.gcp.commercetools.app/', // Connector's processor URL
sessionId: session.token, // CommerceTools session ID
});
enabler.createLabelBuilder().then((labelBuilder: any) => {
const labelComponent = labelBuilder.build({});
labelComponent.mount('#easycredit-checkout-label');
setLabelLoaded(true);
});
By doing this, the component will make API calls to the connector to check whether the component can be displayed or not, if it is able to be displayed, the result will be like the image below:
Created from EasyCredit Widget component
It is handled in widget.component.ts
To display the EasyCredit Widget, which mostly been used in the PDP of every shop, you need to make sure that the WEBSHOP_ID
is set up correctly and the WIDGET_ENABLED
is set to be 1
Then, in the shop side, you need to integrate this short snippet:
const enabler = new Enabler({
processorUrl: 'https://service-bk5phtyi8svk2ne51fw3ulsn.europe-west1.gcp.commercetools.app/', // Connector's processor URL
sessionId: sessionToken, // CommerceTools session ID
});
const widgetBuilder = await enabler.createWidgetBuilder();
const widgetComponent = widgetBuilder.build({
amount: totalValue, // Cart amount
});
// Mount the new widget
widgetComponent
.mount('#easycredit-cart') // The place to display the component
.then((res: any) => {
console.log('mounted successfully', res);
})
.catch((error: any) => {
console.log('failed to mount', error);
});
By doing this, the component will make API calls to the connector to check whether the widget can be displayed or not, if it is able to be displayed, the result will be like the image below:
Created from EasyCredit Label component and EasyCredit Checkout component
It is handled in checkout.component.ts
To use this component, you need to integrate this short snippet into your shop:
const enabler = new Enabler({
processorUrl: 'https://service-bk5phtyi8svk2ne51fw3ulsn.europe-west1.gcp.commercetools.app/', // Connector's processor URL
sessionId: session.token, // CommerceTools session ID
});
enabler.createCheckoutBuilder().then((checkoutBuilder: any) => {
const checkoutComponent = checkoutBuilder.build({
cartId: cart.cartId,
redirectLinks: {
urlSuccess: window.location.origin + window.location.pathname + '?step=3',
urlCancellation: window.location.origin + window.location.pathname + '?step=2&status=cancelled',
urlDenial: window.location.origin + window.location.pathname + '?step=2&status=denied',
},
customerRelationship: {
customerStatus: loggedIn === true ? 'EXISTING_CUSTOMER' : 'NEW_CUSTOMER',
customerSince: account?.createdAt,
numberOfOrders: myOrdersCount,
},
onError: (err: any) => {
console.error('onError', err);
},
onSuccess: (response: any) => {
console.log('connector handled it successfully', response);
window.location.replace(response?.redirectUrl);
},
});
checkoutComponent
.mount('#easycredit-checkout') // The place to display the component
.then((res: any) => {
console.log('mounted successfully', res);
})
.catch((error: any) => {
console.log('failed to mount', error);
});
});
By doing this, the component will make API calls to the connector to check whether the component can be displayed or not, if it is able to be displayed, the result will be like the image below:
Created from EasyCredit Label component and EasyCredit Checkout component
It is handled in summary.component.ts
To use this component, you need to integrate this short snippet into your shop:
enabler = new Enabler({
processorUrl: 'https://service-bk5phtyi8svk2ne51fw3ulsn.europe-west1.gcp.commercetools.app/', // Connector's processor URL
sessionId: session.token, // CommerceTools session ID
});
enabler.createSummaryBuilder().then((summaryComponentBuilder: any) => {
const summaryComponent = summaryComponentBuilder.build({
paymentId: easyCreditPayment.id,
});
summaryComponent
.mount('#easycredit-summary') // The place to display the component
.then((res: any) => {
console.log('mounted successfully', res);
})
.catch((error: any) => {
console.log('failed to mount', error);
});
});
By doing this, the component will make API calls to the connector to check whether the component can be displayed or not, if it is able to be displayed, the result will be like the image below:
FAQs
This guide provides instructions on how to integrate and display the connector's provided web-components which are [EasyCredit Web Components](https://netzkollektiv.com/docs/easycredit-components/?path=/docs/getting-started-installation--docs) but with ou
The npm package @shopmacher/easy-credit-commercetools-component receives a total of 0 weekly downloads. As such, @shopmacher/easy-credit-commercetools-component popularity was classified as not popular.
We found that @shopmacher/easy-credit-commercetools-component demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.