1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-15 07:33:04 +01:00
invoiceninja/public/build/assets/stripe-giropay-bff9b7b5.js
Benjamin Beganović 0de492d96f
Stripe: New payment flow (#67)
* stripe: ach

* stripe: klarna

* stripe: bank transfer

* assets build

* stripe: bacs

* stripe: bancontact

* stripe: becs

* stripe: eps

* stripe: fpx

* stripe: giropay

* stripe: ideal

* stripe: przelewy24

* stripe: sepa

* stripe: sofort

* assets build

* assets build

* pass context payload into livewirePaymentView

* update checkout.com

* update livewire method interface

* stripe: acss

* align methods with interface (array $data)
2024-07-16 18:43:55 +10:00

10 lines
1.7 KiB
JavaScript
Vendored

var s=Object.defineProperty;var i=(n,t,e)=>t in n?s(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var r=(n,t,e)=>(i(n,typeof t!="symbol"?t+"":t,e),e);import{w as c}from"./wait-8f4ae121.js";/**
* 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://www.elastic.co/licensing/elastic-license
*/class a{constructor(t,e){r(this,"setupStripe",()=>(this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key),this));r(this,"handle",()=>{document.getElementById("pay-now").addEventListener("click",t=>{let e=document.getElementById("errors");if(!document.getElementById("giropay-mandate-acceptance").checked){e.textContent=document.querySelector("meta[name=translation-terms-required]").content,e.hidden=!1,console.log("Terms");return}document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmGiropayPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{billing_details:{name:document.getElementById("giropay-name").value}},return_url:document.querySelector('meta[name="return-url"]').content})})});this.key=t,this.errors=document.getElementById("errors"),this.stripeConnect=e}}c("#stripe-giropay-payment").then(()=>{var e,o;const n=((e=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:e.content)??"",t=((o=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:o.content)??"";new a(n,t).setupStripe().handle()});