refactor: outsource stripe key to environment

This commit is contained in:
Constantin Simonis 2025-02-13 10:38:32 +01:00
parent c4252c97e7
commit da01e272d7
No known key found for this signature in database
GPG key ID: 3878FF77C24AF4D2
2 changed files with 5 additions and 3 deletions

View file

@ -3,6 +3,7 @@ import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angula
import { loadStripe, Stripe } from '@stripe/stripe-js';
import { DepositService } from '../service/deposit.service';
import { debounceTime } from 'rxjs';
import { environment } from '../../environments/environment';
@Component({
selector: 'app-deposit',
@ -29,9 +30,7 @@ export class DepositComponent implements OnInit {
}
});
this.stripe = await loadStripe(
'pk_test_51QrePYIvCfqz7ANgMizBorPpVjJ8S6gcaL4yvcMQnVaKyReqcQ6jqaQEF7aDZbDu8rNVsTZrw8ABek4ToxQX7KZe00jpGh8naG'
);
this.stripe = await loadStripe(environment.STRIPE_KEY);
}
submit() {

View file

@ -0,0 +1,3 @@
export const environment = {
STRIPE_KEY: 'pk_test_51QrePYIvCfqz7ANgMizBorPpVjJ8S6gcaL4yvcMQnVaKyReqcQ6jqaQEF7aDZbDu8rNVsTZrw8ABek4ToxQX7KZe00jpGh8naG',
}