vk-payments 0.2.33 → 0.2.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/vk-payments.umd.js +38 -2
- package/bundles/vk-payments.umd.js.map +1 -1
- package/bundles/vk-payments.umd.min.js +1 -1
- package/bundles/vk-payments.umd.min.js.map +1 -1
- package/esm2015/lib/galicia/components/galicia.component.js +31 -3
- package/esm5/lib/galicia/components/galicia.component.js +39 -3
- package/fesm2015/vk-payments.js +30 -2
- package/fesm2015/vk-payments.js.map +1 -1
- package/fesm5/vk-payments.js +38 -2
- package/fesm5/vk-payments.js.map +1 -1
- package/lib/galicia/components/galicia.component.d.ts +5 -0
- package/package.json +1 -1
- package/vk-payments.metadata.json +1 -1
|
@@ -4312,6 +4312,7 @@
|
|
|
4312
4312
|
var GaliciaComponent = /** @class */ (function () {
|
|
4313
4313
|
function GaliciaComponent(galiciaApiService) {
|
|
4314
4314
|
this.galiciaApiService = galiciaApiService;
|
|
4315
|
+
this.discountRate = 0.10;
|
|
4315
4316
|
this.statusPay = new core.EventEmitter();
|
|
4316
4317
|
this.qrImage = '';
|
|
4317
4318
|
this.billNumber = '';
|
|
@@ -4365,6 +4366,32 @@
|
|
|
4365
4366
|
_this.startPaymentValidation();
|
|
4366
4367
|
}));
|
|
4367
4368
|
};
|
|
4369
|
+
Object.defineProperty(GaliciaComponent.prototype, "subtotalAmount", {
|
|
4370
|
+
get: /**
|
|
4371
|
+
* @return {?}
|
|
4372
|
+
*/
|
|
4373
|
+
function () {
|
|
4374
|
+
if (this.discountAmountValue !== undefined && this.discountAmountValue !== null) {
|
|
4375
|
+
return this.amount + this.discountAmountValue;
|
|
4376
|
+
}
|
|
4377
|
+
return this.amount ? Math.round(this.amount / (1 - this.discountRate)) : 0;
|
|
4378
|
+
},
|
|
4379
|
+
enumerable: true,
|
|
4380
|
+
configurable: true
|
|
4381
|
+
});
|
|
4382
|
+
Object.defineProperty(GaliciaComponent.prototype, "discountAmount", {
|
|
4383
|
+
get: /**
|
|
4384
|
+
* @return {?}
|
|
4385
|
+
*/
|
|
4386
|
+
function () {
|
|
4387
|
+
if (this.discountAmountValue !== undefined && this.discountAmountValue !== null) {
|
|
4388
|
+
return this.discountAmountValue;
|
|
4389
|
+
}
|
|
4390
|
+
return this.subtotalAmount - (this.amount || 0);
|
|
4391
|
+
},
|
|
4392
|
+
enumerable: true,
|
|
4393
|
+
configurable: true
|
|
4394
|
+
});
|
|
4368
4395
|
/**
|
|
4369
4396
|
* @return {?}
|
|
4370
4397
|
*/
|
|
@@ -4570,8 +4597,8 @@
|
|
|
4570
4597
|
GaliciaComponent.decorators = [
|
|
4571
4598
|
{ type: core.Component, args: [{
|
|
4572
4599
|
selector: 'lib-galicia',
|
|
4573
|
-
template: "<div class=\"gc-payment\">\n <div class=\"formRow\">\n <p>\n Escane\u00E1 el c\u00F3digo QR con tu aplicaci\u00F3n bancaria para realizar el pago.\n </p>\n </div>\n\n <div *ngIf=\"isGeneratingQr && !hasError\" class=\"loading-container\">\n <div class=\"spinner\"></div>\n <p>Generando c\u00F3digo QR...</p>\n </div>\n\n <div *ngIf=\"showQr\">\n <div class=\"qr-container\">\n <img [src]=\"qrImage\" alt=\"QR Galicia\" />\n </div>\n\n <div class=\"timer\">\n Tiempo restante: {{ minutes }}:{{ seconds < 10 ? '0' + seconds : seconds }} \n </div>\n </div>\n\n <div *ngIf=\"hasError\" class=\"payment-error\">\n <div class=\"error-icon\">\n \u26A0\n </div>\n\n <div class=\"error-message\">\n <h3>No fue posible generar el c\u00F3digo QR</h3>\n\n <p>{{ errorMessage }}</p>\n </div>\n </div>\n\n <div *ngIf=\"paymentCompleted\" class=\"payment-success\">\n <div class=\"success-icon\">\n \u2713\n </div>\n\n <div class=\"success-message\">\n <h3>Pago realizado correctamente</h3>\n\n <p>\n ID de pago Galicia: <strong>{{ paymentId }}</strong>\n </p>\n </div>\n </div>\n\n <div *ngIf=\"expired\">\n <div class=\"pay-message info\">\n El c\u00F3digo QR expir\u00F3.\n </div>\n\n <button type=\"button\" (click)=\"showQrAgain()\">\n Regenerar c\u00F3digo QR\n </button>\n\n </div>\n</div>",
|
|
4574
|
-
styles: [".gc-payment{display:flex;flex-direction:column;align-items:center;text-align:center}.formRow{width:100%;max-width:400px;margin-bottom:20px}.loading-container{text-align:center;padding:30px}.spinner{width:40px;height:40px;margin:0 auto 15px;border:4px solid #e0e0e0;border-top:4px solid #06c;border-radius:50%;-webkit-animation:1s linear infinite spin;animation:1s linear infinite spin}.qr-container{margin:20px 0}.qr-container img{max-width:300px;width:100%;height:auto}.timer{margin-top:10px;font-size:18px;font-weight:600}.payment-error{text-align:center;padding:30px;max-width:400px}.error-icon{width:80px;height:80px;margin:0 auto 15px;border-radius:50%;background:#fc2626;color:#fff;font-size:48px;font-weight:700;display:flex;align-items:center;justify-content:center}.error-message h3{color:#fc2626;margin-bottom:10px}.payment-success{text-align:center;padding:30px}.success-icon{width:80px;height:80px;margin:0 auto 15px;border-radius:50%;background:#28a745;color:#fff;font-size:48px;font-weight:700;display:flex;align-items:center;justify-content:center}.success-message h3{color:#28a745;margin-bottom:10px}@-webkit-keyframes spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}"]
|
|
4600
|
+
template: "<div class=\"gc-payment\">\n\n <div class=\"summary-box\">\n <div class=\"summary-row\">\n <span class=\"summary-label\">Subtotal</span>\n <span class=\"summary-value\">${{ subtotalAmount | number:'1.2-2' }}</span>\n </div>\n <div class=\"summary-row discount\">\n <span class=\"summary-label\">\n <i class=\"material-icons\">local_offer</i>\n Descuento ({{ discountRate * 100 | number:'1.0-0' }}%)\n </span>\n <span class=\"summary-value discount-value\">-${{ discountAmount | number:'1.2-2' }}</span>\n </div>\n <div class=\"summary-row total\">\n <span class=\"summary-label\">Total a abonar</span>\n <span class=\"summary-value total-value\">\n ${{ amount | number:'1.2-2' }} \n </span>\n </div>\n </div>\n\n <div class=\"formRow\">\n <p>\n Escane\u00E1 el c\u00F3digo QR con tu aplicaci\u00F3n bancaria para realizar el pago.\n </p>\n </div>\n\n <div *ngIf=\"isGeneratingQr && !hasError\" class=\"loading-container\">\n <div class=\"spinner\"></div>\n <p>Generando c\u00F3digo QR...</p>\n </div>\n\n <div *ngIf=\"showQr\">\n <div class=\"qr-container\">\n <img [src]=\"qrImage\" alt=\"QR Galicia\" />\n </div>\n\n <div class=\"timer\">\n Tiempo restante: {{ minutes }}:{{ seconds < 10 ? '0' + seconds : seconds }} \n </div>\n </div>\n\n <div *ngIf=\"hasError\" class=\"payment-error\">\n <div class=\"error-icon\">\n \u26A0\n </div>\n\n <div class=\"error-message\">\n <h3>No fue posible generar el c\u00F3digo QR</h3>\n\n <p>{{ errorMessage }}</p>\n </div>\n </div>\n\n <div *ngIf=\"paymentCompleted\" class=\"payment-success\">\n <div class=\"success-icon\">\n \u2713\n </div>\n\n <div class=\"success-message\">\n <h3>Pago realizado correctamente</h3>\n\n <p>\n ID de pago Galicia: <strong>{{ paymentId }}</strong>\n </p>\n </div>\n </div>\n\n <div *ngIf=\"expired\">\n <div class=\"pay-message info\">\n El c\u00F3digo QR expir\u00F3.\n </div>\n\n <button type=\"button\" (click)=\"showQrAgain()\">\n Regenerar c\u00F3digo QR\n </button>\n\n </div>\n</div>",
|
|
4601
|
+
styles: [".gc-payment{display:flex;flex-direction:column;align-items:center;text-align:center}.formRow{width:100%;max-width:400px;margin-bottom:20px}.loading-container{text-align:center;padding:30px}.spinner{width:40px;height:40px;margin:0 auto 15px;border:4px solid #e0e0e0;border-top:4px solid #06c;border-radius:50%;-webkit-animation:1s linear infinite spin;animation:1s linear infinite spin}.qr-container{margin:20px 0}.qr-container img{max-width:300px;width:100%;height:auto}.timer{margin-top:10px;font-size:18px;font-weight:600}.payment-error{text-align:center;padding:30px;max-width:400px}.error-icon{width:80px;height:80px;margin:0 auto 15px;border-radius:50%;background:#fc2626;color:#fff;font-size:48px;font-weight:700;display:flex;align-items:center;justify-content:center}.error-message h3{color:#fc2626;margin-bottom:10px}.payment-success{text-align:center;padding:30px}.success-icon{width:80px;height:80px;margin:0 auto 15px;border-radius:50%;background:#28a745;color:#fff;font-size:48px;font-weight:700;display:flex;align-items:center;justify-content:center}.success-message h3{color:#28a745;margin-bottom:10px}.summary-box{margin:20px 0;border:1px solid #e0e0e0;border-radius:8px;overflow:hidden;min-width:250px;max-width:400px}.summary-box .summary-row{display:flex;justify-content:space-between;align-items:center;padding:10px 16px;font-size:16px;background-color:#fff;border-bottom:1px solid #f0f0f0}.summary-box .summary-row:last-child{border-bottom:none}.summary-box .summary-row .summary-label{display:flex;align-items:center;gap:6px;color:#555}.summary-box .summary-row .summary-label i.material-icons{font-size:14px}.summary-box .summary-row .summary-value{font-weight:600;color:#1a1a1a;display:flex;align-items:center;margin-left:45px;gap:6px}.summary-box .summary-row.discount{background-color:#f0fdf4}.summary-box .summary-row.discount .summary-label{color:#16a34a;font-weight:500}.summary-box .summary-row.discount .summary-label i.material-icons{color:#16a34a}.summary-box .summary-row.discount .discount-value{color:#16a34a;font-weight:700}.summary-box .summary-row.total{background-color:#f8f9fa;border-top:2px solid #009ee3}.summary-box .summary-row.total .summary-label{font-size:17px;font-weight:700;color:#1a1a1a}.summary-box .summary-row.total .total-value{font-size:20px;font-weight:800;color:#009ee3}.summary-box .copy-amount-btn{background:0 0;border:1px solid #009ee3;border-radius:6px;cursor:pointer;padding:2px 6px;color:#009ee3;display:flex;align-items:center;width:auto;min-width:unset;margin-top:0;transition:background-color .2s}.summary-box .copy-amount-btn i.material-icons{font-size:16px}.summary-box .copy-amount-btn:hover{background-color:#e8f4fb}@-webkit-keyframes spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}"]
|
|
4575
4602
|
}] }
|
|
4576
4603
|
];
|
|
4577
4604
|
/** @nocollapse */
|
|
@@ -4588,6 +4615,9 @@
|
|
|
4588
4615
|
storeName: [{ type: core.Input }],
|
|
4589
4616
|
sessionId: [{ type: core.Input }],
|
|
4590
4617
|
checkoutId: [{ type: core.Input }],
|
|
4618
|
+
amount: [{ type: core.Input }],
|
|
4619
|
+
discountRate: [{ type: core.Input }],
|
|
4620
|
+
discountAmountValue: [{ type: core.Input }],
|
|
4591
4621
|
data: [{ type: core.Input }],
|
|
4592
4622
|
statusPay: [{ type: core.Output }]
|
|
4593
4623
|
};
|
|
@@ -4613,6 +4643,12 @@
|
|
|
4613
4643
|
/** @type {?} */
|
|
4614
4644
|
GaliciaComponent.prototype.checkoutId;
|
|
4615
4645
|
/** @type {?} */
|
|
4646
|
+
GaliciaComponent.prototype.amount;
|
|
4647
|
+
/** @type {?} */
|
|
4648
|
+
GaliciaComponent.prototype.discountRate;
|
|
4649
|
+
/** @type {?} */
|
|
4650
|
+
GaliciaComponent.prototype.discountAmountValue;
|
|
4651
|
+
/** @type {?} */
|
|
4616
4652
|
GaliciaComponent.prototype.data;
|
|
4617
4653
|
/** @type {?} */
|
|
4618
4654
|
GaliciaComponent.prototype.statusPay;
|