From 1ab0e3aa4c2d8772bc929bb109b42292c396b183 Mon Sep 17 00:00:00 2001 From: Lars Kusch Date: Thu, 20 Jan 2022 08:42:51 +0100 Subject: [PATCH] Addes js Signed-off-by: Lars Kusch --- public/js/clients/payments/stripe-fpx.js | 2 ++ public/js/clients/payments/stripe-fpx.js.LICENSE.txt | 9 +++++++++ webpack.mix.js | 2 ++ 3 files changed, 13 insertions(+) create mode 100644 public/js/clients/payments/stripe-fpx.js create mode 100644 public/js/clients/payments/stripe-fpx.js.LICENSE.txt diff --git a/public/js/clients/payments/stripe-fpx.js b/public/js/clients/payments/stripe-fpx.js new file mode 100644 index 000000000000..5c14c98ed666 --- /dev/null +++ b/public/js/clients/payments/stripe-fpx.js @@ -0,0 +1,2 @@ +/*! For license information please see stripe-fpx.js.LICENSE.txt */ +(()=>{var e,t,n,r;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}var i=null!==(e=null===(t=document.querySelector('meta[name="stripe-publishable-key"]'))||void 0===t?void 0:t.content)&&void 0!==e?e:"",c=null!==(n=null===(r=document.querySelector('meta[name="stripe-account-id"]'))||void 0===r?void 0:r.content)&&void 0!==n?n:"";new function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,"setupStripe",(function(){r.stripe=Stripe(r.key),r.stripeConnect&&(r.stripe.stripeAccount=c);var e=r.stripe.elements();return r.fpx=e.create("fpxBank",{style:{base:{padding:"10px 12px",color:"#32325d",fontSize:"16px"}},accountHolderType:"individual"}),r.fpx.mount("#fpx-bank-element"),r})),o(this,"handle",(function(){document.getElementById("pay-now").addEventListener("click",(function(e){document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),r.stripe.confirmFpxPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{fpx:r.fpx},return_url:document.querySelector('meta[name="return-url"]').content})}))})),this.key=t,this.errors=document.getElementById("errors"),this.stripeConnect=n}(i,c).setupStripe().handle()})(); \ No newline at end of file diff --git a/public/js/clients/payments/stripe-fpx.js.LICENSE.txt b/public/js/clients/payments/stripe-fpx.js.LICENSE.txt new file mode 100644 index 000000000000..585c6ab0e4fc --- /dev/null +++ b/public/js/clients/payments/stripe-fpx.js.LICENSE.txt @@ -0,0 +1,9 @@ +/** + * Invoice Ninja (https://invoiceninja.com) + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://opensource.org/licenses/AAL + */ diff --git a/webpack.mix.js b/webpack.mix.js index f8c7b2ea7424..49aaa0d44cdd 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -150,6 +150,8 @@ mix.js("resources/js/app.js", "public/js") "resources/js/clients/payments/stripe-browserpay.js", "public/js/clients/payments/stripe-browserpay.js" ) + .js("resources/js/clients/payments/stripe-fpx.js", + "public/js/clients/payments/stripe-fpx.js") mix.copyDirectory('node_modules/card-js/card-js.min.css', 'public/css/card-js.min.css');