Charge 2 - Stripe form fields not showing I just had a fresh install of Charge 2 and my Craft version is Craft CMS 2.6.2989. However as long as I have {{craft.charge.setPaymentOptions()}} in my template, all my form fields disappear and show up again after I remove this line.

{% extends "_layout" %}
{% set title = "Bookings" | t %}

{% set entry = craft.entries.section('bookings').first %}

{% block content %}
    &lt;div class="[ grid ] island"&gt;
        &lt;div class="[ grid__item desk-seven-twelfths ]"&gt;
            {% if entry.heading | length %}
                &lt;h1 class="brand-color"&gt;{{ entry.heading }}&lt;/h1&gt;
            {% endif %}

            {% if entry.featureImage | length %}
                &lt;img src="{{ entry.featureImage.first.url('halfWidth') }}" alt="{{ entry.Title }}" class="push--bottom"&gt;
            {% endif %}

            {% if entry.introText | length %}
                &lt;div class="lede"&gt;{{ entry.introText }}&lt;/div&gt;
            {% endif %}

            {% if entry.body | length %}
                {% include '_partials/_body' %}
            {% endif %}
        &lt;/div&gt;

        &lt;div class="[ grid__item desk-one-third push--desk-one-twelfth ]"&gt;
            &lt;div class="island ui-background--light"&gt;
                &lt;h3 class="push-half--bottom text--center ui-color--dark"&gt;{{ "Make a Payment" | t }}&lt;/h3&gt;

                &lt;hr class="rule rule--double"&gt;

                &lt;form id="charge-form" method="post" data-publicKey="{{ craft.charge.publicKey }}"&gt;
                    {% set chargeOptions = {'planAmount' : 99} %}
                    {{craft.charge.setPaymentOptions(chargeOptions)}}
                    &lt;input type="hidden" name="action" value="charge/charge"/&gt;

                    &lt;label for="customerEmail"&gt;Receipt Email&lt;/label&gt;
                    &lt;input type="text" name="customerEmail" value="{{ currentUser ? currentUser.email }}" id="customerEmail"/&gt;

                    &lt;label for="cardNumber"&gt;Card Number&lt;/label&gt;
                    &lt;input type="text" data-stripe="number" placeholder="•••• •••• •••• ••••" id="cardNumber"/&gt;

                    &lt;label for="cardExpiry"&gt;Card Expiry&lt;/label&gt;
                    &lt;input type="text" data-stripe="exp" placeholder="mm / yy" id="cardExpiry"/&gt;

                    &lt;label for="cardCvc"&gt;Card CVC&lt;/label&gt;
                    &lt;input type="text" data-stripe="cvc" placeholder="123" id="cardCvc"/&gt;
                &lt;/form&gt; 

            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"&gt;&lt;/script&gt;
    {% includeJsResource('charge/js/jquery.charge.js') %}
    {% includeJsResource('charge/js/stripe_v2.min.js') %}
    {% includejs %}
        $(this).charge();
    {% endincludejs %}
{% endblock %}




I can't see what's wrong with my setup...
After looking into the source code of the encrypt function, the craft.charge.setPaymentOptions() function calls mcrypt_module_get_algo_key_size and because my vagrant box (ubuntu 14.04) didn't have php5-mcrypt installed, it failed there.

To fix it: run apt-get install php5-mcrypt &amp;&amp; sudo php5enmod mcrypt.