How to use the paypal-checkout/src/components/button/templates/component/index.componentTemplate function in paypal-checkout

To help you get started, we’ve selected a few paypal-checkout examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github paypal / paypal-smart-payment-buttons / lib / index.js View on Github external
module.exports = (req, res) => {

    let style = {
        size:         req.query['style.size'],
        color:        req.query['style.color'],
        shape:        req.query['style.shape'],
        label:        req.query['style.label'],
        dual:         Boolean(req.cookies.pwv),
        fundingicons: strToBoolean(req.query['style.fundingicons']),
        branding:     strToBoolean(req.query['style.branding']),
        tagline:      strToBoolean(req.query['style.tagline'])
    };

    let buttonHTML = componentTemplate({
        props: {
            locale: req.query['locale.x'] || 'en_US',
            style: style
        }
    });

    return {
        style: style,
        buttonHTML: buttonHTML
    };
};

paypal-checkout

PayPal Checkout components, for integrating checkout products.

Apache-2.0
Latest version published 3 months ago

Package Health Score

84 / 100
Full package analysis