@if (!$plan->free && $stripe->status == 1)
    <script src="https://js.stripe.com/v3/"></script>
@endif
{!! library('/assets/js/frontend/payment.js') !!}
<script>
    document.addEventListener('DOMContentLoaded', async () => {
        @if (!$plan->free && $stripe->status == 1)
            /* Init Stripe gateway */
            stripeInit(
                "{{ $stripe['public'] }}", 
                [
                    "{{ __('lang.card_number') }}", 
                    "{{ __('lang.expiration') }}", 
                    "CCV"
                ]
            );
        @endif
    });
</script>