mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 05:07:31 -05:00 
			
		
		
		
	stripe sofort
This commit is contained in:
		
							parent
							
								
									9e8ccf9eb7
								
							
						
					
					
						commit
						024d839038
					
				@ -34,9 +34,7 @@ class ProcessSOFORT {
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        document.getElementById('pay-now').addEventListener('submit', (e) => {
 | 
					        document.getElementById('pay-now').addEventListener('click', (e) => {
 | 
				
			||||||
            e.preventDefault();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            document.getElementById('pay-now-button').disabled = true;
 | 
					            document.getElementById('pay-now-button').disabled = true;
 | 
				
			||||||
            document.querySelector('#pay-now-button > svg').classList.remove('hidden');
 | 
					            document.querySelector('#pay-now-button > svg').classList.remove('hidden');
 | 
				
			||||||
            document.querySelector('#pay-now-button > span').classList.add('hidden');
 | 
					            document.querySelector('#pay-now-button > span').classList.add('hidden');
 | 
				
			||||||
@ -54,8 +52,6 @@ class ProcessSOFORT {
 | 
				
			|||||||
                this.errors.textContent = result.error.message;
 | 
					                this.errors.textContent = result.error.message;
 | 
				
			||||||
                this.errors.hidden = false;
 | 
					                this.errors.hidden = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                processingOverlay(false);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                document.getElementById('pay-now').disabled = false;
 | 
					                document.getElementById('pay-now').disabled = false;
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
@ -1,61 +1,23 @@
 | 
				
			|||||||
@extends('portal.ninja2020.layout.app')
 | 
					@extends('portal.ninja2020.layout.payments', ['gateway_title' => 'SOFORT (Stripe)', 'card_title' => 'SOFORT (Stripe)'])
 | 
				
			||||||
@section('meta_title', ctrans('texts.sofort'))
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@push('head')
 | 
					@section('gateway_head')
 | 
				
			||||||
    <meta name="stripe-publishable-key" content="{{ $gateway->getPublishableKey() }}">
 | 
					    <meta name="stripe-publishable-key" content="{{ $gateway->getPublishableKey() }}">
 | 
				
			||||||
    <meta name="return-url" content="{{ $return_url }}">
 | 
					    <meta name="return-url" content="{{ $return_url }}">
 | 
				
			||||||
    <meta name="amount" content="{{ $stripe_amount }}">
 | 
					    <meta name="amount" content="{{ $stripe_amount }}">
 | 
				
			||||||
    <meta name="country" content="{{ $country }}">
 | 
					    <meta name="country" content="{{ $country }}">
 | 
				
			||||||
@endpush
 | 
					@endsection
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@section('body')
 | 
					@section('gateway_content')
 | 
				
			||||||
    <div class="container mx-auto">
 | 
					 | 
				
			||||||
        <div class="grid grid-cols-6 gap-4">
 | 
					 | 
				
			||||||
            <div class="col-span-6 md:col-start-2 md:col-span-4">
 | 
					 | 
				
			||||||
    <div class="alert alert-failure mb-4" hidden id="errors"></div>
 | 
					    <div class="alert alert-failure mb-4" hidden id="errors"></div>
 | 
				
			||||||
                <div class="bg-white shadow overflow-hidden sm:rounded-lg">
 | 
					
 | 
				
			||||||
                    <div class="px-4 py-5 border-b border-gray-200 sm:px-6">
 | 
					    @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')])
 | 
				
			||||||
                        <h3 class="text-lg leading-6 font-medium text-gray-900">
 | 
					 | 
				
			||||||
                            {{ ctrans('texts.pay_now') }}
 | 
					 | 
				
			||||||
                        </h3>
 | 
					 | 
				
			||||||
                        <p class="mt-1 max-w-2xl text-sm leading-5 text-gray-500">
 | 
					 | 
				
			||||||
                            {{ ctrans('texts.complete_your_payment') }}
 | 
					 | 
				
			||||||
                        </p>
 | 
					 | 
				
			||||||
                    </div>
 | 
					 | 
				
			||||||
                    <form action="#" method="POST" id="pay-now">
 | 
					 | 
				
			||||||
                        <div class="bg-gray-50 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6 flex items-center">
 | 
					 | 
				
			||||||
                            <dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
 | 
					 | 
				
			||||||
                                {{ ctrans('texts.payment_type') }}
 | 
					 | 
				
			||||||
                            </dt>
 | 
					 | 
				
			||||||
                            <dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
 | 
					 | 
				
			||||||
        {{ ctrans('texts.sofort') }} ({{ ctrans('texts.bank_transfer') }})
 | 
					        {{ ctrans('texts.sofort') }} ({{ ctrans('texts.bank_transfer') }})
 | 
				
			||||||
                            </dd>
 | 
					    @endcomponent
 | 
				
			||||||
                        </div>
 | 
					
 | 
				
			||||||
                        <div class="bg-white px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6 flex items-center">
 | 
					    @include('portal.ninja2020.gateways.includes.pay_now')
 | 
				
			||||||
                            <dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
 | 
					 | 
				
			||||||
                                {{ ctrans('texts.amount') }}
 | 
					 | 
				
			||||||
                            </dt>
 | 
					 | 
				
			||||||
                            <dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
 | 
					 | 
				
			||||||
                               <span class="font-bold">{{ App\Utils\Number::formatMoney($amount, $client) }}</span>
 | 
					 | 
				
			||||||
                            </dd>
 | 
					 | 
				
			||||||
                        </div>
 | 
					 | 
				
			||||||
                        <div class="bg-gray-50 px-4 py-5 flex justify-end" id="pay-now-button">
 | 
					 | 
				
			||||||
                            <button class="button button-primary bg-primary">
 | 
					 | 
				
			||||||
                                <svg class="animate-spin h-5 w-5 text-white hidden" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
 | 
					 | 
				
			||||||
                                    <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
 | 
					 | 
				
			||||||
                                    <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
 | 
					 | 
				
			||||||
                                </svg>
 | 
					 | 
				
			||||||
                                <span>{{ __('texts.save') }}</span>
 | 
					 | 
				
			||||||
                            </button>
 | 
					 | 
				
			||||||
                        </div>
 | 
					 | 
				
			||||||
                    </form>
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
@endsection
 | 
					@endsection
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@push('footer')
 | 
					@push('footer')
 | 
				
			||||||
    <script src="https://js.stripe.com/v3/"></script>
 | 
					    <script src="https://js.stripe.com/v3/"></script>
 | 
				
			||||||
    <script src="{{ asset('js/clients/payments/sofort.js') }}"></script>
 | 
					    <script src="{{ asset('js/clients/payments/stripe-sofort.js') }}"></script>
 | 
				
			||||||
@endpush
 | 
					@endpush
 | 
				
			||||||
							
								
								
									
										4
									
								
								webpack.mix.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								webpack.mix.js
									
									
									
									
										vendored
									
									
								
							@ -23,8 +23,8 @@ mix.js("resources/js/app.js", "public/js")
 | 
				
			|||||||
        "public/js/clients/invoices/payment.js"
 | 
					        "public/js/clients/invoices/payment.js"
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
    .js(
 | 
					    .js(
 | 
				
			||||||
        "resources/js/clients/payments/sofort.js",
 | 
					        "resources/js/clients/payments/stripe-sofort.js",
 | 
				
			||||||
        "public/js/clients/payments/sofort.js"
 | 
					        "public/js/clients/payments/stripe-sofort.js"
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
    .js(
 | 
					    .js(
 | 
				
			||||||
        "resources/js/clients/payments/alipay.js",
 | 
					        "resources/js/clients/payments/alipay.js",
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user