PluginProbe ʕ •ᴥ•ʔ
GiveWP – Donation Plugin and Fundraising Platform / 3.18.0
GiveWP – Donation Plugin and Fundraising Platform v3.18.0
4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 2.32.0 2.33.0 2.33.1 2.33.2 2.33.3 2.33.4 2.33.5 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.2 2.6.3 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.9.0 2.9.1 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.10.0 3.11.0 3.12.0 3.12.1 3.12.2 3.12.3 3.13.0 3.14.0 3.14.1 3.14.2 3.15.0 3.15.1 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.16.5 3.17.0 3.17.1 3.17.2 3.18.0 3.19.0 3.19.1 3.19.2 3.19.3 3.19.4 3.2.0 3.2.1 3.2.2 3.20.0 3.21.0 3.21.1 3.22.0 3.22.1 3.22.2 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 3.6.0 3.6.1 3.6.2 3.7.0 3.8.0 3.9.0 4.0.0 4.1.0 4.1.1 4.10.0 4.10.1 4.11.0 4.12.0 4.13.0 4.13.1 4.13.2 4.14.0 4.14.1 4.14.2 4.14.3 4.14.4 4.14.5 4.14.6 4.2.0 4.2.1 4.3.0 4.3.1 4.3.2 4.4.0 4.5.0 4.6.1 4.7.0 4.7.1 4.8.0 4.8.1 4.9.0 trunk 1.9.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.10.0 2.10.1 2.10.2 2.10.3 2.10.4 2.11.0 2.11.1 2.11.2 2.11.3 2.12.0 2.12.1 2.12.2 2.12.3 2.13.0 2.13.1 2.13.2 2.13.3 2.13.4 2.14.0 2.15.0 2.16.0 2.16.1 2.17.0 2.17.1 2.17.3 2.18.0 2.18.1 2.19.1 2.19.2 2.19.3 2.19.4 2.19.5 2.19.6 2.19.7 2.19.8 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.20.0 2.20.1 2.20.2 2.21.0 2.21.1 2.21.2 2.21.3 2.21.4 2.22.0 2.22.1 2.22.2 2.22.3 2.23.0 2.23.1 2.23.2 2.24.0 2.24.1 2.24.2 2.25.0 2.25.1 2.25.2 2.25.3 2.26.0 2.27.0 2.27.1 2.27.2 2.27.3 2.28.0 2.29.0 2.29.1 2.29.2
give / build / stripePaymentElementGateway.js
give / build Last commit date
DonationForms 2 years ago EventTickets 2 years ago fonts 2 years ago images 2 years ago adminBlocks.asset.php 1 year ago adminBlocks.css 2 years ago adminBlocks.js 1 year ago baseFormDesignCss.asset.php 1 year ago baseFormDesignCss.css 1 year ago baseFormDesignCss.js 2 years ago classicFormDesignCss.asset.php 1 year ago classicFormDesignCss.css 1 year ago classicFormDesignCss.js 2 years ago classicFormDesignJs.asset.php 2 years ago classicFormDesignJs.js 2 years ago donationConfirmationReceiptApp.asset.php 1 year ago donationConfirmationReceiptApp.js 1 year ago donationFormApp.asset.php 1 year ago donationFormApp.css 2 years ago donationFormApp.js 1 year ago donationFormBlock.asset.php 2 years ago donationFormBlock.css 2 years ago donationFormBlock.js 2 years ago donationFormBlockApp.asset.php 1 year ago donationFormBlockApp.css 2 years ago donationFormBlockApp.js 1 year ago donationFormEmbed.asset.php 2 years ago donationFormEmbed.js 2 years ago donationFormEmbedInside.asset.php 2 years ago donationFormEmbedInside.js 2 years ago donationFormRegistrars.asset.php 1 year ago donationFormRegistrars.css 2 years ago donationFormRegistrars.js 1 year ago eventTicketsBlock.asset.php 2 years ago eventTicketsBlock.css 2 years ago eventTicketsBlock.js 2 years ago eventTicketsTemplate.asset.php 2 years ago eventTicketsTemplate.css 2 years ago eventTicketsTemplate.js 2 years ago formBuilderApp.asset.php 1 year ago formBuilderApp.css 1 year ago formBuilderApp.js 1 year ago formBuilderRegistrars.asset.php 1 year ago formBuilderRegistrars.css 1 year ago formBuilderRegistrars.js 1 year ago formTaxonomySettings.asset.php 1 year ago formTaxonomySettings.js 1 year ago multiStepFormDesignCss.asset.php 2 years ago multiStepFormDesignCss.css 2 years ago multiStepFormDesignCss.js 2 years ago offlineGateway.asset.php 2 years ago offlineGateway.js 2 years ago offlineGatewayFormBuilder.asset.php 2 years ago offlineGatewayFormBuilder.css 2 years ago offlineGatewayFormBuilder.js 2 years ago payPalCommerceGateway.asset.php 1 year ago payPalCommerceGateway.js 1 year ago payPalStandardGateway.asset.php 2 years ago payPalStandardGateway.js 2 years ago stripePaymentElementFormBuilder.asset.php 2 years ago stripePaymentElementFormBuilder.css 2 years ago stripePaymentElementFormBuilder.js 2 years ago stripePaymentElementGateway.asset.php 1 year ago stripePaymentElementGateway.js 1 year ago style-adminBlocks.css 2 years ago style-formBuilderApp.css 2 years ago style-formTaxonomySettings.css 1 year ago testGateway.asset.php 2 years ago testGateway.js 2 years ago testOffsiteGateway.asset.php 2 years ago testOffsiteGateway.js 2 years ago twoPanelStepsFormLayoutCss.asset.php 2 years ago twoPanelStepsFormLayoutCss.css 2 years ago twoPanelStepsFormLayoutCss.js 2 years ago
stripePaymentElementGateway.js
1 lines
1 (()=>{var e={6664:function(e,t,n){!function(e,t){"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,a=[],_n=!0,i=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);_n=!0);}catch(e){i=!0,o=e}finally{try{_n||null==n.return||n.return()}finally{if(i)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;function c(){}function u(){}u.resetWarningCache=c;var l,p,f=(l=function(e){e.exports=function(){function e(e,t,n,r,o,a){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==a){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:u,resetWarningCache:c};return n.PropTypes=n,n}()},l(p={exports:{}},p.exports),p.exports),m=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),n.current},d=function(e){return null!==e&&"object"===o(e)},y="[object Object]",h=function e(t,n){if(!d(t)||!d(n))return t===n;var r=Array.isArray(t);if(r!==Array.isArray(n))return!1;var o=Object.prototype.toString.call(t)===y;if(o!==(Object.prototype.toString.call(n)===y))return!1;if(!o&&!r)return t===n;var a=Object.keys(t),i=Object.keys(n);if(a.length!==i.length)return!1;for(var s={},c=0;c<a.length;c+=1)s[a[c]]=!0;for(var u=0;u<i.length;u+=1)s[i[u]]=!0;var l=Object.keys(s);if(l.length!==a.length)return!1;var p=t,f=n;return l.every((function(t){return e(p[t],f[t])}))},g=function(e,t,n){return d(e)?Object.keys(e).reduce((function(o,i){var s=!d(t)||!h(e[i],t[i]);return n.includes(i)?(s&&console.warn("Unsupported prop change: options.".concat(i," is not a mutable property.")),o):s?r(r({},o||{}),{},a({},i,e[i])):o}),null):null},v=function(e){if(null===e||d(t=e)&&"function"==typeof t.elements&&"function"==typeof t.createToken&&"function"==typeof t.createPaymentMethod&&"function"==typeof t.confirmCardPayment)return e;var t;throw new Error("Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},E=function(e){if(function(e){return d(e)&&"function"==typeof e.then}(e))return{tag:"async",stripePromise:Promise.resolve(e).then(v)};var t=v(e);return null===t?{tag:"empty"}:{tag:"sync",stripe:t}},w=t.createContext(null);w.displayName="ElementsContext";var b=t.createContext(null);b.displayName="CartElementContext";var C=function(e){var n=e.stripe,r=e.options,o=e.children,a=t.useMemo((function(){return E(n)}),[n]),s=i(t.useState(null),2),c=s[0],u=s[1],l=i(t.useState(null),2),p=l[0],f=l[1],d=i(t.useState((function(){return{stripe:"sync"===a.tag?a.stripe:null,elements:"sync"===a.tag?a.stripe.elements(r):null}})),2),y=d[0],h=d[1];t.useEffect((function(){var e=!0,t=function(e){h((function(t){return t.stripe?t:{stripe:e,elements:e.elements(r)}}))};return"async"!==a.tag||y.stripe?"sync"!==a.tag||y.stripe||t(a.stripe):a.stripePromise.then((function(n){n&&e&&t(n)})),function(){e=!1}}),[a,y,r]);var v=m(n);t.useEffect((function(){null!==v&&v!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")}),[v,n]);var C=m(r);return t.useEffect((function(){if(y.elements){var e=g(r,C,["clientSecret","fonts"]);e&&y.elements.update(e)}}),[r,C,y.elements]),t.useEffect((function(){var e=y.stripe;e&&e._registerWrapper&&e.registerAppInfo&&(e._registerWrapper({name:"react-stripe-js",version:"2.1.2"}),e.registerAppInfo({name:"react-stripe-js",version:"2.1.2",url:"https://stripe.com/docs/stripe-js/react"}))}),[y.stripe]),t.createElement(w.Provider,{value:y},t.createElement(b.Provider,{value:{cart:c,setCart:u,cartState:p,setCartState:f}},o))};C.propTypes={stripe:f.any,options:f.object};var S=function(e){return function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e}(t.useContext(w),e)},P=function(e){return function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e}(t.useContext(b),e)},j=function(e){return(0,e.children)(S("mounts <ElementsConsumer>"))};j.propTypes={children:f.func.isRequired};var O=function(e,n,r){var o=!!r,a=t.useRef(r);t.useEffect((function(){a.current=r}),[r]),t.useEffect((function(){if(!o||!e)return function(){};var t=function(){a.current&&a.current.apply(a,arguments)};return e.on(n,t),function(){e.off(n,t)}}),[o,n,e,a])},k=function(e,n){var r,o="".concat((r=e).charAt(0).toUpperCase()+r.slice(1),"Element"),a=n?function(e){S("mounts <".concat(o,">")),P("mounts <".concat(o,">"));var n=e.id,r=e.className;return t.createElement("div",{id:n,className:r})}:function(n){var r,a=n.id,s=n.className,c=n.options,u=void 0===c?{}:c,l=n.onBlur,p=n.onFocus,f=n.onReady,d=n.onChange,y=n.onEscape,h=n.onClick,v=n.onLoadError,E=n.onLoaderStart,w=n.onNetworksChange,b=n.onCheckout,C=n.onLineItemClick,j=n.onConfirm,k=n.onCancel,_=n.onShippingAddressChange,A=n.onShippingRateChange,x=S("mounts <".concat(o,">")).elements,I=i(t.useState(null),2),F=I[0],R=I[1],M=t.useRef(null),T=t.useRef(null),D=P("mounts <".concat(o,">")),B=D.setCart,L=D.setCartState;O(F,"blur",l),O(F,"focus",p),O(F,"escape",y),O(F,"click",h),O(F,"loaderror",v),O(F,"loaderstart",E),O(F,"networkschange",w),O(F,"lineitemclick",C),O(F,"confirm",j),O(F,"cancel",k),O(F,"shippingaddresschange",_),O(F,"shippingratechange",A),"cart"===e?r=function(e){L(e),f&&f(e)}:f&&(r="expressCheckout"===e?f:function(){f(F)}),O(F,"ready",r),O(F,"change","cart"===e?function(e){L(e),d&&d(e)}:d),O(F,"checkout","cart"===e?function(e){L(e),b&&b(e)}:b),t.useLayoutEffect((function(){if(null===M.current&&x&&null!==T.current){var t=x.create(e,u);"cart"===e&&B&&B(t),M.current=t,R(t),t.mount(T.current)}}),[x,u,B]);var N=m(u);return t.useEffect((function(){if(M.current){var e=g(u,N,["paymentRequest"]);e&&M.current.update(e)}}),[u,N]),t.useLayoutEffect((function(){return function(){if(M.current&&"function"==typeof M.current.destroy)try{M.current.destroy(),M.current=null}catch(e){}}}),[]),t.createElement("div",{id:a,className:s,ref:T})};return a.propTypes={id:f.string,className:f.string,onChange:f.func,onBlur:f.func,onFocus:f.func,onReady:f.func,onEscape:f.func,onClick:f.func,onLoadError:f.func,onLoaderStart:f.func,onNetworksChange:f.func,onCheckout:f.func,onLineItemClick:f.func,onConfirm:f.func,onCancel:f.func,onShippingAddressChange:f.func,onShippingRateChange:f.func,options:f.object},a.displayName=o,a.__elementType=e,a},_="undefined"==typeof window,A=k("auBankAccount",_),x=k("card",_),I=k("cardNumber",_),F=k("cardExpiry",_),R=k("cardCvc",_),M=k("fpxBank",_),T=k("iban",_),D=k("idealBank",_),B=k("p24Bank",_),L=k("epsBank",_),N=k("payment",_),W=k("expressCheckout",_),U=k("paymentRequestButton",_),q=k("linkAuthentication",_),Y=k("address",_),G=k("shippingAddress",_),V=k("cart",_),X=k("paymentMethodMessaging",_),K=k("affirmMessage",_),z=k("afterpayClearpayMessage",_);e.AddressElement=Y,e.AffirmMessageElement=K,e.AfterpayClearpayMessageElement=z,e.AuBankAccountElement=A,e.CardCvcElement=R,e.CardElement=x,e.CardExpiryElement=F,e.CardNumberElement=I,e.CartElement=V,e.Elements=C,e.ElementsConsumer=j,e.EpsBankElement=L,e.ExpressCheckoutElement=W,e.FpxBankElement=M,e.IbanElement=T,e.IdealBankElement=D,e.LinkAuthenticationElement=q,e.P24BankElement=B,e.PaymentElement=N,e.PaymentMethodMessagingElement=X,e.PaymentRequestButtonElement=U,e.ShippingAddressElement=G,e.useCartElement=function(){return P("calls useCartElement()").cart},e.useCartElementState=function(){return P("calls useCartElementState()").cartState},e.useElements=function(){return S("calls useElements()").elements},e.useStripe=function(){return S("calls useStripe()").stripe},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(9196))},9196:e=>{"use strict";e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}(()=>{"use strict";var e=n(9196),t="https://js.stripe.com/v3",r=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,o="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",a=null,i=Promise.resolve().then((function(){return e=null,null!==a||(a=new Promise((function(n,a){if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(o),window.Stripe)n(window.Stripe);else try{var i=function(){for(var e=document.querySelectorAll('script[src^="'.concat(t,'"]')),n=0;n<e.length;n++){var o=e[n];if(r.test(o.src))return o}return null}();i&&e?console.warn(o):i||(i=function(e){var n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(t).concat(n);var o=document.head||document.body;if(!o)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return o.appendChild(r),r}(e)),i.addEventListener("load",(function(){window.Stripe?n(window.Stripe):a(new Error("Stripe.js not available"))})),i.addEventListener("error",(function(){a(new Error("Failed to load Stripe.js"))}))}catch(e){return void a(e)}else n(null)}))),a;var e})),s=!1;i.catch((function(e){s||console.warn(e)}));var c=n(6664);const u=window.wp.hooks,l=window.wp.i18n;let p=null,f=null,m=!1;const d=["BIF","CLP","DJF","GNF","JPY","KMF","KRW","MGA","PYG","RWF","UGX","VND","VUV","XAF","XOF","XPF"],y=({gateway:t})=>{const n=(0,c.useStripe)(),r=(0,c.useElements)();return t.stripe=n,t.elements=r,(0,e.createElement)(c.PaymentElement,{onChange:e=>{f=e.value.type,m="card"===e.value.type},options:{fields:{billingDetails:{name:"never",email:"never"}}}})};let h={};const g={id:"stripe_payment_element",initialize(){const{stripeKey:e,stripeConnectedAccountId:t,formId:n}=this.settings;if(!e&&!t)throw new Error("Stripe gateway settings are missing. Check your Stripe settings.");h=(0,u.applyFilters)("givewp_stripe_payment_element_appearance_options",{},n),p=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];s=!0;var r=Date.now();return i.then((function(e){return function(e,t,n){if(null===e)return null;var r=e.apply(void 0,t);return function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"1.54.2",startTime:t})}(r,n),r}(e,t,r)}))}(e,t?{stripeAccount:t}:{})},beforeCreatePayment:async function(e){if(!this.stripe||!this.elements)throw new Error("Stripe was not able to load.");const{error:t}=await this.elements.submit();if(t){let e=(0,l.__)("Invalid Payment Data.","give");throw"string"==typeof t&&(e=(0,l.sprintf)((0,l.__)("Invalid Payment Data. Error Details: %s","give"),t)),t.hasOwnProperty("code")&&t.hasOwnProperty("message")&&(e=(0,l.sprintf)((0,l.__)("Invalid Payment Data. Error Details: %s (code: %s)","give"),t.message,t.code)),new Error(e)}return{stripePaymentMethod:f,stripePaymentMethodIsCreditCard:m,...this.settings}},afterCreatePayment:async function(e){const{error:t}=await this.stripe.confirmPayment({elements:this.elements,clientSecret:e.data.clientSecret,confirmParams:{payment_method_data:{billing_details:e.data.billingDetails},return_url:e.data.returnUrl}});if(console.error(t),"card_error"===t.type||"validation_error"===t.type)throw new Error(t.message);if(t)throw new Error(t.message)},Fields(){if(!p)throw new Error("Stripe library was not able to load. Check your Stripe settings.");const{useWatch:t}=window.givewp.form.hooks,n=t({name:"donationType"}),r=t({name:"currency"}),o=t({name:"amount"});var a,i;const s={mode:"subscription"===n?"subscription":"payment",amount:(a=o,i=r.toString().toUpperCase(),d.includes(i)?Math.round(parseFloat(a)):Math.round(100*parseFloat(a))),currency:r.toLowerCase(),appearance:h};return o<=0?(0,e.createElement)(e.Fragment,null,(0,l.__)("Donation amount must be greater than zero to proceed.","give")):(0,e.createElement)(c.Elements,{stripe:p,options:s},(0,e.createElement)(y,{gateway:g}))}};window.givewp.gateways.register(g)})()})();