#unibit

1 messages · Page 1 of 1 (latest)

tacit spadeBOT
mellow forum
#

hello! can you explain more on what issues you're facing?

alpine surge
#

am using stripe elements in asp.net webform, everything is working apart from layout, i did exactly what stripe says about applying themes but none is working, can you assist?

mellow forum
#

can you share your code?

alpine surge
#

var stripe = Stripe("<%= stripePublishableKey %>");
var clientsecret = "<%= ClientSecret %>";

        var client_name = getParameterByName('cname');
        var client_mail = getParameterByName('email');
        var price = getParameterByName('price');

        const appearance = {
            theme: 'stripe'
        };
        
        var elements = stripe.elements(clientsecret, appearance);
        
        var CardElement = elements.create('card');

       

        CardElement.mount('#card-element');
tacit spadeBOT
tropic token
alpine surge
#

this does not work either, it mess up everything!!

#

do you provide a premade style or custom css?

tropic token
#

'does not work' how exactly?

tropic token
alpine surge
#

that means i need to style every element in form?

tropic token
#

Yes, you'd need to use the style object to style each Element

alpine surge
#

how will i find all elements in your form?

tropic token
#

I don't understand why you'd need to do that. You just pass the style param when you initialise the Element:

elements.create('card', {
  style: {...}
})
alpine surge
#

is there any reference to your form objects?

tropic token
#

You can just create a global style object that you can pass to each Element on creation

alpine surge
#

you dont have any premade style i could use ?

tropic token