             'pattern': '{{9999}}',
             'persistent': false
             }
+        ###
 
         cancelButton = (e) ->
             _helpers.removeModal()


                error = (response) ->
                    alert "error"

                Conekta.charge.create charge, success, error

            else 
                return


        document.querySelector("[data-conekta-card-submit]").addEventListener "click", makePayment, false


        return this

            for key in b 
              if b.hasOwnProperty key 
                a[key] = b[key]
            a

        getModal : ->
            document.querySelector ".c-modal"

        removeModal : ->
            #do some animations
            # obj = $(".c-modal")
            document.body.removeChild( _helpers.getModal() )
            return

        openModal : (params) ->
            _form = """
                <div class="c-modal">
                    <div class="c-modal-dialog">
                        <div class="c-modal-content ">
                            <div class="c-modal-header">
                                <h1>Pagar</h1>
                            </div>
                            <form>
                                <div class="c-modal-body">
                                    <div class="card">
                                        <div class="info">
                                            <div class="tag">Total: $ #{params.total}</div>
                                            <div class="brand-cards">
                                                <div class="logo-visa"></div>
                                                <div class="logo-mastercard"></div>
                                                <div class="logo-amex"></div>
                                            </div>
                                        </div>
                                        <div class="line">
                                            <div class="group number">
                                                <label>Numero de la Tarjeta</label>
                                                <input type="text" class="control" data-conekta-card-number placeholder="**** **** **** ****"/>
                                            </div>

                                            <div class="group date">
                                                <label>Fecha de Expiracion</label>
                                                <input type="text" class="control" data-conekta-card-date placeholder="MM / YY"/>
                                            </div>
                                        </div>

                                        <div class="line">
                                            <div class="group name">
                                                <label>Nombre en la Tarjeta</label>
                                                <input type="text" class="control" data-conekta-card-name placeholder="John Appleseed"/>
                                            </div>

                                            <div class="group cvc">
                                                <label>CVC</label>
                                                <input type="text" class="control" data-conekta-card-cvc placeholder="cvc"/>
                                            </div>
                                        </div>

                                    </div>
                                </div>
                                <div class="c-modal-footer">
                                    <div class="actions">
                                        <button type="button" class="control" id="cancel" data-conekta-card-cancel>Cancelar</button>
                                        <button type="button" class="control" id="paynow" data-conekta-card-submit>Pagar ahora</button>
                                    </div>
                                </div>
                            </form>
                            
                        </div>
                    </div>
                </div>
