Coder Social home page Coder Social logo

Comments (5)

richnologies avatar richnologies commented on July 30, 2024

Hi, may I see your ts and html files to see whats going on?

from ngx-stripe.

picosam avatar picosam commented on July 30, 2024

Sure, here you go:

<form [formGroup]="formGroup" role="form" (ngSubmit)="buy()">
	<label>
		<span>Name</span>
		<input formControlName="name" class="field" />
	</label>
	<ngx-stripe-card [options]="cardOptions"></ngx-stripe-card>
</form>
import {Component, OnInit, ViewChild} from '@angular/core';
import {StripeService, StripeCardComponent} from 'ngx-stripe';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';

@Component({
	templateUrl: './book-bedroom.component.html',
	styleUrls: ['./book-bedroom.component.css']
})
export class BookBedroomComponent implements OnInit {

	formGroup: FormGroup;
	@ViewChild(StripeCardComponent) card: StripeCardComponent;

	cardOptions = {
		style: {
			base: {
				iconColor: '#666EE8',
				color: '#31325F',
				lineHeight: '40px',
				fontWeight: 300,
				fontFamily: 'Lato',
				fontSize: '18px',
				'::placeholder': {
					color: '#CFD7E0'
				}
			}
		}
	};

	constructor(private fb: FormBuilder, private stripeService: StripeService) {}

	ngOnInit() {
		this.formGroup = this.fb.group({
			name: ['Jane', Validators.required]
		});
	}

	buy() {
		const name = 'Jane';
		console.log('card');
		this.stripeService.createToken(this.card.getCard(), { name })
				.subscribe(token => {
					console.log('Token created correctly');
					console.log(token);
				}, error => { console.log(error); });
	}
}

from ngx-stripe.

richnologies avatar richnologies commented on July 30, 2024

I cannot reproduce the error on my laptop. I will give it a try tomorrow at the office on some Virtual machines and get back to you

from ngx-stripe.

picosam avatar picosam commented on July 30, 2024

I'll also do some more tests on different browsers tomorrow. For now, I can only claim this happens on Safari.

from ngx-stripe.

picosam avatar picosam commented on July 30, 2024

I believe this is really not occurring anymore; strange! Any news about the locale settings? Thanks!

from ngx-stripe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.