Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vk-payments

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vk-payments - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

bundles/vk-payments.umd.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("@angular/router"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("vk-payments",["exports","@angular/core","@angular/common","@angular/forms","@angular/router","@angular/common/http"],t):t((e=e||self)["vk-payments"]={},e.ng.core,e.ng.common,e.ng.forms,e.ng.router,e.ng.common.http)}(this,function(e,t,r,n,a,i){"use strict";function s(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}var o=function(){function e(e){this.httpClient=e}return e.prototype.makePayment=function(e,t,r){return this._setAuthHeaders(t),this.httpClient.post(this.normalizeUrl(r)+"/Payment",e,{headers:this.authHeaders})},e.prototype.getMercadoPagoPromotions=function(e){return this.httpClient.get(e)},e.prototype.normalizeUrl=function(e){return e.length>0&&"/"==e.charAt(e.length-1)&&(e=e.substr(0,e.length-1)),e},e.prototype._setAuthHeaders=function(e){var t="Bearer "+e;this.authHeaders=new i.HttpHeaders({"Content-Type":"application/json",Authorization:t})},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:i.HttpClient}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(i.HttpClient))},token:e,providedIn:"root"}),e}();var d=function(){function e(e,r){this.router=e,this.mercadopagoApiService=r,this.paymentState="unsubmitted",this.tokenId="",this.disabled=!1,this.addScript=!1,this.requiredIssuer=!1,this.submitted=!1,this.paymentResult={success:!1,paymentId:"",integrator:"MP"},this.statusPay=new t.EventEmitter}return e.prototype.ngOnInit=function(){this.initMercadoPago()},e.prototype.ngOnChanges=function(e){e.paymentAmount.isFirstChange()||(this.disabled=!1,this.checkOutForm.reset())},e.prototype.initMercadoPago=function(){var e=this;this.addMercadopagoScript().then(function(){Mercadopago.setPublishableKey(e.publishableKey),Mercadopago.getIdentificationTypes(),e.totalAmount=e.paymentAmount,e.defaultName=e.payerName,e.defaultDocType="DNI"})},e.prototype.addMercadopagoScript=function(){return this.addScript=!0,new Promise(function(e,t){var r=document.createElement("script");r.src="https://secure.mlstatic.com/sdk/javascript/v1/mercadopago.js?2345",r.onload=e,document.body.appendChild(r)})},e.prototype.createToken=function(e){var t=this;this.paymentState="processing",Mercadopago.createToken(e,function(e,r){200!==e&&201!==e?(t.paymentState="error",t.statusPay.emit(t.paymentResult),t.errorMessage="Revisa los datos del formulario."):(t.tokenId=r.id,t.makePayment())})},e.prototype.makePayment=function(){var e=this;this.cardPayment={tokenId:this.tokenId,transactionAmount:this.totalAmount,description:this.description,installments:Number(this.checkOutForm.value.installments),issuerId:this.checkOutForm.value.issuer,paymentMethodId:this.currentPaymentMethod[0].id,codCP:this.idVen,docNumber:this.checkOutForm.value.docNumber,additionalData:this.data,storeId:this.storeId},this.mercadopagoApiService.makePayment(this.cardPayment,this.accessToken,this.vkUrlApi).subscribe(function(t){e.paymentResponseHandler(t)},function(t){e.statusPay.emit(e.paymentResult),e.paymentState="apiError",console.log(t)})},e.prototype.paymentResponseHandler=function(e){e.success?(this.paymentState=e.data.statusDetails,this.ticket=e.data.transactionId,this.paymentResult={success:!0,paymentId:this.ticket,integrator:"MP"},this.statusPay.emit(this.paymentResult),this.disabled=!0,this.logger("paymentResponseHandler:",e),this.successUrl&&this.successUrl.length>0&&this.router.navigate([""+this.successUrl])):(this.paymentState="apiError",this.statusPay.emit(this.paymentResult),this.successUrl&&this.failureUrl.length>0&&this.router.navigate([""+this.failureUrl]).then())},e.prototype.checkPaymentMethod=function(){if(null!=this.checkOutForm.value.cardNumber){if(this.currentInstallments=null,this.currentIssuers=null,this.checkOutForm.value.cardNumber.toString().length>=6){this.currentBin=this.checkOutForm.value.cardNumber.toString().substring(0,6);var e=this;Mercadopago.getPaymentMethod({bin:this.checkOutForm.value.cardNumber.toString()},function(t,r){200===t&&e.setCurrentMethod(r)})}this.checkOutForm.value.cardNumber.toString().length<6&&(this.requiredIssuer=!1)}},e.prototype.setCurrentMethod=function(e){if(e){this.logger("setCurrentMethod:",e),this.currentPaymentMethod=e,this.requiredIssuer=!0;var t=this;Mercadopago.getIssuers(e[0].id,function(e,r){200===e&&t.setIssuers(r)}),this.requiredIssuer||t.checkInstallments()}},e.prototype.checkInstallments=function(){if(!(null==this.currentBin||this.currentBin.length<6)){var e=this;e.currentInstallments=null,Mercadopago.getInstallments({bin:this.currentBin,amount:this.totalAmount},function(t,r){200===t?e.setInstallments(r):e.currentInstallments=null})}},e.prototype.setInstallments=function(e){var t=this;if(this.logger("setInstallments:",e),e.length>0)if(null!=this.issuerId&&e.length>1){var r=e.filter(function(e){return e.issuer.id===t.issuerId});this.currentInstallments=r[0].payer_costs,this.issuerId=r[0].issuer.id}else this.currentInstallments=e[0].payer_costs,this.issuerId=e[0].issuer.id},e.prototype.setIssuers=function(e){this.logger("setIssuers res",e),this.currentIssuers=e},e.prototype.onDuesSelection=function(e){var t,r,n,a;try{for(var i=s(this.currentInstallments),o=i.next();!o.done;o=i.next()){var d=o.value;if(d.installments===Number(e.value.installments)){this.totalFinancedAmount=d.total_amount;try{for(var c=(n=void 0,s(d.labels)),l=c.next();!l.done;l=c.next()){var p=l.value;p.includes("CFT")&&(this.recommendedLabel=p.replace(/_/g,": ").split("|",2),this.currentTEA=this.recommendedLabel[1],this.currentCFT=this.recommendedLabel[0])}}catch(e){n={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}},e.prototype.onSubmit=function(e){if(this.submitted=!0,this.paymentResult={success:!1,paymentId:"",integrator:"MP"},this.checkOutForm.valid){var t={cardNumber:this.cardText,securityCode:this.cvcText,cardExpirationMonth:this.monthText,cardExpirationYear:this.yearText,cardholderName:this.defaultName,docType:this.defaultDocType,docNumber:this.dniText};this.debugLog&&console.log("sendForm",t),""!==this.tokenId&&Mercadopago.clearSession(),this.createToken(t)}},e.prototype.onYearChange=function(){var e=this;isNaN(+this.yearText)&&setTimeout(function(){e.yearText=""})},e.prototype.onMonthLostFocus=function(){+this.monthText>0&&!isNaN(+this.monthText)&&"1"==this.monthText&&(this.monthText="01")},e.prototype.onMonthChange=function(){var e=this;if(+this.monthText>=0&&+this.monthText<13&&!isNaN(+this.monthText))switch(this.monthText){case"2":this.monthText="02";break;case"3":this.monthText="03";break;case"4":this.monthText="04";break;case"5":this.monthText="05";break;case"6":this.monthText="06";break;case"7":this.monthText="07";break;case"8":this.monthText="08";break;case"9":this.monthText="09"}else setTimeout(function(){e.monthText=""})},e.prototype.onCodeChange=function(){var e=this;isNaN(+this.cvcText)&&setTimeout(function(){e.cvcText=""})},e.prototype.onDniChange=function(){var e=this;isNaN(+this.dniText)&&setTimeout(function(){e.dniText=""})},e.prototype.onPayerNameChange=function(){var e=this;isNaN(+this.defaultName)||setTimeout(function(){e.defaultName=""})},e.prototype.onCardChange=function(){var e=this;isNaN(+this.cardText)&&setTimeout(function(){e.cardText=""})},e.prototype.onPaste=function(){return!1},e.prototype.logger=function(e,t){this.debugLog&&console.log(e,JSON.stringify(t))},e.decorators=[{type:t.Component,args:[{selector:"mp-form-pay",template:'<form (ngSubmit)="onSubmit(f)" class="mp-payment" #f="ngForm" autocomplete="off">\r\n \x3c!-- Titular --\x3e\r\n <div class="formRow">\r\n <label for="cardholderName">Nombre y Apellido</label>\r\n <span>\r\n <input id="cardholderName" type="text" name="cardholderName" required maxlength="22"\r\n data-checkout="cardholderName" [disabled]="disabled" (paste)="onPaste()" (input)="onPayerNameChange()"\r\n [(ngModel)]="defaultName" #cardholderName="ngModel" />\r\n </span>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!cardholderName.valid && submitted">\r\n Ingresá el nombre completo que figura en la tarjeta.\r\n </p>\r\n </div>\r\n\r\n \x3c!-- Numero de tarjeta --\x3e\r\n <div class="formRow">\r\n <label for="cardNumber">Nº de Tarjeta</label>\r\n <span>\r\n <input id="cardNumber" type="text" name="cardNumber" data-checkout="cardNumber" maxlength="19" required thumbnail\r\n [disabled]="disabled" (input)="onCardChange()" (keyup)="checkPaymentMethod()" (focusout)="checkInstallments()"\r\n (paste)="onPaste()" [(ngModel)]="cardText" #cardNumber="ngModel" />\r\n </span>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!cardNumber.valid && submitted">\r\n Ingresá el número de tarjeta.\r\n </p>\r\n </div>\r\n\r\n \x3c!-- Emisor--\x3e\r\n <div class="formRow">\r\n <label for="issuer">Emisor</label>\r\n <div class="select-icon">\r\n <select id="issuer" name="issuer" required [disabled]="!requiredIssuer || disabled" [(ngModel)]="issuerId"\r\n #issuer="ngModel">\r\n <option *ngFor="let iss of currentIssuers" value="{{ iss.id }}">\r\n {{ iss.name }}\r\n </option>\r\n </select>\r\n </div>\r\n <p class="alert-text" *ngIf="!issuer.valid && requiredIssuer && submitted">Seleccioná el emisor de la tarjeta.</p>\r\n </div>\r\n\r\n <div class="form-row-3col">\r\n \x3c!-- Expiry-month--\x3e\r\n <div class="formRow">\r\n <label for="cardExpirationMonth">Mes</label>\r\n <span>\r\n <input id="cardExpirationMonth" type="text" name="cardExpirationMonth" placeholder="MM" minlength="2"\r\n maxlength="2" data-checkout="cardExpirationMonth" required [disabled]="disabled" (paste)="onPaste()"\r\n (input)="onMonthChange()" (focusout)="onMonthLostFocus()" [(ngModel)]="monthText"\r\n #cardExpirationMonth="ngModel" />\r\n </span>\r\n </div>\r\n\r\n \x3c!-- Expiry-year--\x3e\r\n <div class="formRow">\r\n <label for="cardExpirationYear">Año</label>\r\n <span>\r\n <input id="cardExpirationYear" type="text" name="cardExpirationYear" placeholder="AAAA" minlength="4"\r\n maxlength="4" data-checkout="cardExpirationYear" required [disabled]="disabled" (paste)="onPaste()"\r\n (input)="onYearChange()" [(ngModel)]="yearText" #cardExpirationYear="ngModel" />\r\n </span>\r\n </div>\r\n\r\n \x3c!-- CVC --\x3e\r\n <div class="formRow">\r\n <label for="securityCode">CVC</label>\r\n <span>\r\n <input id="securityCode" type="text" name="securityCode" placeholder="CVC" minlength="3" maxlength="4"\r\n data-checkout="securityCode" required [disabled]="disabled" (paste)="onPaste()" (input)="onCodeChange()"\r\n [(ngModel)]="cvcText" #securityCode="ngModel" />\r\n </span>\r\n </div>\r\n </div>\r\n <div>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!cardExpirationMonth.valid && submitted">\r\n Completá el mes de vencimiento.\r\n </p>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!cardExpirationYear.valid && submitted">\r\n Completá el año de vencimiento.\r\n </p>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!securityCode.valid && submitted">\r\n Ingresá el código de seguridad.\r\n </p>\r\n </div>\r\n\r\n <div class="formRow">\r\n <div class="form-row-2col">\r\n\r\n \x3c!-- Tipo de documento--\x3e\r\n <div class="formRow">\r\n <label for="docType">Tipo de Doc.</label>\r\n <div class="select-icon">\r\n <select id="docType" name="docType" data-checkout="docType" required ngModel [disabled]="disabled"\r\n [(ngModel)]="defaultDocType" #docType="ngModel">\r\n </select>\r\n </div>\r\n </div>\r\n\r\n \x3c!-- DNI --\x3e\r\n <div class="formRow">\r\n <label for="docNumber">Nº de Doc.</label>\r\n <span>\r\n <input id="docNumber" type="text" name="docNumber" data-checkout="docNumber" minlength="7" maxlength="8"\r\n required [disabled]="disabled" (paste)="onPaste()" (input)="onDniChange()" [(ngModel)]="dniText"\r\n #docNumber="ngModel" />\r\n </span>\r\n </div>\r\n\r\n </div>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!docNumber.valid && submitted">\r\n Completá el número de documento.\r\n </p>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!docType.valid && submitted">\r\n Seleccioná el tipo de documento.\r\n </p>\r\n </div>\r\n\r\n \x3c!--Cantidad de cuotas--\x3e\r\n <div class="formRow">\r\n <label for="installments">Cantidad de Cuotas</label>\r\n <div class="select-icon">\r\n <select id="installments" name="installments" aria-required="true" aria-invalid="false" required ngModel\r\n [disabled]="disabled" (change)="onDuesSelection(f)" #installments="ngModel">\r\n <option *ngFor="let current of currentInstallments " value="{{ current.installments }}">\r\n {{ current.recommended_message }}\r\n </option>\r\n </select>\r\n </div>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!installments.valid && submitted">\r\n Elegí la cantidad de cuotas.\r\n </p>\r\n </div>\r\n\r\n <div>\r\n <div>\r\n <div class="amount-resume" *ngIf="f.valid">\r\n <p>Total al contado</p>\r\n <h1>$ {{ totalAmount | number:\'2.2-2\' }}</h1>\r\n <p>Total financiado</p>\r\n <h3>$ {{ totalFinancedAmount | number:\'2.2-2\' }}</h3>\r\n <p>{{ currentTEA }}</p>\r\n <p>{{ currentCFT }}</p>\r\n <div *ngIf="paymentState === \'unsubmitted\'\r\n || paymentState.substring(0, 11) === \'cc_rejected\'\r\n || paymentState === \'error\'">\r\n <button type="submit" (click)="onSubmit(f)">\r\n Pagar $ {{ totalFinancedAmount | number:\'2.2-2\' }}\r\n </button>\r\n </div>\r\n </div>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!f.valid">Completá los campos faltantes.</p>\r\n <div *ngIf="!f.valid">\r\n <div *ngIf="paymentState !== \'accredited\' &&\r\n paymentState !== \'pending_contingency\' &&\r\n paymentState !== \'pending_review_manual\'">\r\n <button type="submit" (click)="onSubmit(f)">\r\n Pagar $ {{ paymentAmount | number:\'2.2-2\' }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</form>\r\n\r\n<div class="logo">\r\n <img [src]="imgMercadoPago" alt="Mercado Pago" class="responsive-img" style="width: 150px;">\r\n</div>\r\n\r\n\x3c!--IFs--\x3e\r\n<div>\r\n <div class="pay-message info" *ngIf="paymentState === \'processing\'">\r\n <i class="material-icons">info</i>\r\n <p>\r\n Procesando pago...\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message success" *ngIf="paymentState === \'accredited\'">\r\n <i class="material-icons">check_circle</i>\r\n <p>\r\n Tu pago se ha confirmado!\r\n <br>\r\n Estos son los datos de la transacción:\r\n </p>\r\n <i class="data">Ticket: {{ ticket }}</i>\r\n </div>\r\n\r\n <div class="pay-message info" *ngIf="paymentState === \'pending_contingency\'">\r\n <i class="material-icons">info</i>\r\n <p>\r\n Estamos procesando el pago.\r\n <br>\r\n En menos de una hora te enviaremos por e-mail el resultado.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message info" *ngIf="paymentState === \'pending_review_manual\'">\r\n <i class="material-icons">info</i>\r\n <p>\r\n Estamos procesando el pago.\r\n <br>\r\n En menos de 2 días hábiles te diremos por e-mail si se acreditó o si necesitamos más información.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_bad_filled_card_number\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n Revisa el número de tarjeta.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_bad_filled_date\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n Revisa la fecha de vencimiento.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_bad_filled_other\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n Revisa los datos ingresados.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_bad_filled_security_code\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n Revisa el código de seguridad.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_blacklist\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n No pudimos procesar tu pago.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_call_for_authorize\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n Debes autorizar el pago. El teléfono está al dorso de tu tarjeta.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_card_disabled\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n Llama para activar tu tarjeta. El teléfono está al dorso de tu tarjeta.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_card_error\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n No pudimos procesar tu pago.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_duplicated_payment\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado, ya hiciste un pago por ese valor.\r\n <br>\r\n Si necesitas volver a pagar usa otra tarjeta u otro medio de pago..\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_high_risk\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n Tu pago fue rechazado.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_insufficient_amount\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_invalid_installments\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n No se pudo pocesar el pago en esa cantidad de cuotas.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_max_attempts\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado! Límite de intentos permitidos.\r\n <br>\r\n Elige otra tarjeta u otro medio de pago.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_other_reason\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n No se procesó el pago.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'error\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n {{ errorMessage }}\r\n <br>No se procesó el pago.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'apiError\'">\r\n <i class="material-icons">error</i>\r\n <p>Error al procesar el pago (Vitnik).</p>\r\n </div>\r\n</div>\r\n',styles:['@charset "UTF-8";.mp-payment{background-color:transparent;font-family:inherit,sans-serif}.mp-payment label{font-size:14px;color:#888}.formRow{margin-top:10px}:focus{outline:0}.form-row-2col{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-top:10px}.form-row-2col .formRow{width:49%;margin-top:0}.form-row-3col{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-top:10px}.form-row-3col .formRow{width:32%;margin-top:0}span{background-color:#fff;border:.5px solid #707070;border-radius:2px;padding:2px 10px;display:block;margin-top:4px}input[type=password],input[type=text]{background:0 0;border:none;color:#000;font-size:15px;height:23px;width:100%;text-transform:uppercase;vertical-align:top}select{width:100%;font-size:15px;height:30px;padding:2px 10px;border:.5px solid #707070;border-radius:2px;display:block;margin-top:4px;-webkit-appearance:none;-moz-appearance:none;position:relative;z-index:1;background:0 0}.select-icon{position:relative}.select-icon::after{content:"";font-family:"Material Icons";position:absolute;right:0;top:3px;font-size:24px}.icon-select{width:24px;position:absolute;right:13px}.alert-text{font-size:13px;color:#009ee3;margin-top:7px;margin-bottom:0}.warn-text{font-size:15px;color:#c62626;margin:10px 0;text-align:center}.confirm-text{font-size:15px;color:#388a22;margin:10px 0;text-align:center}.in-progress-text{font-size:15px;color:#009ee3;margin:10px 0;text-align:center}button{background-color:#009ee3;color:#fff;font-size:18px;text-align:center;padding:10px 0;width:100%;border:none;border-radius:20px;margin-top:20px;cursor:pointer}button:disabled{background-color:#525252}.amount-resume h1,.amount-resume h3{margin-top:0;margin-bottom:10px}.amount-resume p{font-size:13px;color:#525252;margin:5px 0;text-transform:uppercase}.pay-message{margin-top:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px}.pay-message p{font-size:1.1rem;text-align:center;line-height:130%;margin-bottom:10px}.pay-message i.data{font-size:.9rem;text-align:center}.pay-message i.material-icons{font-size:2rem;margin-bottom:5px}.success{background-color:#dff2bf;color:#4f8a10}.error{color:#d8000c;background-color:#ffd2d2}.info{color:#00529b;background-color:#bde5f8}.logo{display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-end;padding-top:10px}.responsive-img{width:100%;height:auto}']}]}],e.ctorParameters=function(){return[{type:a.Router},{type:o}]},e.propDecorators={paymentAmount:[{type:t.Input}],payerName:[{type:t.Input}],payerEmail:[{type:t.Input}],accessToken:[{type:t.Input}],vkUrlApi:[{type:t.Input}],description:[{type:t.Input}],publishableKey:[{type:t.Input}],successUrl:[{type:t.Input}],failureUrl:[{type:t.Input}],imgCreditCards:[{type:t.Input}],imgMercadoPago:[{type:t.Input}],iconExpandMore:[{type:t.Input}],debugLog:[{type:t.Input}],storeId:[{type:t.Input}],idVen:[{type:t.Input}],data:[{type:t.Input}],statusPay:[{type:t.Output}],checkOutForm:[{type:t.ViewChild,args:["f",{static:!1}]}]},e}();var c=function(){function e(e){this.mercadoPagoService=e}return e.prototype.ngOnInit=function(){var e=this;this.mercadoPagoService.getMercadoPagoPromotions(this.url).subscribe(function(t){return e.cardPromotions=t})},e.decorators=[{type:t.Component,args:[{selector:"mp-promotion",template:'<div *ngIf="contentSource === \'api\'" class="payments summary">\r\n <div id="promoBancos" class="promoBancos">\r\n\r\n <div *ngFor="let promo of cardPromotions | slice:2" name="promociones" class="bank-block col-md-4 col-sm-4">\r\n <div class="banklogoContainer">\r\n <img class="img-regular img-responsive" [src]="promo.payment_methods[0].secure_thumbnail">\r\n </div>\r\n <p>\r\n <span class="issuer">{{promo.issuer.name}}</span>\r\n </p>\r\n <p>\r\n <span class="installments">{{promo.max_installments}} cuotas sin interés</span>\r\n </p>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<iframe src="https://www.mercadopago.com.ar/cuotas?iframe=true"\r\n width="100%"\r\n height="450px"\r\n scrolling="yes"\r\n frameborder="0"\r\n style="position: relative;"\r\n *ngIf="contentSource === \'iframe\'">\r\n</iframe>\r\n',styles:[""]}]}],e.ctorParameters=function(){return[{type:o}]},e.propDecorators={url:[{type:t.Input}],contentSource:[{type:t.Input}]},e}();var l=[d,c],p=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:l,exports:l,imports:[r.CommonModule,n.FormsModule,n.ReactiveFormsModule,a.RouterModule]}]}],e}(),u=function(){function e(){this.addScript=!1,this.showError=!1,this.loading=!0,this.status="",this.linkToPay="",this.linkExecutePay=""}return e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewChecked=function(){var e=this;this.addScript||this.addPaypalScript().then(function(){var t={style:{color:"blue",shape:"pill",label:"pay",height:40},commit:!0,createOrder:function(e,t){return t.order.create({purchase_units:[{amount:{value:document.getElementById("amount").value},reference_id:"'"+document.getElementById("transactionId").value+"'",custom_id:"'"+document.getElementById("storeId").value+"'"}],application_context:{shipping_preference:"NO_SHIPPING"}})},onApprove:function(e,t){return t.order.capture().then(function(e){e.data=document.getElementById("data").value,e.userid=document.getElementById("userId").value,fetch(document.getElementById("vkUrlApi").value,{method:"post",headers:{"content-type":"application/json",Authorization:"Bearer "+document.getElementById("accessToken").value},body:JSON.stringify({details:e})}).then(function(e){console.log("response-> api",e)}).then(function(){window.location.href=document.getElementById("successUrl").value})})},onError:function(e){window.location.reload()},onCancel:function(e,t){window.location.href=document.getElementById("cancelUrl").value}};paypal.Buttons(t).render("#paypal-button-container"),e.loading=!1})},e.prototype.addPaypalScript=function(){var e=this;return this.addScript=!0,new Promise(function(t,r){var n=document.createElement("script");n.src="https://www.paypal.com/sdk/js?client-id="+e.clientId+"&currency="+e.currency,n.onload=t,document.body.appendChild(n)})},e.decorators=[{type:t.Component,args:[{selector:"paypal-new-form-pay",template:'<div *ngIf="loading">Loading...</div>\r\n<input type="hidden" id="amount" [(ngModel)]="amount">\r\n<input type="hidden" id="userId" [(ngModel)]="userId">\r\n<input type="hidden" id="storeId" [(ngModel)]="storeId">\r\n<input type="hidden" id="successUrl" [(ngModel)]="successUrl">\r\n<input type="hidden" id="cancelUrl" [(ngModel)]="cancelUrl">\r\n<input type="hidden" id="vkUrlApi" [(ngModel)]="vkUrlApi">\r\n<input type="hidden" id="transactionId" [(ngModel)]="transactionId">\r\n<input type="hidden" id="data" [(ngModel)]="data">\r\n<input type="hidden" id="accessToken" [(ngModel)]="accessToken">\r\n<div id="paypal-button-container"></div>\r\n',styles:["label{font-size:11px;color:#888;text-transform:uppercase;font-weight:500}.flex-row-wrap{display:flex;flex-flow:row wrap;flex-direction:row;justify-content:space-between;align-items:center}.flex-row-wrap div{margin:10px;width:200px;flex-grow:1}:focus{outline:0}.formRow{margin-top:10px;margin-bottom:10px}.formRow span{background-color:#fff;border:.5px solid #707070;border-radius:5px;padding:5px 10px;display:block;margin-top:7px}input[type=password],input[type=text]{background:0 0;border:none;color:#000;font-size:13px;height:23px;width:100%;text-transform:uppercase}select{width:100%;font-size:13px;height:36px;padding:5px 10px;background-color:#fff;border:.5px solid #707070;border-radius:5px;display:block;margin-top:7px}.icon-select{width:24px;position:absolute;right:13px}.alert-text{font-size:13px;color:#009ee3;margin-top:7px;margin-bottom:0}.warn-text{font-size:15px;color:#c62626;margin:10px 0;text-align:center}.confirm-text{font-size:15px;color:#8cd876;margin:10px 0;text-align:center}.in-progress-text{font-size:15px;color:#009ee3;margin:10px 0;text-align:center}button{background-color:#009ee3;color:#fff;font-size:18px;text-align:center;padding:10px 0;width:100%;border:none;border-radius:20px;margin-top:20px;cursor:pointer}button:disabled{background-color:#525252}.amount-resume h1,.amount-resume h3{margin-top:0;margin-bottom:10px}.amount-resume p{font-size:13px;color:#525252;margin:5px 0;text-transform:uppercase}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={accessToken:[{type:t.Input}],clientId:[{type:t.Input}],vkUrlApi:[{type:t.Input}],storeId:[{type:t.Input}],userId:[{type:t.Input}],transactionId:[{type:t.Input}],amount:[{type:t.Input}],currency:[{type:t.Input}],cancelUrl:[{type:t.Input}],successUrl:[{type:t.Input}],data:[{type:t.Input}],urlSignout:[{type:t.Input}]},e}();var m=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,n.FormsModule,i.HttpClientModule,a.RouterModule],declarations:[u],exports:[u]}]}],e}(),g=function(){function e(e){this.httpClient=e}return e.prototype.makePayment=function(e,t,r){return this._setAuthHeaders(t),this.httpClient.post(this.normalizeUrl(r)+"/Payment",e,{headers:this.authHeaders})},e.prototype.normalizeUrl=function(e){return e.length>0&&"/"==e.charAt(e.length-1)&&(e=e.substr(0,e.length-1)),e},e.prototype.getCreditCards=function(e,t){return this._setAuthHeaders(e),this.httpClient.get(this.normalizeUrl(t)+"/GetCreditCardsEnable",{headers:this.authHeaders})},e.prototype.getPlansByCreditCardId=function(e,t,r,n){this._setAuthHeaders(e);var a={amount:r,creditCardId:n};return this.httpClient.post(this.normalizeUrl(t)+"/CalculateAmountInInstallments",a,{headers:this.authHeaders})},e.prototype._setAuthHeaders=function(e){var t="Bearer "+e;this.authHeaders=new i.HttpHeaders({"Content-Type":"application/json",Authorization:t})},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:i.HttpClient}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(i.HttpClient))},token:e,providedIn:"root"}),e}();var h=function(){function e(e,r){this.router=e,this.spsDecidirApiService=r,this.language="es",this.statusPay=new t.EventEmitter,this.disabled=!1,this.selectCreditCardPlan=null,this.paymentResult={success:!1,paymentId:"",integrator:"DECIDIR"},this.submitPressed=!1,this.invalidDate=!1,this.addScript=!0,this.paymentState="unsubmitted",this.issuer=null}return e.prototype.ngOnInit=function(){this.initDecidir()},e.prototype.ngOnChanges=function(e){e.paymentAmount.isFirstChange()||(this.checkOutForm.reset(),this.disabled=!1)},e.prototype.initDecidir=function(){var e=this;this.addDecidirScript().then(function(){e.getCreditCards(),e.initializeSpsDecidir()})},e.prototype.addDecidirScript=function(){return this.addScript=!0,new Promise(function(e){var t=document.createElement("script");t.src="https://live.decidir.com/static/v2.4/decidir.js",t.onload=e,document.body.appendChild(t)})},e.prototype.getCreditCards=function(){var e=this;this.spsDecidirApiService.getCreditCards(this.accessToken,this.vkUrlApi).subscribe(function(t){e.creditCards=t.data,e.logger("getCreditCards",e.creditCards)},function(t){return e.paymentState="apiError"})},e.prototype.getPlansByCreditCardId=function(e,t){var r=this;this.spsDecidirApiService.getPlansByCreditCardId(this.accessToken,this.vkUrlApi,e,t).subscribe(function(e){r.creditCardPlans=e.data,r.logger("getPlansByCreditCardId",r.creditCardPlans)},function(e){return r.paymentState="apiError"})},e.prototype.initializeSpsDecidir=function(){this.decidir=new Decidir(this.spsDecidirApiService.normalizeUrl(this.spsUrlApi),!this.useCybersource),this.decidir.setTimeout(15e3),this.decidir.setPublishableKey(this.publishableKey)},e.prototype.logger=function(e,t){this.debugLog&&console.log(e,t)},e.prototype.selectedCreditCard=function(){this.issuer&&(this.selectCreditCardPlan=null,"ARS"!==this.currency?"USD"===this.currency&&(this.totalAmount=this.totalFinancedAmount=this.paymentAmount):this.getPlansByCreditCardId(this.paymentAmount,this.issuer))},e.prototype.selectedCreditCardPlan=function(){null!==this.selectCreditCardPlan&&(this.totalFinancedAmount=this.selectCreditCardPlan.totalAmount,this.totalAmount=this.paymentAmount,this.currentTEA=this.selectCreditCardPlan.tna,this.currentCFT=this.selectCreditCardPlan.cft)},e.prototype.onSubmit=function(e){var t=this;if(e.preventDefault(),this.submitPressed=!0,this.paymentResult={success:!1,paymentId:"",integrator:"DECIDIR"},this.checkOutForm.valid){this.paymentState="processing";var r=document.querySelector("#formulario");this.decidir.createToken(r,function(e,n){200!==e&&201!==e?(t.paymentState="error",t.statusPay.emit(t.paymentResult),t.processErrorToken(n)):t.makePayment(r,n)})}},e.prototype.makePayment=function(e,t){var r=this;this.logger("makePayment:",JSON.stringify(t)),this.payment={token:t.id,amount:this.totalAmount,totalFinancedAmount:this.totalFinancedAmount,bin:t.bin,currency:"ARS",documentNumber:"USD"===this.currency?"0":t.cardholder.identification.number,idVen:this.idVen,paymentType:"single",installments:"USD"===this.currency?1:this.selectCreditCardPlan.installments,creditCardPlanId:"USD"===this.currency?0:this.selectCreditCardPlan.id,paymentMethodId:this.issuer,cardholder:this.payerNameText,storeId:this.storeId,data:this.data,subPayments:[]},this.logger("payment:",JSON.stringify(this.payment)),this.spsDecidirApiService.makePayment(this.payment,this.accessToken,this.vkUrlApi).subscribe(function(e){r.paymentResponseHandler(e)},function(e){r.statusPay.emit(r.paymentResult),r.paymentState="apiError",console.error(e)})},e.prototype.paymentResponseHandler=function(e){if(this.logger("paymentResponseHandler:",JSON.stringify(e)),e.success){if(this.paymentState="success",this.paymentSuccessInfo=e.data,this.paymentResult={success:!0,paymentId:this.paymentSuccessInfo.payment_id,integrator:"DECIDIR"},this.statusPay.emit(this.paymentResult),this.disabled=!0,this.successUrl&&this.successUrl.length>0)return void this.router.navigate([""+this.successUrl]).then()}else if(this.paymentState="error",this.statusPay.emit(this.paymentResult),this.processErrorMessage(e.data),this.failureUrl&&this.failureUrl.length>0)return void this.router.navigate([""+this.failureUrl]).then()},e.prototype.processErrorToken=function(e){var t=this,r=e;r.error.forEach(function(e){"invalid_expiry_date"===e.error.type?t.errorMessage="Revisá la fecha de vencimiento.":t.errorMessage=JSON.stringify(r)})},e.prototype.processErrorMessage=function(e){if(e.error)switch(e.error.type){case"invalid_card":this.errorMessage="Tarjeta invalida";break;case"request_authorization_card":this.errorMessage="Pedir autorización";break;default:this.errorMessage=JSON.stringify(e.error.reason)}if(e.error_type)switch(e.error_type){case"invalid_request_error":if(e.validation_errors.length>0&&"invalid_param"===e.validation_errors[0].code)switch(e.validation_errors[0].param){case"card_number":case"bin":this.errorMessage="Tarjeta inválida";break;default:this.errorMessage=JSON.stringify(e)}break;case"not_found_error":this.errorMessage="Datos no encontrados (404).";break;case"authentication_error":this.errorMessage="Error (401).";break;case"malformed_request_error":this.errorMessage="Error al enviar los datos (400).";break;case"api_error":this.errorMessage="Error interno (409).";break;default:this.errorMessage=JSON.stringify(e)}},e.prototype.compareDate=function(e,t,r){var n=new Date(e,t,r),a=new Date;return n.getTime()===a.getTime()?0:n>a?1:n<a?-1:void 0},e.prototype.onYearChange=function(){var e=this;Number.isNaN(+this.yearText)&&setTimeout(function(){e.yearText=""})},e.prototype.onYearBlur=function(e){var t=this;this.compareDate(Number("20"+this.yearText),Number(this.monthText),(new Date).getDate())<0?setTimeout(function(){t.yearText="",t.invalidDate=!0,e.target.focus()}):this.invalidDate=!1},e.prototype.onMonthLostFocus=function(){+this.monthText>0&&!isNaN(+this.monthText)&&"1"===this.monthText&&(this.monthText="01")},e.prototype.onMonthChange=function(){var e=this;if(+this.monthText>=0&&+this.monthText<13&&!isNaN(+this.monthText))switch(this.monthText){case"2":this.monthText="02";break;case"3":this.monthText="03";break;case"4":this.monthText="04";break;case"5":this.monthText="05";break;case"6":this.monthText="06";break;case"7":this.monthText="07";break;case"8":this.monthText="08";break;case"9":this.monthText="09"}else setTimeout(function(){e.monthText=""})},e.prototype.onCodeChange=function(){var e=this;Number.isNaN(+this.cvcText)&&setTimeout(function(){e.cvcText=""}),this.cvcText.search(" ")>-1&&setTimeout(function(){e.cvcText=""})},e.prototype.onDniChange=function(){var e=this;Number.isNaN(+this.dniText)&&setTimeout(function(){e.dniText=""}),this.dniText.search(" ")>-1&&setTimeout(function(){e.dniText=""})},e.prototype.onPayerNameChange=function(){var e=this;isNaN(+this.payerNameText)||setTimeout(function(){e.payerNameText=""})},e.prototype.onCardChange=function(){var e=this;Number.isNaN(+this.cardText)&&setTimeout(function(){e.cardText=""}),this.cardText.search(" ")>-1&&setTimeout(function(){e.cardText=""}),this.setCreditType(this.cardText)},e.prototype.setCreditType=function(e){e.length<6?this.issuer=null:6===e.length&&(this.issuer=null,"4770"===e.substring(0,4)||"442548"===e.substring(0,6)||"406809"===e.substring(0,6)||"408738"===e.substring(0,6)||"411521"===e.substring(0,6)||"411663"===e.substring(0,6)||"426359"===e.substring(0,6)||"429780"===e.substring(0,6)||"438267"===e.substring(0,6)||"461187"===e.substring(0,6)||"500334"===e.substring(0,6)||"509413"===e.substring(0,6)||"512285"===e.substring(0,6)||"512881"===e.substring(0,6)||"518635"===e.substring(0,6)||"538449"===e.substring(0,6)||"550553"===e.substring(0,6)||"566057"===e.substring(0,6)||"567933"===e.substring(0,6)||"572140"===e.substring(0,6)||"584257"===e.substring(0,6)||"598718"===e.substring(0,6)||"605801"===e.substring(0,6)||"606120"===e.substring(0,6)||"631057"===e.substring(0,6)||"676215"===e.substring(0,6)||"713274"===e.substring(0,6)||"713284"===e.substring(0,6)||"717515"===e.substring(0,6)||"748761"===e.substring(0,6)||"753371"===e.substring(0,6)||"753600"===e.substring(0,6)||"912394"===e.substring(0,6)||"916148"===e.substring(0,6)||"916773"===e.substring(0,6)||"923405"===e.substring(0,6)||"930965"===e.substring(0,6)||"934091"===e.substring(0,6)||"935761"===e.substring(0,6)||"943313"===e.substring(0,6)||"945721"===e.substring(0,6)||"948809"===e.substring(0,6)||"960644"===e.substring(0,6)||"969085"===e.substring(0,6)||"970167"===e.substring(0,6)||"978061"===e.substring(0,6)||"40267919"===e.substring(0,8)||"40327176"===e.substring(0,8)||"40416004"===e.substring(0,8)||"40421933"===e.substring(0,8)||"40451556"===e.substring(0,8)||"40541010"===e.substring(0,8)||"40623835"===e.substring(0,8)||"40733469"===e.substring(0,8)||"40733586"===e.substring(0,8)||"40872498"===e.substring(0,8)||"45007789"===e.substring(0,8)||"45024822"===e.substring(0,8)||"45034751"===e.substring(0,8)||"45046987"===e.substring(0,8)||"45060549"===e.substring(0,8)||"45062482"===e.substring(0,8)||"45070071"===e.substring(0,8)||"45084708"===e.substring(0,8)||"45091433"===e.substring(0,8)||"45100902"===e.substring(0,8)||"45103869"===e.substring(0,8)||"45131047"===e.substring(0,8)||"45168884"===e.substring(0,8)||"45174306"===e.substring(0,8)||"45184611"===e.substring(0,8)||"45191921"===e.substring(0,8)||"45201881"===e.substring(0,8)||"45206401"===e.substring(0,8)||"45245294"===e.substring(0,8)||"45314944"===e.substring(0,8)||"45317847"===e.substring(0,8)||"45357409"===e.substring(0,8)||"45374587"===e.substring(0,8)||"45394705"===e.substring(0,8)||"45456584"===e.substring(0,8)||"45541924"===e.substring(0,8)||"45545795"===e.substring(0,8)||"45567746"===e.substring(0,8)||"45583759"===e.substring(0,8)||"45648838"===e.substring(0,8)||"45672506"===e.substring(0,8)||"45678421"===e.substring(0,8)||"45710756"===e.substring(0,8)||"45716006"===e.substring(0,8)||"45725029"===e.substring(0,8)||"45732113"===e.substring(0,8)||"45732698"===e.substring(0,8)||"45793917"===e.substring(0,8)||"45841185"===e.substring(0,8)||"45862021"===e.substring(0,8)||"45915336"===e.substring(0,8)||"45971496"===e.substring(0,8)?this.issuer=31:"51"===e.substring(0,2)||"52"===e.substring(0,2)||"53"===e.substring(0,2)||"54"===e.substring(0,2)||"55"===e.substring(0,2)?this.issuer=15:"589562"===e.substring(0,6)?this.issuer=24:"4"===e.substring(0,1)&&(this.issuer=1),this.selectedCreditCard())},e.prototype.onPaste=function(){return!1},e.decorators=[{type:t.Component,args:[{selector:"sps-form-pay",template:'\x3c!-- https://github.com/decidir/sdk-javascript-v2 --\x3e\r\n\r\n<form action="" method="POST" id="formulario" #f="ngForm" autocomplete="off">\r\n \x3c!-- Numero de tarjeta --\x3e\r\n <div class="formRow">\r\n <label for="card_number">{{ language.toLowerCase() === \'en\' ? \'Card number\' : \'Número de Tarjeta\' }}</label>\r\n <span>\r\n <input id="card_number"\r\n type="text"\r\n name="card"\r\n placeholder="{{ language.toLowerCase() === \'en\' ? \'Card number\' : \'Número de Tarjeta\' }}"\r\n minlength="12"\r\n maxlength="19"\r\n data-decidir="card_number"\r\n required\r\n (input)="onCardChange()"\r\n (paste)="onPaste()"\r\n [disabled]="disabled"\r\n [(ngModel)]="cardText"\r\n #card="ngModel" />\r\n </span>\r\n <p class="alert-text" *ngIf="card.errors?.required && submitPressed">\r\n {{ language.toLowerCase() === \'en\' ? \'Required\' : \'Completá el número de tarjeta\' }}\r\n </p>\r\n <p class="alert-text" *ngIf="card.errors?.minlength && submitPressed">\r\n {{ language.toLowerCase() === \'en\' ? \'Required\' : \'Requiere 13 digitos mínimo\' }}\r\n </p>\r\n </div>\r\n\r\n \x3c!-- Card-issuer --\x3e\r\n <div class="formRow">\r\n <label>{{ language.toLowerCase() === \'en\' ? \'Pay with\' : \'Pagar con\' }}</label>\r\n <div class="select-icon">\r\n <select name="iss"\r\n required\r\n #iss="ngModel"\r\n [disabled]="disabled"\r\n (change)="selectedCreditCard()"\r\n [(ngModel)]="issuer">\r\n <option [value]="null" selected disabled>\r\n {{ language.toLowerCase() === \'en\' ? \'SELECT...\' : \'Sin Seleccionar...\' }}\r\n </option>\r\n <ng-container *ngIf="currency === \'USD\'; else credCardsArgTemplate">\r\n <option [value]="1">Visa</option>\r\n <option [value]="15">MasterCard</option>\r\n </ng-container>\r\n <ng-template #credCardsArgTemplate>\r\n <option [ngValue]="item.id" *ngFor="let item of creditCards">{{item.name}}</option>\r\n </ng-template>\r\n </select>\r\n </div>\r\n <p class="alert-text" *ngIf="iss.invalid && submitPressed">\r\n {{ language.toLowerCase() === \'en\' ? \'Required\' : \'Seleccioná el emisor de la tarjeta\' }}\r\n </p>\r\n </div>\r\n\r\n <div class="formRow">\r\n <div class="form-row-2col">\r\n \x3c!-- Expiry-month--\x3e\r\n <div class="formRow">\r\n <label>\r\n {{ language.toLowerCase() === \'en\' ? \'Month of expiration\' : \'Mes de expiración\' }}\r\n </label>\r\n <span>\r\n <input type="text"\r\n name="month"\r\n placeholder="MM"\r\n minlength="2"\r\n maxlength="2"\r\n data-decidir="card_expiration_month"\r\n required\r\n [disabled]="disabled"\r\n (input)="onMonthChange()"\r\n (focusout)="onMonthLostFocus()"\r\n (paste)="onPaste()"\r\n [(ngModel)]="monthText"\r\n #month="ngModel" />\r\n </span>\r\n </div>\r\n \x3c!-- Expiry-year--\x3e\r\n <div class="formRow">\r\n <label>\r\n {{ language.toLowerCase() === \'en\' ? \'Year of expiration\' : \'Año de expiración\' }}\r\n </label>\r\n <span>\r\n <input type="text"\r\n name="year"\r\n placeholder="AA"\r\n minlength="2"\r\n maxlength="2"\r\n data-decidir="card_expiration_year"\r\n required\r\n [disabled]="disabled"\r\n (input)="onYearChange()"\r\n (blur)="onYearBlur($event)"\r\n (paste)="onPaste()"\r\n [(ngModel)]="yearText"\r\n #year="ngModel"/>\r\n </span>\r\n </div>\r\n </div>\r\n <p class="alert-text" *ngIf="month.invalid && submitPressed">\r\n {{ language.toLowerCase() === \'en\' ? \'Required\' : \'Completá el mes de vencimiento de la tarjeta\' }}</p>\r\n <p class="alert-text" *ngIf="year.invalid && submitPressed">\r\n {{ language.toLowerCase() === \'en\' ? \'Required\' : \'Completá el año de vencimiento de la tarjeta\' }}</p>\r\n <p class="alert-text" *ngIf="invalidDate">\r\n {{ language.toLowerCase() === \'en\' ? \'Enter a valid expiration date\' : \'La fecha de la tarjeta ingresada está vencida\'}}\r\n </p>\r\n </div>\r\n\r\n \x3c!-- Card-name --\x3e\r\n <div class="formRow">\r\n <label>\r\n {{ language.toLowerCase() === \'en\' ? \'Holder name\' : \'Nombre y apellido impreso en la tarjeta\' }}\r\n </label>\r\n\r\n <span>\r\n <input type="text"\r\n name="payername"\r\n placeholder="{{language.toLowerCase() === \'en\' ? \'Holder name\' : \'TITULAR\'}}" value="{{payerName}}"\r\n maxlength="22"\r\n data-decidir="card_holder_name"\r\n required\r\n [disabled]="disabled"\r\n (input)="onPayerNameChange()"\r\n (paste)="onPaste()"\r\n [(ngModel)]="payerNameText"\r\n #payername="ngModel" />\r\n </span>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!payername.valid && submitPressed">\r\n {{ language.toLowerCase() === \'en\' ? \'Required\' : \'Completá el nombre del titular de la tarjeta\' }}\r\n </p>\r\n </div>\r\n\r\n <div class="formRow" *ngIf="currency === \'USD\'">\r\n <input type="hidden" data-decidir="card_holder_doc_type" name="type">\r\n <input type="hidden" data-decidir="card_holder_doc_number" name="dni">\r\n </div>\r\n\r\n\r\n <div class="formRow" *ngIf="currency === \'ARS\'">\r\n <label for="card_holder_doc_type">Número de documento del titular</label>\r\n <div class="form-row-2col">\r\n \x3c!-- Tipo de documento--\x3e\r\n <div class="formRow">\r\n <div class="select-icon">\r\n <select data-decidir="card_holder_doc_type" ngModel required #type="ngModel" name="type"\r\n [disabled]="disabled">\r\n <option value="" disabled selected>Seleccionar...</option>\r\n <option value="dni">DNI</option>\r\n <option value="cuil">CUIL</option>\r\n </select>\r\n </div>\r\n </div>\r\n \x3c!-- DNI --\x3e\r\n <div class="formRow">\r\n <span>\r\n <input id="card_holder_doc_type"\r\n type="text"\r\n name="dni"\r\n minlength="7"\r\n maxlength="11"\r\n data-decidir="card_holder_doc_number"\r\n required\r\n [disabled]="disabled"\r\n (input)="onDniChange()"\r\n (paste)="onPaste()"\r\n [(ngModel)]="dniText"\r\n #dni="ngModel" />\r\n </span>\r\n </div>\r\n </div>\r\n <p class="alert-text" *ngIf="type.invalid && submitPressed">Seleccioná tipo de documento</p>\r\n <p class="alert-text" *ngIf="dni.errors?.minlength && submitPressed">Requiere 7 digitos mínimo</p>\r\n <p class="alert-text" *ngIf="dni.errors?.required && submitPressed">Completá el número de documento</p>\r\n </div>\r\n \x3c!-- CVV --\x3e\r\n <div class="formRow">\r\n <label for="security_code">{{ language.toLowerCase() === \'en\' ? \'CSC\' : \'Código de seguridad\' }}</label>\r\n <span>\r\n <input id="security_code"\r\n type="text"\r\n name="cvc"\r\n placeholder="CSC"\r\n minlength="3"\r\n maxlength="4"\r\n data-decidir="security_code"\r\n required\r\n [disabled]="disabled"\r\n (input)="onCodeChange()"\r\n (paste)="onPaste()"\r\n [(ngModel)]="cvcText"\r\n #cvc="ngModel" />\r\n </span>\r\n <p class="alert-text" *ngIf="cvc.errors?.minlength && submitPressed">\r\n {{ language.toLowerCase() === \'en\' ? \'Enter a valid csc\' : \'Requiere 3 digitos mínimo\' }}\r\n </p>\r\n <p class="alert-text" *ngIf="cvc.errors?.required && submitPressed">\r\n {{ language.toLowerCase() === \'en\' ? \'Required\' : \'Completá el código de seguridad\' }}\r\n </p>\r\n </div>\r\n\r\n \x3c!-- Cuotas --\x3e\r\n <ng-container *ngIf="currency === \'ARS\'">\r\n <div class="formRow">\r\n <label>Cuotas</label>\r\n <div class="select-icon">\r\n <select name="ins"\r\n required\r\n [disabled]="disabled"\r\n [(ngModel)]="selectCreditCardPlan"\r\n (change)="selectedCreditCardPlan()"\r\n #ins="ngModel">\r\n <option [value]="null" selected disabled>Sin Seleccionar...</option>\r\n <option [ngValue]="item" *ngFor="let item of creditCardPlans">{{ item.description }}</option>\r\n </select>\r\n </div>\r\n <p class="alert-text" *ngIf="ins.invalid && submitPressed">Seleccioná cantidad de cuotas</p>\r\n </div>\r\n </ng-container>\r\n\r\n <div>\r\n <div>\r\n <div class="amount-resume" *ngIf="f.valid">\r\n <ng-container *ngIf="currency === \'ARS\'">\r\n <p>Total al contado</p>\r\n <h1>$ {{ totalAmount | number:\'2.2-2\' }}</h1>\r\n <p>Total financiado</p>\r\n <h3>$ {{ totalFinancedAmount | number:\'2.2-2\'}}</h3>\r\n <p>TEA: {{ currentTEA }}%</p>\r\n <p>CFT: {{ currentCFT }}%</p>\r\n </ng-container>\r\n <ng-container *ngIf="currency === \'USD\'">\r\n <p>Total</p>\r\n <h1>{{ labelButton }}</h1>\r\n </ng-container>\r\n <div *ngIf="paymentState === \'unsubmitted\' || paymentState === \'error\'">\r\n <button *ngIf="currency === \'ARS\'" type="submit" (click)="onSubmit($event)">\r\n Pagar ${{ totalFinancedAmount | number:\'2.2-2\' }}\r\n </button>\r\n\r\n <button *ngIf="currency === \'USD\'" type="submit" (click)="onSubmit($event)">\r\n {{ labelButton }}\r\n </button>\r\n </div>\r\n <div *ngIf="paymentState === \'success\' || paymentState === \'processing\'">\r\n <button *ngIf="currency === \'ARS\'" disabled>Pagar $ {{totalFinancedAmount | number:\'2.2-2\'}}</button>\r\n <button *ngIf="currency === \'USD\'" disabled>{{ labelButton }}</button>\r\n </div>\r\n </div>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!f.valid">\r\n {{ language.toLowerCase() === \'en\' ? \'Complete all fields\' : \'Completá los campos faltantes\' }}\r\n </p>\r\n <div *ngIf="!f.valid && paymentState !== \'success\'">\r\n <button *ngIf="currency === \'ARS\'" type="submit" (click)="onSubmit($event)">Pagar $\r\n {{ paymentAmount | number:\'2.2-2\' }}\r\n </button>\r\n <button *ngIf="currency === \'USD\'" type="submit" (click)="onSubmit($event)">\r\n {{ labelButton }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class="logo">\r\n <img [src]="logoSps" alt="SPS Decidir" class="responsive-img" style="width: 50px;">\r\n </div>\r\n <div>\r\n <div class="pay-message info" *ngIf="paymentState === \'processing\'">\r\n <i class="material-icons">info</i>\r\n <p>\r\n {{ language.toLowerCase() === \'en\' ? \'Processing payment...\' : \'Procesando pago...\' }}\r\n </p>\r\n </div>\r\n <div class="pay-message error" *ngIf="paymentState === \'error\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n {{errorMessage}}\r\n <br>\r\n {{ language.toLowerCase() === \'en\' ? \'Error processing the payment\' : \'No se procesó el pago\' }}\r\n </p>\r\n </div>\r\n <div *ngIf="language.toLowerCase() !== \'en\' && paymentState === \'success\'" class="pay-message success">\r\n <i class="material-icons">check_circle</i>\r\n <p>\r\n Tu pago se ha confirmado!\r\n <br>\r\n Estos son los datos de la transacción:\r\n </p>\r\n <i class="data">Nro. de Pago: {{paymentSuccessInfo.payment_id}}</i>\r\n <i class="data">Ticket: {{paymentSuccessInfo.ticket}}</i>\r\n <i class="data">Cod. Autorización: {{paymentSuccessInfo.card_authorization_code}}</i>\r\n </div>\r\n\r\n <div *ngIf="language.toLowerCase() === \'en\' && paymentState === \'success\'" class="pay-message success">\r\n <i class="material-icons">check_circle</i>\r\n <p>\r\n Your payment has been confirmed!\r\n <br>\r\n These are the transaction data:\r\n </p>\r\n <i class="data">Payment No.: {{paymentSuccessInfo.payment_id}}</i>\r\n <i class="data">Ticket: {{paymentSuccessInfo.ticket}}</i>\r\n <i class="data">Authorization Code: {{paymentSuccessInfo.card_authorization_code}}</i>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'apiError\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n {{ language.toLowerCase() === \'en\' ? \'Error processing the payment (Vitnik)\' : \'Error al procesar el pago (Vitnik)\'}}\r\n </p>\r\n </div>\r\n </div>\r\n</form>\r\n',styles:['@charset "UTF-8";.flex-row-wrap{display:flex;flex-flow:row wrap;flex-direction:row;justify-content:space-between;align-items:center}.flex-row-wrap div{margin:10px;width:200px;flex-grow:1}#formulario{background-color:transparent;font-family:inherit,sans-serif}#formulario label{font-size:14px;color:#888}.formRow{margin-top:10px}.form-row-2col{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.form-row-2col .formRow{width:49%;margin-top:0}.form-row-3col{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.form-row-3col .formRow{width:32%;margin-top:0}span{background-color:#fff;border:.5px solid #707070;border-radius:2px;padding:2px 10px;display:block;margin-top:4px}input[type=password],input[type=text]{background:0 0;border:none;color:#000;font-size:15px;height:23px;width:100%;text-transform:uppercase;vertical-align:top}select{width:100%;font-size:15px;height:30px;padding:2px 10px;border:.5px solid #707070;border-radius:2px;display:block;margin-top:4px;-webkit-appearance:none;-moz-appearance:none;position:relative;z-index:1;background:0 0}.select-icon{position:relative}.select-icon::after{content:"";font-family:"Material Icons";position:absolute;right:5px;top:3px;font-size:24px}.icon-select{width:24px;position:absolute;right:13px}.alert-text{font-size:15px;color:#009ee3;margin-top:7px;margin-bottom:0}:focus{outline:0}.pay-message{margin-top:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px}.pay-message p{font-size:1.1rem;text-align:center;line-height:130%;margin-bottom:10px}.pay-message i.data{font-size:.9rem;text-align:center}.pay-message i.material-icons{font-size:2rem;margin-bottom:5px}.success{background-color:#dff2bf;color:#4f8a10}.error{color:#d8000c;background-color:#ffd2d2}.info{color:#00529b;background-color:#bde5f8}button{background-color:#009ee3;color:#fff;font-size:18px;text-align:center;padding:10px 0;width:100%;border:none;border-radius:20px;margin-top:20px;cursor:pointer}button:disabled{background-color:#525252;cursor:default}.amount-resume h1,.amount-resume h3{margin-top:0;margin-bottom:10px}.amount-resume p{font-size:13px;color:#525252;margin:5px 0;text-transform:uppercase;line-height:130%}.logo{display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-end;padding-top:10px}.responsive-img{width:100%;height:auto}']}]}],e.ctorParameters=function(){return[{type:a.Router},{type:g}]},e.propDecorators={checkOutForm:[{type:t.ViewChild,args:["f",{static:!1}]}],accessToken:[{type:t.Input}],spsUrlApi:[{type:t.Input}],vkUrlApi:[{type:t.Input}],paymentAmount:[{type:t.Input}],logoSps:[{type:t.Input}],currency:[{type:t.Input}],publishableKey:[{type:t.Input}],successUrl:[{type:t.Input}],failureUrl:[{type:t.Input}],useCybersource:[{type:t.Input}],debugLog:[{type:t.Input}],storeId:[{type:t.Input}],idVen:[{type:t.Input}],data:[{type:t.Input}],labelButton:[{type:t.Input}],language:[{type:t.Input}],statusPay:[{type:t.Output}]},e}();var f=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,n.FormsModule,i.HttpClientModule,a.RouterModule],declarations:[h],exports:[h]}]}],e}(),y=[p,f,m],b=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:y,exports:y}]}],e}();e.VkPaymentsModule=b,e.ɵa=p,e.ɵb=d,e.ɵc=o,e.ɵd=c,e.ɵe=f,e.ɵf=h,e.ɵg=g,e.ɵh=m,e.ɵi=u,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("@angular/router"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("vk-payments",["exports","@angular/core","@angular/common","@angular/forms","@angular/router","@angular/common/http"],t):t((e=e||self)["vk-payments"]={},e.ng.core,e.ng.common,e.ng.forms,e.ng.router,e.ng.common.http)}(this,function(e,t,r,n,a,i){"use strict";function s(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}var o=function(){function e(e){this.httpClient=e}return e.prototype.makePayment=function(e,t,r){return this._setAuthHeaders(t),this.httpClient.post(this.normalizeUrl(r)+"/Payment",e,{headers:this.authHeaders})},e.prototype.getMercadoPagoPromotions=function(e){return this.httpClient.get(e)},e.prototype.normalizeUrl=function(e){return e.length>0&&"/"==e.charAt(e.length-1)&&(e=e.substr(0,e.length-1)),e},e.prototype._setAuthHeaders=function(e){var t="Bearer "+e;this.authHeaders=new i.HttpHeaders({"Content-Type":"application/json",Authorization:t})},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:i.HttpClient}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(i.HttpClient))},token:e,providedIn:"root"}),e}();var d=function(){function e(e,r){this.router=e,this.mercadopagoApiService=r,this.paymentState="unsubmitted",this.tokenId="",this.disabled=!1,this.addScript=!1,this.requiredIssuer=!1,this.submitted=!1,this.paymentResult={success:!1,paymentId:"",integrator:"MP"},this.statusPay=new t.EventEmitter}return e.prototype.ngOnInit=function(){this.initMercadoPago()},e.prototype.ngOnChanges=function(e){e.paymentAmount.isFirstChange()||(this.disabled=!1,this.checkOutForm.reset())},e.prototype.initMercadoPago=function(){var e=this;this.addMercadopagoScript().then(function(){Mercadopago.setPublishableKey(e.publishableKey),Mercadopago.getIdentificationTypes(),e.totalAmount=e.paymentAmount,e.defaultName=e.payerName,e.defaultDocType="DNI"})},e.prototype.addMercadopagoScript=function(){return this.addScript=!0,new Promise(function(e,t){var r=document.createElement("script");r.src="https://secure.mlstatic.com/sdk/javascript/v1/mercadopago.js?2345",r.onload=e,document.body.appendChild(r)})},e.prototype.createToken=function(e){var t=this;this.paymentState="processing",Mercadopago.createToken(e,function(e,r){200!==e&&201!==e?(t.paymentState="error",t.statusPay.emit(t.paymentResult),t.errorMessage="Revisa los datos del formulario."):(t.tokenId=r.id,t.makePayment())})},e.prototype.makePayment=function(){var e=this;this.cardPayment={tokenId:this.tokenId,transactionAmount:this.totalAmount,description:this.description,installments:Number(this.checkOutForm.value.installments),issuerId:this.checkOutForm.value.issuer,paymentMethodId:this.currentPaymentMethod[0].id,codCP:this.idVen,docNumber:this.checkOutForm.value.docNumber,additionalData:this.data,storeId:this.storeId},this.mercadopagoApiService.makePayment(this.cardPayment,this.accessToken,this.vkUrlApi).subscribe(function(t){e.paymentResponseHandler(t)},function(t){e.statusPay.emit(e.paymentResult),e.paymentState="apiError",console.log(t)})},e.prototype.paymentResponseHandler=function(e){e.success?(this.paymentState=e.data.statusDetails,this.ticket=e.data.transactionId,this.paymentResult={success:!0,paymentId:this.ticket,integrator:"MP"},this.statusPay.emit(this.paymentResult),this.disabled=!0,this.logger("paymentResponseHandler:",e),this.successUrl&&this.successUrl.length>0&&this.router.navigate([""+this.successUrl])):(this.paymentState="apiError",this.statusPay.emit(this.paymentResult),this.successUrl&&this.failureUrl.length>0&&this.router.navigate([""+this.failureUrl]).then())},e.prototype.checkPaymentMethod=function(){if(null!=this.checkOutForm.value.cardNumber){if(this.currentInstallments=null,this.currentIssuers=null,this.checkOutForm.value.cardNumber.toString().length>=6){this.currentBin=this.checkOutForm.value.cardNumber.toString().substring(0,6);var e=this;Mercadopago.getPaymentMethod({bin:this.checkOutForm.value.cardNumber.toString()},function(t,r){200===t&&e.setCurrentMethod(r)})}this.checkOutForm.value.cardNumber.toString().length<6&&(this.requiredIssuer=!1)}},e.prototype.setCurrentMethod=function(e){if(e){this.logger("setCurrentMethod:",e),this.currentPaymentMethod=e,this.requiredIssuer=!0;var t=this;Mercadopago.getIssuers(e[0].id,function(e,r){200===e&&t.setIssuers(r)}),this.requiredIssuer||t.checkInstallments()}},e.prototype.checkInstallments=function(){if(!(null==this.currentBin||this.currentBin.length<6)){var e=this;e.currentInstallments=null,Mercadopago.getInstallments({bin:this.currentBin,amount:this.totalAmount},function(t,r){200===t?e.setInstallments(r):e.currentInstallments=null})}},e.prototype.setInstallments=function(e){var t=this;if(this.logger("setInstallments:",e),e.length>0)if(null!=this.issuerId&&e.length>1&&this.currentPaymentMethod.length>0){var r=e.filter(function(e){return e.issuer.id===t.issuerId&&e.payment_method_id===t.currentPaymentMethod[0].id});console.log("result"),console.log(r),this.currentInstallments=r[0].payer_costs,this.issuerId=r[0].issuer.id}else this.currentInstallments=e[0].payer_costs,this.issuerId=e[0].issuer.id},e.prototype.setIssuers=function(e){this.logger("setIssuers res",e),this.currentIssuers=e},e.prototype.onDuesSelection=function(e){var t,r,n,a;try{for(var i=s(this.currentInstallments),o=i.next();!o.done;o=i.next()){var d=o.value;if(d.installments===Number(e.value.installments)){this.totalFinancedAmount=d.total_amount;try{for(var c=(n=void 0,s(d.labels)),l=c.next();!l.done;l=c.next()){var p=l.value;p.includes("CFT")&&(this.recommendedLabel=p.replace(/_/g,": ").split("|",2),this.currentTEA=this.recommendedLabel[1],this.currentCFT=this.recommendedLabel[0])}}catch(e){n={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}},e.prototype.onSubmit=function(e){if(this.submitted=!0,this.paymentResult={success:!1,paymentId:"",integrator:"MP"},this.checkOutForm.valid){var t={cardNumber:this.cardText,securityCode:this.cvcText,cardExpirationMonth:this.monthText,cardExpirationYear:this.yearText,cardholderName:this.defaultName,docType:this.defaultDocType,docNumber:this.dniText};this.debugLog&&console.log("sendForm",t),""!==this.tokenId&&Mercadopago.clearSession(),this.createToken(t)}},e.prototype.onYearChange=function(){var e=this;isNaN(+this.yearText)&&setTimeout(function(){e.yearText=""})},e.prototype.onMonthLostFocus=function(){+this.monthText>0&&!isNaN(+this.monthText)&&"1"==this.monthText&&(this.monthText="01")},e.prototype.onMonthChange=function(){var e=this;if(+this.monthText>=0&&+this.monthText<13&&!isNaN(+this.monthText))switch(this.monthText){case"2":this.monthText="02";break;case"3":this.monthText="03";break;case"4":this.monthText="04";break;case"5":this.monthText="05";break;case"6":this.monthText="06";break;case"7":this.monthText="07";break;case"8":this.monthText="08";break;case"9":this.monthText="09"}else setTimeout(function(){e.monthText=""})},e.prototype.onCodeChange=function(){var e=this;isNaN(+this.cvcText)&&setTimeout(function(){e.cvcText=""})},e.prototype.onDniChange=function(){var e=this;isNaN(+this.dniText)&&setTimeout(function(){e.dniText=""})},e.prototype.onPayerNameChange=function(){var e=this;isNaN(+this.defaultName)||setTimeout(function(){e.defaultName=""})},e.prototype.onCardChange=function(){var e=this;isNaN(+this.cardText)&&setTimeout(function(){e.cardText=""})},e.prototype.onPaste=function(){return!1},e.prototype.logger=function(e,t){this.debugLog&&console.log(e,JSON.stringify(t))},e.decorators=[{type:t.Component,args:[{selector:"mp-form-pay",template:'<form (ngSubmit)="onSubmit(f)" class="mp-payment" #f="ngForm" autocomplete="off">\r\n \x3c!-- Titular --\x3e\r\n <div class="formRow">\r\n <label for="cardholderName">Nombre y Apellido</label>\r\n <span>\r\n <input id="cardholderName" type="text" name="cardholderName" required maxlength="22"\r\n data-checkout="cardholderName" [disabled]="disabled" (paste)="onPaste()" (input)="onPayerNameChange()"\r\n [(ngModel)]="defaultName" #cardholderName="ngModel" />\r\n </span>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!cardholderName.valid && submitted">\r\n Ingresá el nombre completo que figura en la tarjeta.\r\n </p>\r\n </div>\r\n\r\n \x3c!-- Numero de tarjeta --\x3e\r\n <div class="formRow">\r\n <label for="cardNumber">Nº de Tarjeta</label>\r\n <span>\r\n <input id="cardNumber" type="text" name="cardNumber" data-checkout="cardNumber" maxlength="19" required thumbnail\r\n [disabled]="disabled" (input)="onCardChange()" (keyup)="checkPaymentMethod()" (focusout)="checkInstallments()"\r\n (paste)="onPaste()" [(ngModel)]="cardText" #cardNumber="ngModel" />\r\n </span>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!cardNumber.valid && submitted">\r\n Ingresá el número de tarjeta.\r\n </p>\r\n </div>\r\n\r\n \x3c!-- Emisor--\x3e\r\n <div class="formRow">\r\n <label for="issuer">Emisor</label>\r\n <div class="select-icon">\r\n <select id="issuer" name="issuer" required [disabled]="!requiredIssuer || disabled" [(ngModel)]="issuerId"\r\n #issuer="ngModel">\r\n <option *ngFor="let iss of currentIssuers" value="{{ iss.id }}">\r\n {{ iss.name }}\r\n </option>\r\n </select>\r\n </div>\r\n <p class="alert-text" *ngIf="!issuer.valid && requiredIssuer && submitted">Seleccioná el emisor de la tarjeta.</p>\r\n </div>\r\n\r\n <div class="form-row-3col">\r\n \x3c!-- Expiry-month--\x3e\r\n <div class="formRow">\r\n <label for="cardExpirationMonth">Mes</label>\r\n <span>\r\n <input id="cardExpirationMonth" type="text" name="cardExpirationMonth" placeholder="MM" minlength="2"\r\n maxlength="2" data-checkout="cardExpirationMonth" required [disabled]="disabled" (paste)="onPaste()"\r\n (input)="onMonthChange()" (focusout)="onMonthLostFocus()" [(ngModel)]="monthText"\r\n #cardExpirationMonth="ngModel" />\r\n </span>\r\n </div>\r\n\r\n \x3c!-- Expiry-year--\x3e\r\n <div class="formRow">\r\n <label for="cardExpirationYear">Año</label>\r\n <span>\r\n <input id="cardExpirationYear" type="text" name="cardExpirationYear" placeholder="AAAA" minlength="4"\r\n maxlength="4" data-checkout="cardExpirationYear" required [disabled]="disabled" (paste)="onPaste()"\r\n (input)="onYearChange()" [(ngModel)]="yearText" #cardExpirationYear="ngModel" />\r\n </span>\r\n </div>\r\n\r\n \x3c!-- CVC --\x3e\r\n <div class="formRow">\r\n <label for="securityCode">CVC</label>\r\n <span>\r\n <input id="securityCode" type="text" name="securityCode" placeholder="CVC" minlength="3" maxlength="4"\r\n data-checkout="securityCode" required [disabled]="disabled" (paste)="onPaste()" (input)="onCodeChange()"\r\n [(ngModel)]="cvcText" #securityCode="ngModel" />\r\n </span>\r\n </div>\r\n </div>\r\n <div>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!cardExpirationMonth.valid && submitted">\r\n Completá el mes de vencimiento.\r\n </p>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!cardExpirationYear.valid && submitted">\r\n Completá el año de vencimiento.\r\n </p>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!securityCode.valid && submitted">\r\n Ingresá el código de seguridad.\r\n </p>\r\n </div>\r\n\r\n <div class="formRow">\r\n <div class="form-row-2col">\r\n\r\n \x3c!-- Tipo de documento--\x3e\r\n <div class="formRow">\r\n <label for="docType">Tipo de Doc.</label>\r\n <div class="select-icon">\r\n <select id="docType" name="docType" data-checkout="docType" required ngModel [disabled]="disabled"\r\n [(ngModel)]="defaultDocType" #docType="ngModel">\r\n </select>\r\n </div>\r\n </div>\r\n\r\n \x3c!-- DNI --\x3e\r\n <div class="formRow">\r\n <label for="docNumber">Nº de Doc.</label>\r\n <span>\r\n <input id="docNumber" type="text" name="docNumber" data-checkout="docNumber" minlength="7" maxlength="8"\r\n required [disabled]="disabled" (paste)="onPaste()" (input)="onDniChange()" [(ngModel)]="dniText"\r\n #docNumber="ngModel" />\r\n </span>\r\n </div>\r\n\r\n </div>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!docNumber.valid && submitted">\r\n Completá el número de documento.\r\n </p>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!docType.valid && submitted">\r\n Seleccioná el tipo de documento.\r\n </p>\r\n </div>\r\n\r\n \x3c!--Cantidad de cuotas--\x3e\r\n <div class="formRow">\r\n <label for="installments">Cantidad de Cuotas</label>\r\n <div class="select-icon">\r\n <select id="installments" name="installments" aria-required="true" aria-invalid="false" required ngModel\r\n [disabled]="disabled" (change)="onDuesSelection(f)" #installments="ngModel">\r\n <option *ngFor="let current of currentInstallments " value="{{ current.installments }}">\r\n {{ current.recommended_message }}\r\n </option>\r\n </select>\r\n </div>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!installments.valid && submitted">\r\n Elegí la cantidad de cuotas.\r\n </p>\r\n </div>\r\n\r\n <div>\r\n <div>\r\n <div class="amount-resume" *ngIf="f.valid">\r\n <p>Total al contado</p>\r\n <h1>$ {{ totalAmount | number:\'2.2-2\' }}</h1>\r\n <p>Total financiado</p>\r\n <h3>$ {{ totalFinancedAmount | number:\'2.2-2\' }}</h3>\r\n <p>{{ currentTEA }}</p>\r\n <p>{{ currentCFT }}</p>\r\n <div *ngIf="paymentState === \'unsubmitted\'\r\n || paymentState.substring(0, 11) === \'cc_rejected\'\r\n || paymentState === \'error\'">\r\n <button type="submit" (click)="onSubmit(f)">\r\n Pagar $ {{ totalFinancedAmount | number:\'2.2-2\' }}\r\n </button>\r\n </div>\r\n </div>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!f.valid">Completá los campos faltantes.</p>\r\n <div *ngIf="!f.valid">\r\n <div *ngIf="paymentState !== \'accredited\' &&\r\n paymentState !== \'pending_contingency\' &&\r\n paymentState !== \'pending_review_manual\'">\r\n <button type="submit" (click)="onSubmit(f)">\r\n Pagar $ {{ paymentAmount | number:\'2.2-2\' }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</form>\r\n\r\n<div class="logo">\r\n <img [src]="imgMercadoPago" alt="Mercado Pago" class="responsive-img" style="width: 150px;">\r\n</div>\r\n\r\n\x3c!--IFs--\x3e\r\n<div>\r\n <div class="pay-message info" *ngIf="paymentState === \'processing\'">\r\n <i class="material-icons">info</i>\r\n <p>\r\n Procesando pago...\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message success" *ngIf="paymentState === \'accredited\'">\r\n <i class="material-icons">check_circle</i>\r\n <p>\r\n Tu pago se ha confirmado!\r\n <br>\r\n Estos son los datos de la transacción:\r\n </p>\r\n <i class="data">Ticket: {{ ticket }}</i>\r\n </div>\r\n\r\n <div class="pay-message info" *ngIf="paymentState === \'pending_contingency\'">\r\n <i class="material-icons">info</i>\r\n <p>\r\n Estamos procesando el pago.\r\n <br>\r\n En menos de una hora te enviaremos por e-mail el resultado.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message info" *ngIf="paymentState === \'pending_review_manual\'">\r\n <i class="material-icons">info</i>\r\n <p>\r\n Estamos procesando el pago.\r\n <br>\r\n En menos de 2 días hábiles te diremos por e-mail si se acreditó o si necesitamos más información.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_bad_filled_card_number\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n Revisa el número de tarjeta.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_bad_filled_date\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n Revisa la fecha de vencimiento.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_bad_filled_other\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n Revisa los datos ingresados.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_bad_filled_security_code\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n Revisa el código de seguridad.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_blacklist\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n No pudimos procesar tu pago.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_call_for_authorize\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n Debes autorizar el pago. El teléfono está al dorso de tu tarjeta.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_card_disabled\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n Llama para activar tu tarjeta. El teléfono está al dorso de tu tarjeta.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_card_error\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n No pudimos procesar tu pago.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_duplicated_payment\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado, ya hiciste un pago por ese valor.\r\n <br>\r\n Si necesitas volver a pagar usa otra tarjeta u otro medio de pago..\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_high_risk\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n Tu pago fue rechazado.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_insufficient_amount\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_invalid_installments\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n No se pudo pocesar el pago en esa cantidad de cuotas.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_max_attempts\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado! Límite de intentos permitidos.\r\n <br>\r\n Elige otra tarjeta u otro medio de pago.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'cc_rejected_other_reason\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n Pago Rechazado.\r\n <br>\r\n No se procesó el pago.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'error\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n {{ errorMessage }}\r\n <br>No se procesó el pago.\r\n </p>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'apiError\'">\r\n <i class="material-icons">error</i>\r\n <p>Error al procesar el pago (Vitnik).</p>\r\n </div>\r\n</div>\r\n',styles:['@charset "UTF-8";.mp-payment{background-color:transparent;font-family:inherit,sans-serif}.mp-payment label{font-size:14px;color:#888}.formRow{margin-top:10px}:focus{outline:0}.form-row-2col{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-top:10px}.form-row-2col .formRow{width:49%;margin-top:0}.form-row-3col{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-top:10px}.form-row-3col .formRow{width:32%;margin-top:0}span{background-color:#fff;border:.5px solid #707070;border-radius:2px;padding:2px 10px;display:block;margin-top:4px}input[type=password],input[type=text]{background:0 0;border:none;color:#000;font-size:15px;height:23px;width:100%;text-transform:uppercase;vertical-align:top}select{width:100%;font-size:15px;height:30px;padding:2px 10px;border:.5px solid #707070;border-radius:2px;display:block;margin-top:4px;-webkit-appearance:none;-moz-appearance:none;position:relative;z-index:1;background:0 0}.select-icon{position:relative}.select-icon::after{content:"";font-family:"Material Icons";position:absolute;right:0;top:3px;font-size:24px}.icon-select{width:24px;position:absolute;right:13px}.alert-text{font-size:13px;color:#009ee3;margin-top:7px;margin-bottom:0}.warn-text{font-size:15px;color:#c62626;margin:10px 0;text-align:center}.confirm-text{font-size:15px;color:#388a22;margin:10px 0;text-align:center}.in-progress-text{font-size:15px;color:#009ee3;margin:10px 0;text-align:center}button{background-color:#009ee3;color:#fff;font-size:18px;text-align:center;padding:10px 0;width:100%;border:none;border-radius:20px;margin-top:20px;cursor:pointer}button:disabled{background-color:#525252}.amount-resume h1,.amount-resume h3{margin-top:0;margin-bottom:10px}.amount-resume p{font-size:13px;color:#525252;margin:5px 0;text-transform:uppercase}.pay-message{margin-top:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px}.pay-message p{font-size:1.1rem;text-align:center;line-height:130%;margin-bottom:10px}.pay-message i.data{font-size:.9rem;text-align:center}.pay-message i.material-icons{font-size:2rem;margin-bottom:5px}.success{background-color:#dff2bf;color:#4f8a10}.error{color:#d8000c;background-color:#ffd2d2}.info{color:#00529b;background-color:#bde5f8}.logo{display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-end;padding-top:10px}.responsive-img{width:100%;height:auto}']}]}],e.ctorParameters=function(){return[{type:a.Router},{type:o}]},e.propDecorators={paymentAmount:[{type:t.Input}],payerName:[{type:t.Input}],payerEmail:[{type:t.Input}],accessToken:[{type:t.Input}],vkUrlApi:[{type:t.Input}],description:[{type:t.Input}],publishableKey:[{type:t.Input}],successUrl:[{type:t.Input}],failureUrl:[{type:t.Input}],imgCreditCards:[{type:t.Input}],imgMercadoPago:[{type:t.Input}],iconExpandMore:[{type:t.Input}],debugLog:[{type:t.Input}],storeId:[{type:t.Input}],idVen:[{type:t.Input}],data:[{type:t.Input}],statusPay:[{type:t.Output}],checkOutForm:[{type:t.ViewChild,args:["f",{static:!1}]}]},e}();var c=function(){function e(e){this.mercadoPagoService=e}return e.prototype.ngOnInit=function(){var e=this;this.mercadoPagoService.getMercadoPagoPromotions(this.url).subscribe(function(t){return e.cardPromotions=t})},e.decorators=[{type:t.Component,args:[{selector:"mp-promotion",template:'<div *ngIf="contentSource === \'api\'" class="payments summary">\r\n <div id="promoBancos" class="promoBancos">\r\n\r\n <div *ngFor="let promo of cardPromotions | slice:2" name="promociones" class="bank-block col-md-4 col-sm-4">\r\n <div class="banklogoContainer">\r\n <img class="img-regular img-responsive" [src]="promo.payment_methods[0].secure_thumbnail">\r\n </div>\r\n <p>\r\n <span class="issuer">{{promo.issuer.name}}</span>\r\n </p>\r\n <p>\r\n <span class="installments">{{promo.max_installments}} cuotas sin interés</span>\r\n </p>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<iframe src="https://www.mercadopago.com.ar/cuotas?iframe=true"\r\n width="100%"\r\n height="450px"\r\n scrolling="yes"\r\n frameborder="0"\r\n style="position: relative;"\r\n *ngIf="contentSource === \'iframe\'">\r\n</iframe>\r\n',styles:[""]}]}],e.ctorParameters=function(){return[{type:o}]},e.propDecorators={url:[{type:t.Input}],contentSource:[{type:t.Input}]},e}();var l=[d,c],p=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:l,exports:l,imports:[r.CommonModule,n.FormsModule,n.ReactiveFormsModule,a.RouterModule]}]}],e}(),u=function(){function e(){this.addScript=!1,this.showError=!1,this.loading=!0,this.status="",this.linkToPay="",this.linkExecutePay=""}return e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewChecked=function(){var e=this;this.addScript||this.addPaypalScript().then(function(){var t={style:{color:"blue",shape:"pill",label:"pay",height:40},commit:!0,createOrder:function(e,t){return t.order.create({purchase_units:[{amount:{value:document.getElementById("amount").value},reference_id:"'"+document.getElementById("transactionId").value+"'",custom_id:"'"+document.getElementById("storeId").value+"'"}],application_context:{shipping_preference:"NO_SHIPPING"}})},onApprove:function(e,t){return t.order.capture().then(function(e){e.data=document.getElementById("data").value,e.userid=document.getElementById("userId").value,fetch(document.getElementById("vkUrlApi").value,{method:"post",headers:{"content-type":"application/json",Authorization:"Bearer "+document.getElementById("accessToken").value},body:JSON.stringify({details:e})}).then(function(e){console.log("response-> api",e)}).then(function(){window.location.href=document.getElementById("successUrl").value})})},onError:function(e){window.location.reload()},onCancel:function(e,t){window.location.href=document.getElementById("cancelUrl").value}};paypal.Buttons(t).render("#paypal-button-container"),e.loading=!1})},e.prototype.addPaypalScript=function(){var e=this;return this.addScript=!0,new Promise(function(t,r){var n=document.createElement("script");n.src="https://www.paypal.com/sdk/js?client-id="+e.clientId+"&currency="+e.currency,n.onload=t,document.body.appendChild(n)})},e.decorators=[{type:t.Component,args:[{selector:"paypal-new-form-pay",template:'<div *ngIf="loading">Loading...</div>\r\n<input type="hidden" id="amount" [(ngModel)]="amount">\r\n<input type="hidden" id="userId" [(ngModel)]="userId">\r\n<input type="hidden" id="storeId" [(ngModel)]="storeId">\r\n<input type="hidden" id="successUrl" [(ngModel)]="successUrl">\r\n<input type="hidden" id="cancelUrl" [(ngModel)]="cancelUrl">\r\n<input type="hidden" id="vkUrlApi" [(ngModel)]="vkUrlApi">\r\n<input type="hidden" id="transactionId" [(ngModel)]="transactionId">\r\n<input type="hidden" id="data" [(ngModel)]="data">\r\n<input type="hidden" id="accessToken" [(ngModel)]="accessToken">\r\n<div id="paypal-button-container"></div>\r\n',styles:["label{font-size:11px;color:#888;text-transform:uppercase;font-weight:500}.flex-row-wrap{display:flex;flex-flow:row wrap;flex-direction:row;justify-content:space-between;align-items:center}.flex-row-wrap div{margin:10px;width:200px;flex-grow:1}:focus{outline:0}.formRow{margin-top:10px;margin-bottom:10px}.formRow span{background-color:#fff;border:.5px solid #707070;border-radius:5px;padding:5px 10px;display:block;margin-top:7px}input[type=password],input[type=text]{background:0 0;border:none;color:#000;font-size:13px;height:23px;width:100%;text-transform:uppercase}select{width:100%;font-size:13px;height:36px;padding:5px 10px;background-color:#fff;border:.5px solid #707070;border-radius:5px;display:block;margin-top:7px}.icon-select{width:24px;position:absolute;right:13px}.alert-text{font-size:13px;color:#009ee3;margin-top:7px;margin-bottom:0}.warn-text{font-size:15px;color:#c62626;margin:10px 0;text-align:center}.confirm-text{font-size:15px;color:#8cd876;margin:10px 0;text-align:center}.in-progress-text{font-size:15px;color:#009ee3;margin:10px 0;text-align:center}button{background-color:#009ee3;color:#fff;font-size:18px;text-align:center;padding:10px 0;width:100%;border:none;border-radius:20px;margin-top:20px;cursor:pointer}button:disabled{background-color:#525252}.amount-resume h1,.amount-resume h3{margin-top:0;margin-bottom:10px}.amount-resume p{font-size:13px;color:#525252;margin:5px 0;text-transform:uppercase}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={accessToken:[{type:t.Input}],clientId:[{type:t.Input}],vkUrlApi:[{type:t.Input}],storeId:[{type:t.Input}],userId:[{type:t.Input}],transactionId:[{type:t.Input}],amount:[{type:t.Input}],currency:[{type:t.Input}],cancelUrl:[{type:t.Input}],successUrl:[{type:t.Input}],data:[{type:t.Input}],urlSignout:[{type:t.Input}]},e}();var m=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,n.FormsModule,i.HttpClientModule,a.RouterModule],declarations:[u],exports:[u]}]}],e}(),g=function(){function e(e){this.httpClient=e}return e.prototype.makePayment=function(e,t,r){return this._setAuthHeaders(t),this.httpClient.post(this.normalizeUrl(r)+"/Payment",e,{headers:this.authHeaders})},e.prototype.normalizeUrl=function(e){return e.length>0&&"/"==e.charAt(e.length-1)&&(e=e.substr(0,e.length-1)),e},e.prototype.getCreditCards=function(e,t){return this._setAuthHeaders(e),this.httpClient.get(this.normalizeUrl(t)+"/GetCreditCardsEnable",{headers:this.authHeaders})},e.prototype.getPlansByCreditCardId=function(e,t,r,n){this._setAuthHeaders(e);var a={amount:r,creditCardId:n};return this.httpClient.post(this.normalizeUrl(t)+"/CalculateAmountInInstallments",a,{headers:this.authHeaders})},e.prototype._setAuthHeaders=function(e){var t="Bearer "+e;this.authHeaders=new i.HttpHeaders({"Content-Type":"application/json",Authorization:t})},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:i.HttpClient}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(i.HttpClient))},token:e,providedIn:"root"}),e}();var h=function(){function e(e,r){this.router=e,this.spsDecidirApiService=r,this.language="es",this.statusPay=new t.EventEmitter,this.disabled=!1,this.selectCreditCardPlan=null,this.paymentResult={success:!1,paymentId:"",integrator:"DECIDIR"},this.submitPressed=!1,this.invalidDate=!1,this.addScript=!0,this.paymentState="unsubmitted",this.issuer=null}return e.prototype.ngOnInit=function(){this.initDecidir()},e.prototype.ngOnChanges=function(e){e.paymentAmount.isFirstChange()||(this.checkOutForm.reset(),this.disabled=!1)},e.prototype.initDecidir=function(){var e=this;this.addDecidirScript().then(function(){e.getCreditCards(),e.initializeSpsDecidir()})},e.prototype.addDecidirScript=function(){return this.addScript=!0,new Promise(function(e){var t=document.createElement("script");t.src="https://live.decidir.com/static/v2.4/decidir.js",t.onload=e,document.body.appendChild(t)})},e.prototype.getCreditCards=function(){var e=this;this.spsDecidirApiService.getCreditCards(this.accessToken,this.vkUrlApi).subscribe(function(t){e.creditCards=t.data,e.logger("getCreditCards",e.creditCards)},function(t){return e.paymentState="apiError"})},e.prototype.getPlansByCreditCardId=function(e,t){var r=this;this.spsDecidirApiService.getPlansByCreditCardId(this.accessToken,this.vkUrlApi,e,t).subscribe(function(e){r.creditCardPlans=e.data,r.logger("getPlansByCreditCardId",r.creditCardPlans)},function(e){return r.paymentState="apiError"})},e.prototype.initializeSpsDecidir=function(){this.decidir=new Decidir(this.spsDecidirApiService.normalizeUrl(this.spsUrlApi),!this.useCybersource),this.decidir.setTimeout(15e3),this.decidir.setPublishableKey(this.publishableKey)},e.prototype.logger=function(e,t){this.debugLog&&console.log(e,t)},e.prototype.selectedCreditCard=function(){this.issuer&&(this.selectCreditCardPlan=null,"ARS"!==this.currency?"USD"===this.currency&&(this.totalAmount=this.totalFinancedAmount=this.paymentAmount):this.getPlansByCreditCardId(this.paymentAmount,this.issuer))},e.prototype.selectedCreditCardPlan=function(){null!==this.selectCreditCardPlan&&(this.totalFinancedAmount=this.selectCreditCardPlan.totalAmount,this.totalAmount=this.paymentAmount,this.currentTEA=this.selectCreditCardPlan.tna,this.currentCFT=this.selectCreditCardPlan.cft)},e.prototype.onSubmit=function(e){var t=this;if(e.preventDefault(),this.submitPressed=!0,this.paymentResult={success:!1,paymentId:"",integrator:"DECIDIR"},this.checkOutForm.valid){this.paymentState="processing";var r=document.querySelector("#formulario");this.decidir.createToken(r,function(e,n){200!==e&&201!==e?(t.paymentState="error",t.statusPay.emit(t.paymentResult),t.processErrorToken(n)):t.makePayment(r,n)})}},e.prototype.makePayment=function(e,t){var r=this;this.logger("makePayment:",JSON.stringify(t)),this.payment={token:t.id,amount:this.totalAmount,totalFinancedAmount:this.totalFinancedAmount,bin:t.bin,currency:"ARS",documentNumber:"USD"===this.currency?"0":t.cardholder.identification.number,idVen:this.idVen,paymentType:"single",installments:"USD"===this.currency?1:this.selectCreditCardPlan.installments,creditCardPlanId:"USD"===this.currency?0:this.selectCreditCardPlan.id,paymentMethodId:this.issuer,cardholder:this.payerNameText,storeId:this.storeId,data:this.data,subPayments:[]},this.logger("payment:",JSON.stringify(this.payment)),this.spsDecidirApiService.makePayment(this.payment,this.accessToken,this.vkUrlApi).subscribe(function(e){r.paymentResponseHandler(e)},function(e){r.statusPay.emit(r.paymentResult),r.paymentState="apiError",console.error(e)})},e.prototype.paymentResponseHandler=function(e){if(this.logger("paymentResponseHandler:",JSON.stringify(e)),e.success){if(this.paymentState="success",this.paymentSuccessInfo=e.data,this.paymentResult={success:!0,paymentId:this.paymentSuccessInfo.payment_id,integrator:"DECIDIR"},this.statusPay.emit(this.paymentResult),this.disabled=!0,this.successUrl&&this.successUrl.length>0)return void this.router.navigate([""+this.successUrl]).then()}else if(this.paymentState="error",this.statusPay.emit(this.paymentResult),this.processErrorMessage(e.data),this.failureUrl&&this.failureUrl.length>0)return void this.router.navigate([""+this.failureUrl]).then()},e.prototype.processErrorToken=function(e){var t=this,r=e;r.error.forEach(function(e){"invalid_expiry_date"===e.error.type?t.errorMessage="Revisá la fecha de vencimiento.":t.errorMessage=JSON.stringify(r)})},e.prototype.processErrorMessage=function(e){if(e.error)switch(e.error.type){case"invalid_card":this.errorMessage="Tarjeta invalida";break;case"request_authorization_card":this.errorMessage="Pedir autorización";break;default:this.errorMessage=JSON.stringify(e.error.reason)}if(e.error_type)switch(e.error_type){case"invalid_request_error":if(e.validation_errors.length>0&&"invalid_param"===e.validation_errors[0].code)switch(e.validation_errors[0].param){case"card_number":case"bin":this.errorMessage="Tarjeta inválida";break;default:this.errorMessage=JSON.stringify(e)}break;case"not_found_error":this.errorMessage="Datos no encontrados (404).";break;case"authentication_error":this.errorMessage="Error (401).";break;case"malformed_request_error":this.errorMessage="Error al enviar los datos (400).";break;case"api_error":this.errorMessage="Error interno (409).";break;default:this.errorMessage=JSON.stringify(e)}},e.prototype.compareDate=function(e,t,r){var n=new Date(e,t,r),a=new Date;return n.getTime()===a.getTime()?0:n>a?1:n<a?-1:void 0},e.prototype.onYearChange=function(){var e=this;Number.isNaN(+this.yearText)&&setTimeout(function(){e.yearText=""})},e.prototype.onYearBlur=function(e){var t=this;this.compareDate(Number("20"+this.yearText),Number(this.monthText),(new Date).getDate())<0?setTimeout(function(){t.yearText="",t.invalidDate=!0,e.target.focus()}):this.invalidDate=!1},e.prototype.onMonthLostFocus=function(){+this.monthText>0&&!isNaN(+this.monthText)&&"1"===this.monthText&&(this.monthText="01")},e.prototype.onMonthChange=function(){var e=this;if(+this.monthText>=0&&+this.monthText<13&&!isNaN(+this.monthText))switch(this.monthText){case"2":this.monthText="02";break;case"3":this.monthText="03";break;case"4":this.monthText="04";break;case"5":this.monthText="05";break;case"6":this.monthText="06";break;case"7":this.monthText="07";break;case"8":this.monthText="08";break;case"9":this.monthText="09"}else setTimeout(function(){e.monthText=""})},e.prototype.onCodeChange=function(){var e=this;Number.isNaN(+this.cvcText)&&setTimeout(function(){e.cvcText=""}),this.cvcText.search(" ")>-1&&setTimeout(function(){e.cvcText=""})},e.prototype.onDniChange=function(){var e=this;Number.isNaN(+this.dniText)&&setTimeout(function(){e.dniText=""}),this.dniText.search(" ")>-1&&setTimeout(function(){e.dniText=""})},e.prototype.onPayerNameChange=function(){var e=this;isNaN(+this.payerNameText)||setTimeout(function(){e.payerNameText=""})},e.prototype.onCardChange=function(){var e=this;Number.isNaN(+this.cardText)&&setTimeout(function(){e.cardText=""}),this.cardText.search(" ")>-1&&setTimeout(function(){e.cardText=""}),this.setCreditType(this.cardText)},e.prototype.setCreditType=function(e){e.length<6?this.issuer=null:6===e.length&&(this.issuer=null,"4770"===e.substring(0,4)||"442548"===e.substring(0,6)||"406809"===e.substring(0,6)||"408738"===e.substring(0,6)||"411521"===e.substring(0,6)||"411663"===e.substring(0,6)||"426359"===e.substring(0,6)||"429780"===e.substring(0,6)||"438267"===e.substring(0,6)||"461187"===e.substring(0,6)||"500334"===e.substring(0,6)||"509413"===e.substring(0,6)||"512285"===e.substring(0,6)||"512881"===e.substring(0,6)||"518635"===e.substring(0,6)||"538449"===e.substring(0,6)||"550553"===e.substring(0,6)||"566057"===e.substring(0,6)||"567933"===e.substring(0,6)||"572140"===e.substring(0,6)||"584257"===e.substring(0,6)||"598718"===e.substring(0,6)||"605801"===e.substring(0,6)||"606120"===e.substring(0,6)||"631057"===e.substring(0,6)||"676215"===e.substring(0,6)||"713274"===e.substring(0,6)||"713284"===e.substring(0,6)||"717515"===e.substring(0,6)||"748761"===e.substring(0,6)||"753371"===e.substring(0,6)||"753600"===e.substring(0,6)||"912394"===e.substring(0,6)||"916148"===e.substring(0,6)||"916773"===e.substring(0,6)||"923405"===e.substring(0,6)||"930965"===e.substring(0,6)||"934091"===e.substring(0,6)||"935761"===e.substring(0,6)||"943313"===e.substring(0,6)||"945721"===e.substring(0,6)||"948809"===e.substring(0,6)||"960644"===e.substring(0,6)||"969085"===e.substring(0,6)||"970167"===e.substring(0,6)||"978061"===e.substring(0,6)||"40267919"===e.substring(0,8)||"40327176"===e.substring(0,8)||"40416004"===e.substring(0,8)||"40421933"===e.substring(0,8)||"40451556"===e.substring(0,8)||"40541010"===e.substring(0,8)||"40623835"===e.substring(0,8)||"40733469"===e.substring(0,8)||"40733586"===e.substring(0,8)||"40872498"===e.substring(0,8)||"45007789"===e.substring(0,8)||"45024822"===e.substring(0,8)||"45034751"===e.substring(0,8)||"45046987"===e.substring(0,8)||"45060549"===e.substring(0,8)||"45062482"===e.substring(0,8)||"45070071"===e.substring(0,8)||"45084708"===e.substring(0,8)||"45091433"===e.substring(0,8)||"45100902"===e.substring(0,8)||"45103869"===e.substring(0,8)||"45131047"===e.substring(0,8)||"45168884"===e.substring(0,8)||"45174306"===e.substring(0,8)||"45184611"===e.substring(0,8)||"45191921"===e.substring(0,8)||"45201881"===e.substring(0,8)||"45206401"===e.substring(0,8)||"45245294"===e.substring(0,8)||"45314944"===e.substring(0,8)||"45317847"===e.substring(0,8)||"45357409"===e.substring(0,8)||"45374587"===e.substring(0,8)||"45394705"===e.substring(0,8)||"45456584"===e.substring(0,8)||"45541924"===e.substring(0,8)||"45545795"===e.substring(0,8)||"45567746"===e.substring(0,8)||"45583759"===e.substring(0,8)||"45648838"===e.substring(0,8)||"45672506"===e.substring(0,8)||"45678421"===e.substring(0,8)||"45710756"===e.substring(0,8)||"45716006"===e.substring(0,8)||"45725029"===e.substring(0,8)||"45732113"===e.substring(0,8)||"45732698"===e.substring(0,8)||"45793917"===e.substring(0,8)||"45841185"===e.substring(0,8)||"45862021"===e.substring(0,8)||"45915336"===e.substring(0,8)||"45971496"===e.substring(0,8)?this.issuer=31:"51"===e.substring(0,2)||"52"===e.substring(0,2)||"53"===e.substring(0,2)||"54"===e.substring(0,2)||"55"===e.substring(0,2)?this.issuer=15:"589562"===e.substring(0,6)?this.issuer=24:"4"===e.substring(0,1)&&(this.issuer=1),this.selectedCreditCard())},e.prototype.onPaste=function(){return!1},e.decorators=[{type:t.Component,args:[{selector:"sps-form-pay",template:'\x3c!-- https://github.com/decidir/sdk-javascript-v2 --\x3e\r\n\r\n<form action="" method="POST" id="formulario" #f="ngForm" autocomplete="off">\r\n \x3c!-- Numero de tarjeta --\x3e\r\n <div class="formRow">\r\n <label for="card_number">{{ language.toLowerCase() === \'en\' ? \'Card number\' : \'Número de Tarjeta\' }}</label>\r\n <span>\r\n <input id="card_number"\r\n type="text"\r\n name="card"\r\n placeholder="{{ language.toLowerCase() === \'en\' ? \'Card number\' : \'Número de Tarjeta\' }}"\r\n minlength="12"\r\n maxlength="19"\r\n data-decidir="card_number"\r\n required\r\n (input)="onCardChange()"\r\n (paste)="onPaste()"\r\n [disabled]="disabled"\r\n [(ngModel)]="cardText"\r\n #card="ngModel" />\r\n </span>\r\n <p class="alert-text" *ngIf="card.errors?.required && submitPressed">\r\n {{ language.toLowerCase() === \'en\' ? \'Required\' : \'Completá el número de tarjeta\' }}\r\n </p>\r\n <p class="alert-text" *ngIf="card.errors?.minlength && submitPressed">\r\n {{ language.toLowerCase() === \'en\' ? \'Required\' : \'Requiere 13 digitos mínimo\' }}\r\n </p>\r\n </div>\r\n\r\n \x3c!-- Card-issuer --\x3e\r\n <div class="formRow">\r\n <label>{{ language.toLowerCase() === \'en\' ? \'Pay with\' : \'Pagar con\' }}</label>\r\n <div class="select-icon">\r\n <select name="iss"\r\n required\r\n #iss="ngModel"\r\n [disabled]="disabled"\r\n (change)="selectedCreditCard()"\r\n [(ngModel)]="issuer">\r\n <option [value]="null" selected disabled>\r\n {{ language.toLowerCase() === \'en\' ? \'SELECT...\' : \'Sin Seleccionar...\' }}\r\n </option>\r\n <ng-container *ngIf="currency === \'USD\'; else credCardsArgTemplate">\r\n <option [value]="1">Visa</option>\r\n <option [value]="15">MasterCard</option>\r\n </ng-container>\r\n <ng-template #credCardsArgTemplate>\r\n <option [ngValue]="item.id" *ngFor="let item of creditCards">{{item.name}}</option>\r\n </ng-template>\r\n </select>\r\n </div>\r\n <p class="alert-text" *ngIf="iss.invalid && submitPressed">\r\n {{ language.toLowerCase() === \'en\' ? \'Required\' : \'Seleccioná el emisor de la tarjeta\' }}\r\n </p>\r\n </div>\r\n\r\n <div class="formRow">\r\n <div class="form-row-2col">\r\n \x3c!-- Expiry-month--\x3e\r\n <div class="formRow">\r\n <label>\r\n {{ language.toLowerCase() === \'en\' ? \'Month of expiration\' : \'Mes de expiración\' }}\r\n </label>\r\n <span>\r\n <input type="text"\r\n name="month"\r\n placeholder="MM"\r\n minlength="2"\r\n maxlength="2"\r\n data-decidir="card_expiration_month"\r\n required\r\n [disabled]="disabled"\r\n (input)="onMonthChange()"\r\n (focusout)="onMonthLostFocus()"\r\n (paste)="onPaste()"\r\n [(ngModel)]="monthText"\r\n #month="ngModel" />\r\n </span>\r\n </div>\r\n \x3c!-- Expiry-year--\x3e\r\n <div class="formRow">\r\n <label>\r\n {{ language.toLowerCase() === \'en\' ? \'Year of expiration\' : \'Año de expiración\' }}\r\n </label>\r\n <span>\r\n <input type="text"\r\n name="year"\r\n placeholder="AA"\r\n minlength="2"\r\n maxlength="2"\r\n data-decidir="card_expiration_year"\r\n required\r\n [disabled]="disabled"\r\n (input)="onYearChange()"\r\n (blur)="onYearBlur($event)"\r\n (paste)="onPaste()"\r\n [(ngModel)]="yearText"\r\n #year="ngModel"/>\r\n </span>\r\n </div>\r\n </div>\r\n <p class="alert-text" *ngIf="month.invalid && submitPressed">\r\n {{ language.toLowerCase() === \'en\' ? \'Required\' : \'Completá el mes de vencimiento de la tarjeta\' }}</p>\r\n <p class="alert-text" *ngIf="year.invalid && submitPressed">\r\n {{ language.toLowerCase() === \'en\' ? \'Required\' : \'Completá el año de vencimiento de la tarjeta\' }}</p>\r\n <p class="alert-text" *ngIf="invalidDate">\r\n {{ language.toLowerCase() === \'en\' ? \'Enter a valid expiration date\' : \'La fecha de la tarjeta ingresada está vencida\'}}\r\n </p>\r\n </div>\r\n\r\n \x3c!-- Card-name --\x3e\r\n <div class="formRow">\r\n <label>\r\n {{ language.toLowerCase() === \'en\' ? \'Holder name\' : \'Nombre y apellido impreso en la tarjeta\' }}\r\n </label>\r\n\r\n <span>\r\n <input type="text"\r\n name="payername"\r\n placeholder="{{language.toLowerCase() === \'en\' ? \'Holder name\' : \'TITULAR\'}}" value="{{payerName}}"\r\n maxlength="22"\r\n data-decidir="card_holder_name"\r\n required\r\n [disabled]="disabled"\r\n (input)="onPayerNameChange()"\r\n (paste)="onPaste()"\r\n [(ngModel)]="payerNameText"\r\n #payername="ngModel" />\r\n </span>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!payername.valid && submitPressed">\r\n {{ language.toLowerCase() === \'en\' ? \'Required\' : \'Completá el nombre del titular de la tarjeta\' }}\r\n </p>\r\n </div>\r\n\r\n <div class="formRow" *ngIf="currency === \'USD\'">\r\n <input type="hidden" data-decidir="card_holder_doc_type" name="type">\r\n <input type="hidden" data-decidir="card_holder_doc_number" name="dni">\r\n </div>\r\n\r\n\r\n <div class="formRow" *ngIf="currency === \'ARS\'">\r\n <label for="card_holder_doc_type">Número de documento del titular</label>\r\n <div class="form-row-2col">\r\n \x3c!-- Tipo de documento--\x3e\r\n <div class="formRow">\r\n <div class="select-icon">\r\n <select data-decidir="card_holder_doc_type" ngModel required #type="ngModel" name="type"\r\n [disabled]="disabled">\r\n <option value="" disabled selected>Seleccionar...</option>\r\n <option value="dni">DNI</option>\r\n <option value="cuil">CUIL</option>\r\n </select>\r\n </div>\r\n </div>\r\n \x3c!-- DNI --\x3e\r\n <div class="formRow">\r\n <span>\r\n <input id="card_holder_doc_type"\r\n type="text"\r\n name="dni"\r\n minlength="7"\r\n maxlength="11"\r\n data-decidir="card_holder_doc_number"\r\n required\r\n [disabled]="disabled"\r\n (input)="onDniChange()"\r\n (paste)="onPaste()"\r\n [(ngModel)]="dniText"\r\n #dni="ngModel" />\r\n </span>\r\n </div>\r\n </div>\r\n <p class="alert-text" *ngIf="type.invalid && submitPressed">Seleccioná tipo de documento</p>\r\n <p class="alert-text" *ngIf="dni.errors?.minlength && submitPressed">Requiere 7 digitos mínimo</p>\r\n <p class="alert-text" *ngIf="dni.errors?.required && submitPressed">Completá el número de documento</p>\r\n </div>\r\n \x3c!-- CVV --\x3e\r\n <div class="formRow">\r\n <label for="security_code">{{ language.toLowerCase() === \'en\' ? \'CSC\' : \'Código de seguridad\' }}</label>\r\n <span>\r\n <input id="security_code"\r\n type="text"\r\n name="cvc"\r\n placeholder="CSC"\r\n minlength="3"\r\n maxlength="4"\r\n data-decidir="security_code"\r\n required\r\n [disabled]="disabled"\r\n (input)="onCodeChange()"\r\n (paste)="onPaste()"\r\n [(ngModel)]="cvcText"\r\n #cvc="ngModel" />\r\n </span>\r\n <p class="alert-text" *ngIf="cvc.errors?.minlength && submitPressed">\r\n {{ language.toLowerCase() === \'en\' ? \'Enter a valid csc\' : \'Requiere 3 digitos mínimo\' }}\r\n </p>\r\n <p class="alert-text" *ngIf="cvc.errors?.required && submitPressed">\r\n {{ language.toLowerCase() === \'en\' ? \'Required\' : \'Completá el código de seguridad\' }}\r\n </p>\r\n </div>\r\n\r\n \x3c!-- Cuotas --\x3e\r\n <ng-container *ngIf="currency === \'ARS\'">\r\n <div class="formRow">\r\n <label>Cuotas</label>\r\n <div class="select-icon">\r\n <select name="ins"\r\n required\r\n [disabled]="disabled"\r\n [(ngModel)]="selectCreditCardPlan"\r\n (change)="selectedCreditCardPlan()"\r\n #ins="ngModel">\r\n <option [value]="null" selected disabled>Sin Seleccionar...</option>\r\n <option [ngValue]="item" *ngFor="let item of creditCardPlans">{{ item.description }}</option>\r\n </select>\r\n </div>\r\n <p class="alert-text" *ngIf="ins.invalid && submitPressed">Seleccioná cantidad de cuotas</p>\r\n </div>\r\n </ng-container>\r\n\r\n <div>\r\n <div>\r\n <div class="amount-resume" *ngIf="f.valid">\r\n <ng-container *ngIf="currency === \'ARS\'">\r\n <p>Total al contado</p>\r\n <h1>$ {{ totalAmount | number:\'2.2-2\' }}</h1>\r\n <p>Total financiado</p>\r\n <h3>$ {{ totalFinancedAmount | number:\'2.2-2\'}}</h3>\r\n <p>TEA: {{ currentTEA }}%</p>\r\n <p>CFT: {{ currentCFT }}%</p>\r\n </ng-container>\r\n <ng-container *ngIf="currency === \'USD\'">\r\n <p>Total</p>\r\n <h1>{{ labelButton }}</h1>\r\n </ng-container>\r\n <div *ngIf="paymentState === \'unsubmitted\' || paymentState === \'error\'">\r\n <button *ngIf="currency === \'ARS\'" type="submit" (click)="onSubmit($event)">\r\n Pagar ${{ totalFinancedAmount | number:\'2.2-2\' }}\r\n </button>\r\n\r\n <button *ngIf="currency === \'USD\'" type="submit" (click)="onSubmit($event)">\r\n {{ labelButton }}\r\n </button>\r\n </div>\r\n <div *ngIf="paymentState === \'success\' || paymentState === \'processing\'">\r\n <button *ngIf="currency === \'ARS\'" disabled>Pagar $ {{totalFinancedAmount | number:\'2.2-2\'}}</button>\r\n <button *ngIf="currency === \'USD\'" disabled>{{ labelButton }}</button>\r\n </div>\r\n </div>\r\n <p [hidden]="disabled" class="alert-text" *ngIf="!f.valid">\r\n {{ language.toLowerCase() === \'en\' ? \'Complete all fields\' : \'Completá los campos faltantes\' }}\r\n </p>\r\n <div *ngIf="!f.valid && paymentState !== \'success\'">\r\n <button *ngIf="currency === \'ARS\'" type="submit" (click)="onSubmit($event)">Pagar $\r\n {{ paymentAmount | number:\'2.2-2\' }}\r\n </button>\r\n <button *ngIf="currency === \'USD\'" type="submit" (click)="onSubmit($event)">\r\n {{ labelButton }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class="logo">\r\n <img [src]="logoSps" alt="SPS Decidir" class="responsive-img" style="width: 50px;">\r\n </div>\r\n <div>\r\n <div class="pay-message info" *ngIf="paymentState === \'processing\'">\r\n <i class="material-icons">info</i>\r\n <p>\r\n {{ language.toLowerCase() === \'en\' ? \'Processing payment...\' : \'Procesando pago...\' }}\r\n </p>\r\n </div>\r\n <div class="pay-message error" *ngIf="paymentState === \'error\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n {{errorMessage}}\r\n <br>\r\n {{ language.toLowerCase() === \'en\' ? \'Error processing the payment\' : \'No se procesó el pago\' }}\r\n </p>\r\n </div>\r\n <div *ngIf="language.toLowerCase() !== \'en\' && paymentState === \'success\'" class="pay-message success">\r\n <i class="material-icons">check_circle</i>\r\n <p>\r\n Tu pago se ha confirmado!\r\n <br>\r\n Estos son los datos de la transacción:\r\n </p>\r\n <i class="data">Nro. de Pago: {{paymentSuccessInfo.payment_id}}</i>\r\n <i class="data">Ticket: {{paymentSuccessInfo.ticket}}</i>\r\n <i class="data">Cod. Autorización: {{paymentSuccessInfo.card_authorization_code}}</i>\r\n </div>\r\n\r\n <div *ngIf="language.toLowerCase() === \'en\' && paymentState === \'success\'" class="pay-message success">\r\n <i class="material-icons">check_circle</i>\r\n <p>\r\n Your payment has been confirmed!\r\n <br>\r\n These are the transaction data:\r\n </p>\r\n <i class="data">Payment No.: {{paymentSuccessInfo.payment_id}}</i>\r\n <i class="data">Ticket: {{paymentSuccessInfo.ticket}}</i>\r\n <i class="data">Authorization Code: {{paymentSuccessInfo.card_authorization_code}}</i>\r\n </div>\r\n\r\n <div class="pay-message error" *ngIf="paymentState === \'apiError\'">\r\n <i class="material-icons">error</i>\r\n <p>\r\n {{ language.toLowerCase() === \'en\' ? \'Error processing the payment (Vitnik)\' : \'Error al procesar el pago (Vitnik)\'}}\r\n </p>\r\n </div>\r\n </div>\r\n</form>\r\n',styles:['@charset "UTF-8";.flex-row-wrap{display:flex;flex-flow:row wrap;flex-direction:row;justify-content:space-between;align-items:center}.flex-row-wrap div{margin:10px;width:200px;flex-grow:1}#formulario{background-color:transparent;font-family:inherit,sans-serif}#formulario label{font-size:14px;color:#888}.formRow{margin-top:10px}.form-row-2col{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.form-row-2col .formRow{width:49%;margin-top:0}.form-row-3col{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.form-row-3col .formRow{width:32%;margin-top:0}span{background-color:#fff;border:.5px solid #707070;border-radius:2px;padding:2px 10px;display:block;margin-top:4px}input[type=password],input[type=text]{background:0 0;border:none;color:#000;font-size:15px;height:23px;width:100%;text-transform:uppercase;vertical-align:top}select{width:100%;font-size:15px;height:30px;padding:2px 10px;border:.5px solid #707070;border-radius:2px;display:block;margin-top:4px;-webkit-appearance:none;-moz-appearance:none;position:relative;z-index:1;background:0 0}.select-icon{position:relative}.select-icon::after{content:"";font-family:"Material Icons";position:absolute;right:5px;top:3px;font-size:24px}.icon-select{width:24px;position:absolute;right:13px}.alert-text{font-size:15px;color:#009ee3;margin-top:7px;margin-bottom:0}:focus{outline:0}.pay-message{margin-top:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px}.pay-message p{font-size:1.1rem;text-align:center;line-height:130%;margin-bottom:10px}.pay-message i.data{font-size:.9rem;text-align:center}.pay-message i.material-icons{font-size:2rem;margin-bottom:5px}.success{background-color:#dff2bf;color:#4f8a10}.error{color:#d8000c;background-color:#ffd2d2}.info{color:#00529b;background-color:#bde5f8}button{background-color:#009ee3;color:#fff;font-size:18px;text-align:center;padding:10px 0;width:100%;border:none;border-radius:20px;margin-top:20px;cursor:pointer}button:disabled{background-color:#525252;cursor:default}.amount-resume h1,.amount-resume h3{margin-top:0;margin-bottom:10px}.amount-resume p{font-size:13px;color:#525252;margin:5px 0;text-transform:uppercase;line-height:130%}.logo{display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-end;padding-top:10px}.responsive-img{width:100%;height:auto}']}]}],e.ctorParameters=function(){return[{type:a.Router},{type:g}]},e.propDecorators={checkOutForm:[{type:t.ViewChild,args:["f",{static:!1}]}],accessToken:[{type:t.Input}],spsUrlApi:[{type:t.Input}],vkUrlApi:[{type:t.Input}],paymentAmount:[{type:t.Input}],logoSps:[{type:t.Input}],currency:[{type:t.Input}],publishableKey:[{type:t.Input}],successUrl:[{type:t.Input}],failureUrl:[{type:t.Input}],useCybersource:[{type:t.Input}],debugLog:[{type:t.Input}],storeId:[{type:t.Input}],idVen:[{type:t.Input}],data:[{type:t.Input}],labelButton:[{type:t.Input}],language:[{type:t.Input}],statusPay:[{type:t.Output}]},e}();var f=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,n.FormsModule,i.HttpClientModule,a.RouterModule],declarations:[h],exports:[h]}]}],e}(),y=[p,f,m],b=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:y,exports:y}]}],e}();e.VkPaymentsModule=b,e.ɵa=p,e.ɵb=d,e.ɵc=o,e.ɵd=c,e.ɵe=f,e.ɵf=h,e.ɵg=g,e.ɵh=m,e.ɵi=u,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=vk-payments.umd.min.js.map

@@ -256,3 +256,3 @@ /**

if (res.length > 0) {
if (this.issuerId != undefined && res.length > 1) {
if (this.issuerId != undefined && res.length > 1 && this.currentPaymentMethod.length > 0) {
/** @type {?} */

@@ -263,3 +263,5 @@ const result = res.filter((/**

*/
card => card.issuer.id === this.issuerId));
card => card.issuer.id === this.issuerId && card.payment_method_id === this.currentPaymentMethod[0].id));
console.log("result");
console.log(result);
this.currentInstallments = result[0].payer_costs;

@@ -603,2 +605,2 @@ this.issuerId = result[0].issuer.id;

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVyY2Fkb3BhZ28uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vdmstcGF5bWVudHMvIiwic291cmNlcyI6WyJsaWIvbWVyY2Fkb3BhZ28vY29tcG9uZW50cy9tZXJjYWRvcGFnby5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBcUIsTUFBTSxFQUFpQixTQUFTLEVBQUUsTUFBTSxlQ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ICAgICBkb2NOdW1iZXI6IHRoaXMuZG5pVGV4dFxuICAgICAgfTtcblxuICAgICAgaWYgKHRoaXMuZGVidWdMb2cpIHtcbiAgICAgICAgY29uc29sZS5sb2coJ3NlbmRGb3JtJywgc2VuZEZvcm0pO1xuICAgICAgfVxuXG4gICAgICBpZiAodGhpcy50b2tlbklkICE9PSAnJykge1xuICAgICAgICBNZXJjYWRvcGFnby5jbGVhclNlc3Npb24oKTtcbiAgICAgIH1cblxuICAgICAgdGhpcy5jcmVhdGVUb2tlbihzZW5kRm9ybSk7XG4gICAgfVxuICB9XG5cbiAgLy8gSW5wdXQgY29udHJvbHNcbiAgb25ZZWFyQ2hhbmdlKCkge1xuICAgIGlmIChpc05hTigrdGhpcy55ZWFyVGV4dCkpIHtcbiAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICB0aGlzLnllYXJUZXh0ID0gJyc7XG4gICAgICB9KTtcbiAgICB9XG4gIH1cblxuICBvbk1vbnRoTG9zdEZvY3VzKCkge1xuICAgIGlmICgrdGhpcy5tb250aFRleHQgPiAwICYmICFpc05hTigrdGhpcy5tb250aFRleHQpKSB7XG4gICAgICBpZiAodGhpcy5tb250aFRleHQgPT0gJzEnKSB7XG4gICAgICAgIHRoaXMubW9udGhUZXh0ID0gJzAxJztcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICBvbk1vbnRoQ2hhbmdlKCkge1xuICAgIGlmICgrdGhpcy5tb250aFRleHQgPj0gMCAmJiArdGhpcy5tb250aFRleHQgPCAxMyAmJiAhaXNOYU4oK3RoaXMubW9udGhUZXh0KSkge1xuICAgICAgc3dpdGNoICh0aGlzLm1vbnRoVGV4dCkge1xuICAgICAgICBjYXNlICcyJzoge1xuICAgICAgICAgIHRoaXMubW9udGhUZXh0ID0gJzAyJztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBjYXNlICczJzoge1xuICAgICAgICAgIHRoaXMubW9udGhUZXh0ID0gJzAzJztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBjYXNlICc0Jzoge1xuICAgICAgICAgIHRoaXMubW9udGhUZXh0ID0gJzA0JztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBjYXNlICc1Jzoge1xuICAgICAgICAgIHRoaXMubW9udGhUZXh0ID0gJzA1JztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBjYXNlICc2Jzoge1xuICAgICAgICAgIHRoaXMubW9udGhUZXh0ID0gJzA2JztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBjYXNlICc3Jzoge1xuICAgICAgICAgIHRoaXMubW9udGhUZXh0ID0gJzA3JztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBjYXNlICc4Jzoge1xuICAgICAgICAgIHRoaXMubW9udGhUZXh0ID0gJzA4JztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBjYXNlICc5Jzoge1xuICAgICAgICAgIHRoaXMubW9udGhUZXh0ID0gJzA5JztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgdGhpcy5tb250aFRleHQgPSAnJztcbiAgICAgIH0pO1xuICAgIH1cbiAgfVxuXG4gIG9uQ29kZUNoYW5nZSgpIHtcbiAgICBpZiAoaXNOYU4oK3RoaXMuY3ZjVGV4dCkpIHtcbiAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICB0aGlzLmN2Y1RleHQgPSAnJztcbiAgICAgIH0pO1xuICAgIH1cbiAgfVxuICBvbkRuaUNoYW5nZSgpIHtcbiAgICBpZiAoaXNOYU4oK3RoaXMuZG5pVGV4dCkpIHtcbiAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICB0aGlzLmRuaVRleHQgPSAnJztcbiA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yOiAnTVAnIH07XG4gICAgaWYgKHRoaXMuY2hlY2tPdXRGb3JtLnZhbGlkKSB7XG4gICAgICBjb25zdCBzZW5kRm9ybSA9IHtcbiAgICAgICAgY2FyZE51bWJlcjogdGhpcy5jYXJkVGV4dCxcbiAgICAgICAgc2VjdXJpdHlDb2RlOiB0aGlzLmN2Y1RleHQsXG4gICAgICAgIGNhcmRFeHBpcmF0aW9uTW9udGg6IHRoaXMubW9udGhUZXh0LFxuICAgICAgICBjYXJkRXhwaXJhdGlvblllYXI6IHRoaXMueWVhclRleHQsXG4gICAgICAgIGNhcmRob2xkZXJOYW1lOiB0aGlzLmRlZmF1bHROYW1lLFxuICAgICAgICBkb2NUeXBlOiB0aGlzLmRlZmF1bHREb2NUeXBlLFxuICAgICAgICBkb2NOdW1iZXI6IHRoaXMuZG5pVGV4dFxuICAgICAgfTtcblxuICAgICAgaWYgKHRoaXMuZGVidWdMb2cpIHtcbiAgICAgICAgY29uc29sZS5sb2coJ3NlbmRGb3JtJywgc2VuZEZvcm0pO1xuICAgICAgfVxuXG4gICAgICBpZiAodGhpcy50b2tlbklkICE9PSAnJykge1xuICAgICAgICBNZXJjYWRvcGFnby5jbGVhclNlc3Npb24oKTtcbiAgICAgIH1cblxuICAgICAgdGhpcy5jcmVhdGVUb2tlbihzZW5kRm9ybSk7XG4gICAgfVxuICB9XG5cbiAgLy8gSW5wdXQgY29udHJvbHNcbiAgb25ZZWFyQ2hhbmdlKCkge1xuICAgIGlmIChpc05hTigrdGhpcy55ZWFyVGV4dCkpIHtcbiAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICB0aGlzLnllYXJUZXh0ID0gJyc7XG4gICAgICB9KTtcbiAgICB9XG4gIH1cblxuICBvbk1vbnRoTG9zdEZvY3VzKCkge1xuICAgIGlmICgrdGhpcy5tb250aFRleHQgPiAwICYmICFpc05hTigrdGhpcy5tb250aFRleHQpKSB7XG4gICAgICBpZiAodGhpcy5tb250aFRleHQgPT0gJzEnKSB7XG4gICAgICAgIHRoaXMubW9udGhUZXh0ID0gJzAxJztcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICBvbk1vbnRoQ2hhbmdlKCkge1xuICAgIGlmICgrdGhpcy5tb250aFRleHQgPj0gMCAmJiArdGhpcy5tb250aFRleHQgPCAxMyAmJiAhaXNOYU4oK3RoaXMubW9udGhUZXh0KSkge1xuICAgICAgc3dpdGNoICh0aGlzLm1vbnRoVGV4dCkge1xuICAgICAgICBjYXNlICcyJzoge1xuICAgICAgICAgIHRoaXMubW9udGhUZXh0ID0gJzAyJztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBjYXNlICczJzoge1xuICAgICAgICAgIHRoaXMubW9udGhUZXh0ID0gJzAzJztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBjYXNlICc0Jzoge1xuICAgICAgICAgIHRoaXMubW9udGhUZXh0ID0gJzA0JztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBjYXNlICc1Jzoge1xuICAgICAgICAgIHRoaXMubW9udGhUZXh0ID0gJzA1JztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBjYXNlICc2Jzoge1xuICAgICAgICAgIHRoaXMubW9udGhUZXh0ID0gJzA2JztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBjYXNlICc3Jzoge1xuICAgICAgICAgIHRoaXMubW9udGhUZXh0ID0gJzA3JztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBjYXNlICc4Jzoge1xuICAgICAgICAgIHRoaXMubW9udGhUZXh0ID0gJzA4JztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBjYXNlICc5Jzoge1xuICAgICAgICAgIHRoaXMubW9udGhUZXh0ID0gJzA5JztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0gZWxzZSB7XG4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ments",
"version": "0.0.3",
"version": "0.0.4",
"peerDependencies": {

@@ -5,0 +5,0 @@ "@angular/common": "^8.2.11",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc