Remove Telepagos payment method from frontend
This commit is contained in:
@@ -130,7 +130,7 @@ export class CheckoutService extends BaseApiService {
|
|||||||
async generatePaymentIntent(
|
async generatePaymentIntent(
|
||||||
tenantCode: string,
|
tenantCode: string,
|
||||||
purchaseId: number,
|
purchaseId: number,
|
||||||
method: 'qr' | 'transfer' | 'telepagos',
|
method: 'qr' | 'transfer',
|
||||||
payerDni?: string,
|
payerDni?: string,
|
||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
const payload: any = { method };
|
const payload: any = { method };
|
||||||
|
|||||||
@@ -104,7 +104,6 @@ export class CheckoutPageComponent implements OnInit, OnDestroy {
|
|||||||
protected readonly paymentMethods: ReadonlyArray<PaymentMethodOption> = [
|
protected readonly paymentMethods: ReadonlyArray<PaymentMethodOption> = [
|
||||||
{ id: 'qr', label: 'QR' },
|
{ id: 'qr', label: 'QR' },
|
||||||
{ id: 'transfer', label: 'Transferencia' },
|
{ id: 'transfer', label: 'Transferencia' },
|
||||||
{ id: 'telepagos', label: 'TelePagos' },
|
|
||||||
];
|
];
|
||||||
protected readonly selectedPaymentMethod = signal<PaymentMethod>('qr');
|
protected readonly selectedPaymentMethod = signal<PaymentMethod>('qr');
|
||||||
protected readonly copiedTransferField = signal<TransferField | null>(null);
|
protected readonly copiedTransferField = signal<TransferField | null>(null);
|
||||||
@@ -345,7 +344,7 @@ export class CheckoutPageComponent implements OnInit, OnDestroy {
|
|||||||
const purchaseId = this.createdPurchaseId();
|
const purchaseId = this.createdPurchaseId();
|
||||||
const tenant = this.tenantService.tenant();
|
const tenant = this.tenantService.tenant();
|
||||||
|
|
||||||
if (!purchaseId || !tenant || method === 'telepagos') {
|
if (!purchaseId || !tenant) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { FormControl, FormGroup } from '@angular/forms';
|
import { FormControl, FormGroup } from '@angular/forms';
|
||||||
|
|
||||||
export type PaymentMethod = 'qr' | 'transfer' | 'telepagos';
|
export type PaymentMethod = 'qr' | 'transfer';
|
||||||
export type TransferField = 'cvu' | 'alias';
|
export type TransferField = 'cvu' | 'alias';
|
||||||
export type QrPaymentStatus = 'idle' | 'waiting' | 'timed_out' | 'failed';
|
export type QrPaymentStatus = 'idle' | 'waiting' | 'timed_out' | 'failed';
|
||||||
export type TransferValidationStatus = 'idle' | 'checking' | 'pending' | 'error';
|
export type TransferValidationStatus = 'idle' | 'checking' | 'pending' | 'error';
|
||||||
|
|||||||
@@ -18,14 +18,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<span class="payment-method__label">
|
<span class="payment-method__label">
|
||||||
@if (method.id === 'telepagos') {
|
|
||||||
<span class="telepagos-logo" aria-label="TelePagos">
|
|
||||||
<span class="telepagos-logo__tele">tele</span
|
|
||||||
><span class="telepagos-logo__pagos">pagos</span>
|
|
||||||
</span>
|
|
||||||
} @else {
|
|
||||||
{{ method.label }}
|
{{ method.label }}
|
||||||
}
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<i class="fa-solid fa-angle-right payment-method__chevron" aria-hidden="true"></i>
|
<i class="fa-solid fa-angle-right payment-method__chevron" aria-hidden="true"></i>
|
||||||
@@ -59,8 +52,6 @@
|
|||||||
(submitDni)="generateTransferIntent.emit($event)"
|
(submitDni)="generateTransferIntent.emit($event)"
|
||||||
(completePurchase)="complete.emit()"
|
(completePurchase)="complete.emit()"
|
||||||
/>
|
/>
|
||||||
} @else {
|
|
||||||
<app-checkout-payment-telepagos />
|
|
||||||
}
|
}
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -101,26 +101,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.telepagos-logo {
|
|
||||||
display: inline-block;
|
|
||||||
font-size: 1.45rem;
|
|
||||||
font-weight: 800;
|
|
||||||
line-height: 1;
|
|
||||||
letter-spacing: -0.03em;
|
|
||||||
background: linear-gradient(90deg, #0a69d8 0 78%, #f6a11a 78% 100%);
|
|
||||||
-webkit-background-clip: text;
|
|
||||||
background-clip: text;
|
|
||||||
color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.payment-panel {
|
.payment-panel {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|
||||||
> app-checkout-payment-qr,
|
> app-checkout-payment-qr,
|
||||||
> app-checkout-payment-transfer,
|
> app-checkout-payment-transfer {
|
||||||
> app-checkout-payment-telepagos {
|
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 320px;
|
max-width: 320px;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';
|
import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';
|
||||||
|
|
||||||
import { CheckoutPaymentQrComponent } from './components/checkout-payment-qr/checkout-payment-qr.component';
|
import { CheckoutPaymentQrComponent } from './components/checkout-payment-qr/checkout-payment-qr.component';
|
||||||
import { CheckoutPaymentTelepagosComponent } from './components/checkout-payment-telepagos/checkout-payment-telepagos.component';
|
|
||||||
import { CheckoutPaymentTransferComponent } from './components/checkout-payment-transfer/checkout-payment-transfer.component';
|
import { CheckoutPaymentTransferComponent } from './components/checkout-payment-transfer/checkout-payment-transfer.component';
|
||||||
import {
|
import {
|
||||||
PaymentMethod,
|
PaymentMethod,
|
||||||
@@ -15,7 +14,7 @@ import {
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'app-checkout-payment-step',
|
selector: 'app-checkout-payment-step',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [CheckoutPaymentQrComponent, CheckoutPaymentTelepagosComponent, CheckoutPaymentTransferComponent],
|
imports: [CheckoutPaymentQrComponent, CheckoutPaymentTransferComponent],
|
||||||
templateUrl: './checkout-payment-step.component.html',
|
templateUrl: './checkout-payment-step.component.html',
|
||||||
styleUrl: './checkout-payment-step.component.scss',
|
styleUrl: './checkout-payment-step.component.scss',
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush
|
changeDetection: ChangeDetectionStrategy.OnPush
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
<div class="payment-panel__card">
|
|
||||||
<h3 class="payment-panel__title">Descarga la app de TelePagos para finalizar la compra</h3>
|
|
||||||
<div class="payment-panel__divider"></div>
|
|
||||||
|
|
||||||
<div class="store-badges" aria-label="Tiendas disponibles">
|
|
||||||
<div class="store-badge">
|
|
||||||
<i class="fa-brands fa-google-play" aria-hidden="true"></i>
|
|
||||||
<span class="store-badge__text">
|
|
||||||
<small>Disponible en</small>
|
|
||||||
<strong>Google Play</strong>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="store-badge">
|
|
||||||
<i class="fa-brands fa-apple" aria-hidden="true"></i>
|
|
||||||
<span class="store-badge__text">
|
|
||||||
<small>Descargalo en</small>
|
|
||||||
<strong>App Store</strong>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
.payment-panel__card {
|
|
||||||
width: 100%;
|
|
||||||
max-width: 320px;
|
|
||||||
min-height: 269px;
|
|
||||||
padding: 1.5rem 1.75rem;
|
|
||||||
border-radius: 5px;
|
|
||||||
background: #ffffff;
|
|
||||||
color: #666666;
|
|
||||||
box-shadow: 0 0 0 1px #f1f1f1;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.payment-panel__title {
|
|
||||||
max-width: 18rem;
|
|
||||||
margin: 0;
|
|
||||||
color: #8a8a8a;
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 700;
|
|
||||||
line-height: 1.35;
|
|
||||||
}
|
|
||||||
|
|
||||||
.payment-panel__divider {
|
|
||||||
width: 100%;
|
|
||||||
max-width: 220px;
|
|
||||||
height: 1px;
|
|
||||||
margin: 1.2rem 0 1.45rem;
|
|
||||||
background: #dddddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.store-badges {
|
|
||||||
width: 100%;
|
|
||||||
max-width: 210px;
|
|
||||||
display: grid;
|
|
||||||
gap: 0.8rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.store-badge {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.75rem;
|
|
||||||
padding: 0.75rem 0.95rem;
|
|
||||||
border-radius: 0.85rem;
|
|
||||||
background: #111111;
|
|
||||||
color: #ffffff;
|
|
||||||
box-shadow: 0 10px 24px rgba(17, 17, 17, 0.16);
|
|
||||||
|
|
||||||
i {
|
|
||||||
font-size: 1.35rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__text {
|
|
||||||
display: grid;
|
|
||||||
text-align: left;
|
|
||||||
line-height: 1.1;
|
|
||||||
|
|
||||||
small {
|
|
||||||
font-size: 0.62rem;
|
|
||||||
letter-spacing: 0.05em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
opacity: 0.8;
|
|
||||||
}
|
|
||||||
|
|
||||||
strong {
|
|
||||||
font-size: 1rem;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-checkout-payment-telepagos',
|
|
||||||
standalone: true,
|
|
||||||
imports: [],
|
|
||||||
templateUrl: './checkout-payment-telepagos.component.html',
|
|
||||||
styleUrl: './checkout-payment-telepagos.component.scss',
|
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush
|
|
||||||
})
|
|
||||||
export class CheckoutPaymentTelepagosComponent {}
|
|
||||||
Reference in New Issue
Block a user