pago.component.ts
803 Bytes
import { Component, OnInit } from '@angular/core';
import { appSettings } from 'src/etc/AppSettings';
import { ProductoService } from 'src/app/services/producto.service';
import { RouterLink } from '@angular/router';
@Component({
selector: 'app-pago',
templateUrl: './pago.component.html',
styleUrls: ['./pago.component.scss']
})
export class PagoComponent implements OnInit {
private apiUrl: string = appSettings.apiUrl;
private verQR: boolean = false;
constructor(private productoService: ProductoService) { }
ngOnInit() {
}
pagar() {
this.verQR = true;
alert('Procesando Pago');
this.productoService.pagar()
.subscribe(() => {
alert('Compra finalizada');
}, err => {
console.log(err);
alert('algo salió mal');
})
}
}