Added stripe support

This commit is contained in:
itzMiney committed 2025-08-05 07:33:42 +02:00
1 parent f000688d4e
commit b4020ee40b
12 files changed
+313 -13

No files matched your search

@@ -0,0 +1,51 @@
import {AfterViewInit, Component, Inject, OnDestroy, OnInit, PLATFORM_ID} from '@angular/core';
import {isPlatformBrowser} from '@angular/common';
import {TranslatePipe} from '@ngx-translate/core';
import {VantaBackgroundService} from '../../shared/services/vanta-background.service';
import {DeviceDetectorService} from '../../shared/services/device-detector.service';
import {Title} from '@angular/platform-browser';
@Component({
selector: 'app-success',
imports: [
TranslatePipe
],
templateUrl: './success.component.html',
styleUrl: './success.component.css'
})
export class SuccessComponent implements OnInit, OnDestroy, AfterViewInit {
private readonly elementId = 'vanta-success-bg';
isMobile: boolean = false;
constructor(
private vantaService: VantaBackgroundService,
private deviceService: DeviceDetectorService,
private titleService: Title,
@Inject(PLATFORM_ID) private platformId: Object
) {}
ngOnInit() {
this.titleService.setTitle('Checkout | itzMiney');
this.isMobile = this.deviceService.isMobile;
if (isPlatformBrowser(this.platformId)) {
window.addEventListener('resize', this.onResize.bind(this));
}
}
ngAfterViewInit() {
this.vantaService.initVanta(this.elementId, {
color: 0x5b417a,
backgroundColor: 0x41e3c
});
}
ngOnDestroy() {
this.vantaService.destroyVanta(this.elementId);
if (isPlatformBrowser(this.platformId)) {
window.removeEventListener('resize', this.onResize);
}
}
onResize() {
this.vantaService.resizeVanta(this.elementId);
}
}