How to use the belter/src.extendUrl function in belter

To help you get started, we’ve selected a few belter 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 / src / payment-flows / native.js View on Github external
const getNativeUrl = ({ pageUrl = initialPageUrl } = {}) : string => {
        return extendUrl(`${ NATIVE_DOMAIN }${ NATIVE_CHECKOUT_URI[fundingSource] }`, {
            query: { sdkMeta, sessionUID, buttonSessionID, pageUrl }
        });
    };
github paypal / paypal-smart-payment-buttons / src / payment-flows / native.js View on Github external
const getWebCheckoutUrl = ({ orderID }) : string => {
        return extendUrl(`${ getDomain() }${ WEB_CHECKOUT_URI }`, {
            query: {
                fundingSource,
                facilitatorAccessToken,
                token:         orderID,
                useraction:    commit ? USER_ACTION.COMMIT : USER_ACTION.CONTINUE,
                native_xo:     '1',
                venmoOverride: (fundingSource === FUNDING.VENMO) ? '1' : '0'
            }
        });
    };
github paypal / paypal-smart-payment-buttons / src / payment-flows / popup-bridge.js View on Github external
return createOrder().then(orderID => {
            if (!parentPopupBridge) {
                throw new Error(`Popup bridge required`);
            }
            
            const url = extendUrl(`${ getDomain() }${ WEB_CHECKOUT_URI }`, {
                query: {
                    fundingSource,
                    token:        orderID,
                    useraction:   commit ? USER_ACTION.COMMIT : USER_ACTION.CONTINUE,
                    redirect_uri: parentPopupBridge.nativeUrl
                }
            });

            return parentPopupBridge.start(url);

        }).then(({ opType, PayerID: payerID, paymentId: paymentID, ba_token: billingToken }) => {
            if (opType === POPUP_BRIDGE_OPTYPE.PAYMENT) {
github krakenjs / zoid / src / component / parent / index.js View on Github external
.then(query => {
                let url = normalizeMockUrl(this.component.getUrl(this.props));
                return extendUrl(url, { query: { ...query } });
            });
    }
github paypal / paypal-checkout-components / src / integrations / popupBridge.js View on Github external
return ZalgoPromise.try(payment, { props }).then(token => {
        if (!token) {
            throw new Error(`Expected props.payment to return a payment id or token`);
        }

        return extendUrl(determineUrl(env, FUNDING.PAYPAL), {
            token,
            useraction: props.commit ? 'commit' : '',
            native_xo:  '1'
        });
    });
}
github paypal / paypal-smart-payment-buttons / src / payment-flows / native.js View on Github external
const getNativePopupUrl = () : string => {
        return extendUrl(`${ NATIVE_POPUP_DOMAIN }${ NATIVE_CHECKOUT_POPUP_URI[fundingSource] }`, {
            query: { sdkMeta }
        });
    };