@adyen/adyen-web
Version:
[](https://www.npmjs.com/package/@adyen/adyen-web)
3 lines (2 loc) • 1.53 kB
JavaScript
import{getSupportedLocale as e}from"./get-paypal-locale.js";import{INTEGRATION_DATE as t,ADYEN_CLIENTID_TEST as n,ADYEN_CLIENTID_LIVE as r}from"../config.js";function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}const i=({amount:i,countryCode:u,debug:a,environment:l="",locale:b,configuration:s,commit:p,vault:y,enableMessages:f})=>{const O=e(b),g=i?i.currency:null,m="test"===l.toLowerCase(),j=m?n:r,{merchantId:d,intent:P}=s,w="buttons,funding-eligibility"+(f?",messages":"");return c(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){o(e,t,n[t])})}return e}({},d&&{"merchant-id":d},O&&{locale:O},u&&m&&{"buyer-country":u},a&&m&&{debug:a},g&&{currency:g},P&&{intent:P}),{commit:p,vault:y,"client-id":j,"integration-date":t,"enable-funding":"paylater,venmo",components:w})};export{i as getPaypalSettings};
//# sourceMappingURL=get-paypal-settings.js.map