@pixelpay/sdk-core 2.4.9 → 2.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/lib/base/Helpers.d.ts +7 -1
- package/lib/base/Helpers.js +16 -0
- package/lib/base/Helpers.js.map +1 -1
- package/lib/browser/index.js +1 -1
- package/lib/libraries/CardinalManager.js +3 -3
- package/lib/libraries/CardinalManager.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ El formato se basa en [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
5
5
|
y este proyecto se adhiere a [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
Tipos de cambios: `Added`, `Changed`, `Deprecated`, `Removed`, `Fixed`, `Security`.
|
|
7
7
|
|
|
8
|
+
## [v2.4.10] - 2026-02-09
|
|
9
|
+
### Fixed
|
|
10
|
+
- Se arregló procesamiento de mensajes no deseados en Cardinal API
|
|
11
|
+
|
|
8
12
|
## [v2.4.9] - 2026-02-09
|
|
9
13
|
### Changed
|
|
10
14
|
- Se hizó ajustes de logs para errores Cardinal API
|
package/lib/base/Helpers.d.ts
CHANGED
|
@@ -44,7 +44,13 @@ declare const _default: {
|
|
|
44
44
|
*
|
|
45
45
|
* @param data
|
|
46
46
|
*/
|
|
47
|
-
serialize(data: any):
|
|
47
|
+
serialize(data: any): any;
|
|
48
|
+
/**
|
|
49
|
+
* Safely parse a potential plain JSON object.
|
|
50
|
+
*
|
|
51
|
+
* @param data
|
|
52
|
+
*/
|
|
53
|
+
safeParse(data: any): any | null;
|
|
48
54
|
/**
|
|
49
55
|
* Append website script and load
|
|
50
56
|
*
|
package/lib/base/Helpers.js
CHANGED
|
@@ -85,6 +85,22 @@ exports.default = {
|
|
|
85
85
|
const properties = Object.getOwnPropertyNames(data !== null && data !== void 0 ? data : {});
|
|
86
86
|
return JSON.parse(JSON.stringify(data, properties));
|
|
87
87
|
},
|
|
88
|
+
/**
|
|
89
|
+
* Safely parse a potential plain JSON object.
|
|
90
|
+
*
|
|
91
|
+
* @param data
|
|
92
|
+
*/
|
|
93
|
+
safeParse(data) {
|
|
94
|
+
if (typeof data === 'object') {
|
|
95
|
+
return data;
|
|
96
|
+
}
|
|
97
|
+
try {
|
|
98
|
+
return JSON.parse(data);
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
},
|
|
88
104
|
/**
|
|
89
105
|
* Append website script and load
|
|
90
106
|
*
|
package/lib/base/Helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Helpers.js","sourceRoot":"","sources":["../../src/base/Helpers.ts"],"names":[],"mappings":";;AAAA,yCAAwC;AAExC,kBAAe;IACd;;;;;OAKG;IACH,YAAY,CAAC,KAAU;QACtB,MAAM,QAAQ,qBAAQ,KAAK,CAAE,CAAC;QAE9B,KAAK,IAAI,QAAQ,IAAI,QAAQ,EAAE;YAC9B,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,IAAI,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,SAAS,EAAE;gBACpE,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAC;aAC1B;SACD;QAED,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CAAC,SAAiB,EAAE,KAAa;QACpC,QAAQ,SAAS,EAAE;YAClB,KAAK,KAAK;gBACT,OAAO,IAAA,eAAG,EAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;YAE9B,KAAK,SAAS;gBACb,OAAO,IAAA,kBAAM,EAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;YAEjC;gBACC,OAAO,EAAE,CAAC;SACX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(1396);a.default={objectToJson(e){const a=Object.assign({},e);for(var t in a)null!==a[t]&&void 0!==a[t]||delete a[t];return JSON.stringify(a)},hash(e,a){switch(e){case"MD5":return(0,n.MD5)(a).toString();case"SHA-512":return(0,n.SHA512)(a).toString();default:return""}},trimValue:e=>e?e.trim():null,cleanString:e=>e?e.replace(/\s/g,""):null,parseAmount:e=>"number"==typeof e&&e>0?String(e):null,checkIsBrowser:()=>"undefined"!=typeof window&&void 0!==window.document,serialize(e){const a=Object.getOwnPropertyNames(null!=e?e:{});return JSON.parse(JSON.stringify(e,a))},addScriptToWebsite:e=>new Promise((a,t)=>{const r=(0,n.MD5)(e).toString(),i=document.createElement("script");document.querySelector(`script[id="${r}"]`)?a(!0):(i.id=r,i.src=e,i.type="text/javascript",i.onload=a,i.onerror=t,document.body.appendChild(i))}),addStylesById(e,a){if(document.getElementById(`styles-${e}`))return;const t=document.createElement("style");t.id=`styles-${e}`,t.innerHTML=a,document.head.appendChild(t)},addSecureForm(e,a){const t=document.createElement("iframe");t.id="cardinal_collection_iframe",t.name="collectionIframe",t.height="10",t.width="10",t.style.display="none",document.body.appendChild(t);const n=document.createElement("form");n.id="cardinal_collection_form",n.method="POST",n.target="collectionIframe",n.action=a;const r=document.createElement("input");return r.type="hidden",r.name="JWT",r.value=e,n.appendChild(r),document.body.appendChild(n),n},removeElementById(e){const a=document.getElementById(e);a&&a.remove()},convertWindowSizeToDimensions:e=>({"01":{width:"250",height:"400"},"02":{width:"390",height:"400"},"03":{width:"500",height:"600"},"04":{width:"600",height:"400"},"05":{width:"100%",height:"100%"}}[e||"02"]||{width:"390",height:"400"})}},2823(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i=n(t(1333));a.default=class{constructor(){this.env=null,this.lang=null,this.from=null,this.sdk_version=null,this.lang=Intl.DateTimeFormat().resolvedOptions().locale,this.from="sdk-javascript",this.sdk_version=i.default,"es"!=this.lang&&"en"!=this.lang&&(this.lang="es")}toJson(){return r.default.objectToJson(this)}}},2624(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634));a.default=class{constructor(){this.action=null,this.success=!1,this.message=null,this.data=void 0,this.errors=void 0}setStatus(e){this.status=e}getStatus(){return this.status}inputHasError(e){return!!this.errors&&this.errors.hasOwnProperty(e)}getData(e){return this.data&&this.data.hasOwnProperty(e)&&this.data[e]||null}toJson(){return r.default.objectToJson(this)}}},4013(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(6425)),i=n(t(3292)),o=n(t(2624)),s=n(t(1935)),l=n(t(4575)),u=n(t(5037)),c=n(t(7071)),d=n(t(2046)),h=n(t(4756)),p=n(t(7867)),f=n(t(2701)),S=n(t(3596)),m=n(t(9250)),g=n(t(8618));a.default=class{constructor(e){this.settings=e}buildRequest(e,a){if(!this.settings.auth_key||!this.settings.auth_hash)throw new i.default("The merchant credentials are not definied (key/hash).");null!=this.settings.environment&&(a.env=this.settings.environment),null!=this.settings.lang&&(a.lang=this.settings.lang),null!=this.settings.sdk&&(a.from=this.settings.sdk),null!=this.settings.sdk_version&&(a.sdk_version=this.settings.sdk_version);const t={Accept:"application/json","Content-Type":"application/json","x-auth-key":this.settings.auth_key,"x-auth-hash":this.settings.auth_hash};if(this.settings.auth_user&&(t["x-auth-user"]=this.settings.auth_user),this.settings.headers)for(const e in this.settings.headers)t[e]=this.settings.headers[e];return r.default.create({baseURL:this.settings.endpoint,timeout:6e4,headers:t,validateStatus:()=>!0})}parseResponse(e,a){let t=new o.default;switch(a){case 200:t=new m.default;break;case 202:t=new p.default;break;case 400:t=new s.default;break;case 401:case 403:t=new d.default;break;case 402:t=new f.default;break;case 404:case 405:case 406:t=new h.default;break;case 408:t=new g.default;break;case 412:case 418:t=new S.default;break;case 422:t=new u.default;break;case 500:t=new l.default;break;default:a>500&&(t=new c.default)}return t.status=a,t.action=(null==e?void 0:e.action)||null,t.success=(null==e?void 0:e.success)||!1,t.message=(null==e?void 0:e.message)||null,t.data=(null==e?void 0:e.data)||null,t.errors=(null==e?void 0:e.errors)||null,t}exceptionResponse(e){const a=new l.default;return a.status=520,a.success=!1,a.message=e.message,a}getRoute(e){return this.settings.endpoint+"/"+e}async post(e,a){try{const t=await this.buildRequest(e,a).post(e,JSON.parse(a.toJson()));return this.parseResponse(t.data,t.status)}catch(e){return this.exceptionResponse(e)}}async put(e,a){try{const t=await this.buildRequest(e,a).put(e,JSON.parse(a.toJson()));return this.parseResponse(t.data,t.status)}catch(e){return this.exceptionResponse(e)}}async delete(e,a){try{const t=await this.buildRequest(e,a).delete(e,{params:JSON.parse(a.toJson())});return this.parseResponse(t.data,t.status)}catch(e){return this.exceptionResponse(e)}}async get(e,a){try{const t=await this.buildRequest(e,a).get(e,{params:JSON.parse(a.toJson())});return this.parseResponse(t.data,t.status)}catch(e){return this.exceptionResponse(e)}}}},8282(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(9250));class i{constructor(){this.status=void 0,this.mask=void 0,this.network=void 0,this.type=void 0,this.bin=void 0,this.last=void 0,this.hash=void 0,this.address=void 0,this.country=void 0,this.state=void 0,this.city=void 0,this.zip=void 0,this.email=void 0,this.phone=void 0}static validateResponse(e){return e instanceof r.default}static fromResponse(e){const a=new i;return Object.getOwnPropertyNames(e.data).map(t=>{t in a&&(a[t]=e.data[t])}),a}}a.default=i},4940(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(9250)),i=n(t(2701)),o=n(t(8618));class s{constructor(){this.transaction_type=void 0,this.transaction_redeemed_points=void 0,this.transaction_approved_amount=void 0,this.transaction_amount=void 0,this.transaction_auth=void 0,this.transaction_terminal=void 0,this.transaction_merchant=void 0,this.response_cvn=void 0,this.response_avs=void 0,this.response_cavv=void 0,this.transaction_id=void 0,this.transaction_reference=void 0,this.transaction_time=void 0,this.transaction_date=void 0,this.response_approved=void 0,this.response_incomplete=void 0,this.response_code=void 0,this.response_time=void 0,this.response_reason=void 0,this.installment_type=void 0,this.installment_months=void 0,this.payment_uuid=void 0,this.payment_hash=void 0}static validateResponse(e){return e instanceof r.default||e instanceof i.default||e instanceof o.default}static fromResponse(e){const a=new s;return Object.getOwnPropertyNames(e.data).map(t=>{t in a&&(a[t]=e.data[t])}),a}}a.default=s},3292(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});class t extends Error{}a.default=t},1742(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});class t extends Error{}a.default=t},2350(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});class t extends Error{}a.default=t},3909(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.Services=a.Responses=a.Resources=a.Requests=a.Models=a.Exceptions=a.Entities=void 0;const r=n(t(8282)),i=n(t(4940)),o=n(t(3292)),s=n(t(1742)),l=n(t(2423)),u=n(t(8888)),c=n(t(8113)),d=n(t(7424)),h=n(t(9411)),p=n(t(6402)),f=n(t(388)),S=n(t(7473)),m=n(t(2210)),g=n(t(4282)),y=n(t(3331)),M=n(t(235)),A=n(t(3514)),B=n(t(1299)),_=n(t(1935)),T=n(t(4575)),C=n(t(5037)),v=n(t(7071)),N=n(t(2046)),b=n(t(4756)),L=n(t(7867)),w=n(t(2701)),R=n(t(3596)),E=n(t(9250)),I=n(t(8618)),k=n(t(4787)),P=n(t(6266));a.Entities={CardResult:r.default,TransactionResult:i.default},a.Exceptions={InvalidCredentialsException:o.default,InvalidTransactionTypeException:s.default},a.Models={Billing:l.default,Card:u.default,Item:c.default,Order:d.default,Settings:h.default},a.Requests={AuthTransaction:p.default,CaptureTransaction:f.default,SaleTransaction:S.default,VoidTransaction:m.default,StatusTransaction:g.default,CardTokenization:y.default,AuthTokenization:M.default},a.Resources={Environment:A.default,Locations:B.default},a.Responses={ErrorResponse:_.default,FailureResponse:T.default,InputErrorResponse:C.default,NetworkFailureResponse:v.default,NoAccessResponse:N.default,NotFoundResponse:b.default,PayloadResponse:L.default,PaymentDeclinedResponse:w.default,PreconditionalResponse:R.default,SuccessResponse:E.default,TimeoutResponse:I.default},a.Services={Tokenization:k.default,Transaction:P.default}},1574(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i=n(t(235)),o=n(t(4341)),s=n(t(5634)),l=n(t(3514)),u=n(t(4575)),c=n(t(1020)),d=n(t(2711)),h=n(t(1850));class p{constructor(e,a){this.direct_api=!1,this.settings=e,this.transaction=a,this.service=new c.default(this.settings)}static clearAllEvents(){r.default.checkIsBrowser()&&(d.default.hide(),void 0!==window.Cardinal&&(window.Cardinal.off("payments.setupComplete"),window.Cardinal.off("payments.validated"),window.Cardinal.onSetupCompleteBusy=!1,window.Cardinal.onValidatedBusy=!1))}async init(e,a){if(a){this.direct_api=!0,this.collection_url=a;const t=r.default.addSecureForm(e,a);return await this.startCardinalDirectApiTransaction(t).finally(()=>{this.listen_direct_message&&window.removeEventListener("message",this.listen_direct_message),r.default.removeElementById("step-up-form"),r.default.removeElementById("cardinal_collection_iframe"),r.default.removeElementById("cardinal_collection_form"),h.default.hide(),d.default.hide()})}const t=this.settings.environment===l.default.SANDBOX||this.settings.environment===l.default.STAGING,n=t?"stag":"";return await r.default.addScriptToWebsite(`https://songbird${n}.cardinalcommerce.com/edge/v1/songbird.js`),window.Cardinal.configure({payment:{framework:"inline"},logging:{level:t?"on":"off"}}),window.Cardinal.onSetupCompleteBusy=!1,window.Cardinal.onValidatedBusy=!1,await this.startCardinalTransaction(e,this)}startCardinalTransaction(e,a){return new Promise((t,n)=>{try{window.Cardinal.on("payments.setupComplete",async e=>{var n;if(window.Cardinal.onSetupCompleteBusy)return console.warn('Cardinal event "payments.setupComplete" is currently busy.');if(window.Cardinal.onSetupCompleteBusy=!0,void 0===e.sessionId||void 0!==e.sessionId&&(!e.sessionId||""==e.sessionId))throw new Error("Cardinal initial setup error.");const r=new s.default;r.fromPaymentTransaction(a.transaction),r.setRequiredEMVFields(),r.reference=e.sessionId;const i=await a.service.authenticationLookup(r);a.identifier=null===(n=null==i?void 0:i.data)||void 0===n?void 0:n.identifier,a.validationLookupResponse(i,t),window.Cardinal.onSetupCompleteBusy=!1}),window.Cardinal.on("payments.validated",async(e,n)=>{if("ERROR"!==(null==e?void 0:e.ActionCode)&&window.Cardinal.onValidatedBusy)return console.warn('Cardinal event "payments.validated" is currently busy.');if(window.Cardinal.onValidatedBusy=!0,void 0!==n&&n&&""!=n){const e=new o.default;e.payload=n,e.identifier=a.identifier,e.card_token=a.transaction.card_token,e.authenticate_token=a.transaction instanceof i.default;const r=await a.service.authenticationContinue(e);if(e.authenticate_token)return p.clearAllEvents(),t(r);const s=await a.service.retryTransaction(a.transaction);p.clearAllEvents(),t(s)}else if("NOACTION"==e.ActionCode){const e=await a.service.retryTransaction(a.transaction);p.clearAllEvents(),t(e)}else{const a=new u.default;a.setStatus(520),a.message=`Cardinal validation failed. ${e.ErrorDescription} (${e.ErrorNumber})`,a.data={},p.clearAllEvents(),t(a)}window.Cardinal.onValidatedBusy=!1}),window.Cardinal.on("ui.close",()=>{h.default.hide()}),window.Cardinal.on("ui.inline.setup",(e,a,t,n)=>{try{let n;if(void 0===e||void 0===a)throw new Error("Unable to process request due to invalid arguments");if("CCA"!==a.paymentType)throw new Error("Unsupported inline payment type found ["+a.paymentType+"]");switch(a.data.mode){case"static":h.default.show();let e=document.querySelector(".pixelpay-modal");document.querySelector("[without-sdk-modal]")&&(e=document.querySelector("[without-sdk-modal]")),n=e.querySelector(".pixelpay-modal-container")||e,e.setAttribute("data-size",a.data.challengeWindowSizeId);break;case"suppress":h.default.hide(),n=document.querySelector(".pixelpay-modal-container");break;default:throw new Error("Unsupported inline mode found ["+a.data.mode+"]")}n.innerHTML=e,t()}catch(e){n(e)}}),window.Cardinal.setup("init",{jwt:e})}catch(e){p.clearAllEvents(),n(e)}})}startCardinalDirectApiTransaction(e){return new Promise((a,t)=>{this.direct_api_resolve=a,this.direct_api_reject=t,this.listen_direct_message=async e=>{var a;try{if((null==e?void 0:e.origin)===this.settings.endpoint&&"pixelpay_continue"===(null===(a=e.data)||void 0===a?void 0:a.name))return await this.handleDirectApiContinue(e);if(e.origin!==new URL(this.collection_url).origin)return;const t=JSON.parse(e.data);if("profile.completed"===t.MessageType)return await this.handleDirectApiLookup(t)}catch(e){const a=new u.default;a.setStatus(520),a.message="No se pudo procesar la transacción, intenta de nuevo con otro dispositivo o navegador (1000)",a.data=r.default.serialize(e),t(a)}},window.addEventListener("message",this.listen_direct_message,!1),e.submit()})}async handleDirectApiContinue(e){var a,t;const n=null===(a=e.data)||void 0===a?void 0:a.error;if(n){const e=new u.default;return e.setStatus(520),e.message="No se pudo procesar la transacción, intenta de nuevo con otro dispositivo o navegador (1001)",e.data=r.default.serialize(n),this.direct_api_reject(e)}const i=null===(t=e.data)||void 0===t?void 0:t.identifier;if(!i){const e=new u.default;return e.setStatus(520),e.message="Identifier not found in the response.",e.data={},this.direct_api_reject(e)}this.identifier=i,h.default.hide();const o=await this.service.retryTransaction(this.transaction);return this.direct_api_resolve(o)}async handleDirectApiLookup(e){var a,t;const n=e.SessionId||(null===(a=e.Payload)||void 0===a?void 0:a.SessionId);if(!n){const e=new u.default;return e.setStatus(520),e.message="SessionId not found in the response.",e.data={},this.direct_api_reject(e)}const r=new s.default;r.fromPaymentTransaction(this.transaction),r.setRequiredEMVFields(),r.card_cvv=this.transaction.card_cvv,r.reference=n;const i=await this.service.authenticationLookup(r);if(this.identifier=null===(t=null==i?void 0:i.data)||void 0===t?void 0:t.identifier,await this.validationLookupResponse(i,this.direct_api_resolve),"continue"===i.action){const{continue_url:e,continue_payload:a,window_size:t}=i.data;this.submitChallengeForm(e,a,t,this.settings.auth_key)}}async validationLookupResponse(e,a){if(this.transaction.authentication_identifier=this.identifier,!e.success||["token_auth_success","token_auth_failed"].includes(e.action))return p.clearAllEvents(),a(e);if("continue"!=e.action){const e=await this.service.retryTransaction(this.transaction);return p.clearAllEvents(),a(e)}this.direct_api||window.Cardinal.continue("cca",{AcsUrl:e.data.continue_url,Payload:e.data.continue_payload},{OrderDetails:{TransactionId:e.data.transaction_id,OrderNumber:this.transaction.order_id,CurrencyCode:this.transaction.order_currency}})}submitChallengeForm(e,a,t,n){h.default.show(),t=null!=t?t:"02";const{width:i,height:o}=r.default.convertWindowSizeToDimensions(t);let s=document.querySelector('iframe[name="step-up-iframe"]');s||(s=document.createElement("iframe"),s.name="step-up-iframe"),s.width=i,s.height=o,s.style.border="none",document.body.appendChild(s);let l=document.querySelector(".pixelpay-modal");document.querySelector("[without-sdk-modal]")&&(l=document.querySelector("[without-sdk-modal]"));const u=(null==l?void 0:l.querySelector(".pixelpay-modal-container"))||l;if(null==l||l.setAttribute("data-size",t),!u)return;u.appendChild(s);const c=document.createElement("form");c.id="step-up-form",c.target=s.name,c.method="POST",c.action=e;const d=document.createElement("input");if(d.type="hidden",d.name="JWT",d.value=a,c.appendChild(d),n){const e=document.createElement("input");e.type="hidden",e.name="MD",e.value=n,c.appendChild(e)}document.body.appendChild(c),c.submit()}}a.default=p},1598(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=class{static getFingerprint(e,a){const t=(new Date).getTime(),n=document.createElement("div");n.id="metrics",n.style.position="absolute",n.style.top="0",n.style.opacity="0",n.style.width="1px",n.style.height="1px",document.body.appendChild(n);const r=document.createElement("p");r.styleSheets=`background:url(https://h.online-metrix.net/fp/clear.png?org_id=${a}&session_id=${e}${t}&m=1)`,n.appendChild(r);const i=document.createElement("img");i.src=`https://h.online-metrix.net/fp/clear.png?org_id=${a}&session_id=${e}${t}&m=2`,i.alt="",n.appendChild(i);const o=document.createElement("object");o.data=`https://h.online-metrix.net/fp/fp.swf?org_id=${a}&session_id=${e}${t}`,o.type="application/x-shockwave-flash",o.width="1",o.height="1",o.id="thm_fp";const s=document.createElement("param");s.name="movie",s.value=`https://h.online-metrix.net/fp/fp.swf?org_id=${a}&session_id=${e}${t}`,o.appendChild(s),n.appendChild(o);const l=document.createElement("script");return l.src=`https://h.online-metrix.net/fp/tags.js?org_id=${a}&session_id=${e}${t}`,l.type="text/javascript",document.body.appendChild(l),`${t}`}}},5184(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(4013)),i=n(t(1850)),o=n(t(2711));class s extends r.default{createIFrameElement(e){const a=document.createElement("iframe");return a.setAttribute("frameborder","0"),a.setAttribute("frameborder","0"),a.setAttribute("scrolling","auto"),a.setAttribute("allowtransparency","true"),a.classList.add("pixelpay-modal-iframe"),a.classList.add("pixelpay-modal-loading"),a.onload=()=>{a.classList.remove("pixelpay-modal-loading")},a.onerror=e,a}evaluatePostMessage(e,a,t){var n;e&&e.data&&e.data.hasOwnProperty("success")&&(i.default.hide(),(null==e?void 0:e.origin)==this.settings.endpoint?setTimeout(()=>{var t,n;o.default.hide(),a(this.parseResponse(null==e?void 0:e.data,(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.status)||((null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.success)?200:400)))},300):(o.default.hide(),t(new Error((null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.message)||"Payload frame response error"))))}loadPayload(e){return new Promise((a,t)=>{try{const n=document.querySelector("[without-sdk-modal]")||i.default._init().querySelector(".pixelpay-modal-container");if(n){const r=this.createIFrameElement(t);n.appendChild(r);const i=r.contentWindow.document,o=atob(e);i.open(),i.write(o),i.close(),window.onmessage=e=>{this.evaluatePostMessage(e,a,t)}}i.default.show()}catch(e){o.default.hide(),t(e)}})}}a.default=s},2711(e,a,t){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,a,t,n){void 0===n&&(n=t);var r=Object.getOwnPropertyDescriptor(a,t);r&&!("get"in r?!a.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return a[t]}}),Object.defineProperty(e,n,r)}:function(e,a,t,n){void 0===n&&(n=t),e[n]=a[t]}),r=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:!0,value:a})}:function(e,a){e.default=a}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)"default"!==t&&Object.prototype.hasOwnProperty.call(e,t)&&n(a,e,t);return r(a,e),a},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const s=o(t(634)),l=i(t(2023)),u={_container:()=>{let e=document.querySelector(".pixelpay-loading");return e||(e=document.createElement("div"),e.classList.add("pixelpay-loading"),e.innerHTML=`<div>\n\t\t\t<img alt="Powered by PixelPay®" src="${l.logo}" width="120" height="40" />\n\t\t\t<img alt="Credit/Debit card" src="${l.icon}" width="32" height="32" />\n\t\t</div>\n\t\t<p><span></span></p>`,document.querySelector("body").appendChild(e),s.default.addStylesById("loading",'.pixelpay-loading { margin: 0px; padding: 16px; display: flex; position: fixed; justify-content: center; flex-direction: column; align-items: center; z-index: 999998; background-color: rgba(0, 0, 0, 0.85); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); top: 0; right: 0; left: 0; bottom: 0; width: 100%; max-width: 100vw; transition: 0.3s opacity; visibility: hidden; opacity: 0; cursor: progress; } .pixelpay-loading * { margin: 0px; padding: 0px; } .pixelpay-loading>div { display: flex; width: 220px; max-width: 220px; justify-content: space-between; } .pixelpay-loading>div>img { opacity: 0; transition-delay: 0.2s; transition-duration: 0.3s; } .pixelpay-loading.show-loading>div>img:first-child { opacity: 1; } .pixelpay-loading>div>img:last-child { transform: translateX(-32px); } .pixelpay-loading.show-loading>div>img:last-child { opacity: 1; transform: translateX(0px); } .pixelpay-loading>p { margin-top: 10px; width: 220px; height: 4px; border-radius: 2px; background-color: rgba(255, 255, 255, 0.2); box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1); overflow: hidden; position: relative; } .pixelpay-loading>p>span { display: block; position: absolute; content: ""; left: -200px; width: 200px; height: 4px; background-color: rgba(255, 255, 255, 0.95); animation: loadingBarSDK 1s linear infinite; -moz-animation: loadingBarSDK 1s linear infinite; -webkit-animation: loadingBarSDK 1s linear infinite; border-radius: 0.5rem; } .pixelpay-loading.show-loading { visibility: visible; opacity: 1; } .pixelpay-loading.show-loading.closing-loading { cursor: default; opacity: 0 !important; } @keyframes loadingBarSDK { from { left: -200px; width: 30%; } 50% { width: 30%; } 70% { width: 70%; } 80% { left: 50%; } 95% { left: 120%; } to { left: 100%; } }'),e)},show:()=>{if(s.default.checkIsBrowser()){if(document.dispatchEvent(new Event("pxshowloading")),document.querySelector("[without-sdk-loading]"))return;u._container(),setTimeout(()=>{u._container().classList.add("show-loading")},100)}},hide:()=>{if(s.default.checkIsBrowser()){if(document.dispatchEvent(new Event("pxhideloading")),document.querySelector("[without-sdk-loading]"))return;u._container().classList.add("closing-loading"),setTimeout(()=>{u._container().classList.remove("show-loading","closing-loading")},300)}}};a.default=u},1850(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i={is_open:!1,el:null,_init:()=>(i.is_open=!1,i.el=document.querySelector("body .pixelpay-modal"),i.el||(i.el=i._createModalElement()),i.el),_createContainer:()=>{const e=document.createElement("div");return e.classList.add("pixelpay-modal-container"),e.setAttribute("aria-modal","true"),e},_createLoading:()=>{const e=document.createElement("p");return e.innerHTML="<span></span>",e},_createModalElement:()=>{const e=document.createElement("div");return e.classList.add("pixelpay-modal"),e.setAttribute("aria-hidden","true"),e.appendChild(i._createContainer()),e.appendChild(i._createLoading()),document.querySelector("body").appendChild(e),r.default.addStylesById("modal",'.pixelpay-modal { font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif; margin: 0px; padding: 16px; display: flex; position: fixed; justify-content: center; flex-direction: column; align-items: center; z-index: 999999; top: 0; right: 0; left: 0; bottom: 0; width: 100%; max-width: 100vw; transition: 0.3s opacity; visibility: hidden; opacity: 0; cursor: progress; border-radius: 3px; } .pixelpay-modal.open-modal { visibility: visible; opacity: 1; } .pixelpay-modal.open-modal .pixelpay-modal-container { transform: translateY(0); } .pixelpay-modal * { margin: 0px; padding: 0px; } .pixelpay-modal>p { width: 100%; min-width: 250px; max-width: 500px; margin-top: 10px; height: 4px; border-radius: 2px; background-color: rgba(255, 255, 255, 0.2); box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1); overflow: hidden; position: relative; } .pixelpay-modal>p>span { display: block; position: absolute; content: ""; left: -200px; width: 200px; height: 4px; background-color: rgba(255, 255, 255, 0.95); animation: loadingBarSDK 1s linear infinite; -moz-animation: loadingBarSDK 1s linear infinite; -webkit-animation: loadingBarSDK 1s linear infinite; border-radius: 0.5rem; } .pixelpay-modal .pixelpay-modal-container { display: block; width: 100%; min-width: 250px; min-height: 400px; max-width: 500px; max-height: 600px; margin: 0 auto; background-color: transparent; text-align: center; will-change: transform; transform: translateY(-15%); transition: 0.3s transform cubic-bezier(0, 0, 0.2, 1); border-radius: 3px; background-color: #fff; box-shadow: 0 6px 22px -3px #000; cursor: default; } .pixelpay-modal[data-size="01"] .pixelpay-modal-container { width: 250px; max-width: 250px; } .pixelpay-modal[data-size="02"] .pixelpay-modal-container { width: 390px; max-width: 390px; } .pixelpay-modal[data-size="03"] .pixelpay-modal-container { width: 500px; max-width: 500px; } .pixelpay-modal[data-size="04"] .pixelpay-modal-container { width: 600px; max-width: 600px; } .pixelpay-modal[data-size="05"] .pixelpay-modal-container { width: 100%; height: 100%; max-width: 100%; max-height: 100%; } .pixelpay-modal[data-size="01"]>p { width: 250px; } .pixelpay-modal[data-size="02"]>p { width: 390px; } .pixelpay-modal[data-size="03"]>p { width: 500px; } .pixelpay-modal[data-size="04"]>p { width: 600px; } .pixelpay-modal[data-size="05"]>p { width: 100%; } .pixelpay-modal .pixelpay-modal-container > iframe { display: block; } .pixelpay-modal-iframe { width: 100%; height: 100%; max-height: 100vh; background-color: #fff; opacity: 1; transition: opacity 0.3s ease; border-radius: 3px; } @keyframes rotating { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }'),e},show:()=>{if(r.default.checkIsBrowser()){if(document.dispatchEvent(new Event("pxshowmodal")),document.querySelector("[without-sdk-modal]"))return;i._init(),setTimeout(()=>{i.el.classList.add("open-modal"),i.el.setAttribute("aria-hidden","true"),i.is_open=!0},100)}},hide:()=>{if(r.default.checkIsBrowser()){if(document.dispatchEvent(new Event("pxshowmodal")),document.querySelector("[without-sdk-modal]"))return;i._init(),setTimeout(()=>{i.el.classList.remove("pixelpay-modal-fullscreen"),i.el.classList.remove("open-modal"),i.el.setAttribute("aria-hidden","false");const e=i.el.querySelector(".pixelpay-modal-iframe");e&&e.parentNode.removeChild(e),i.is_open=!1,i.el.dispatchEvent(new Event("onclose"))},300)}}};a.default=i},5473(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(6266)),i=n(t(7473)),o=n(t(9411));a.default=class{constructor(e){this.transaction=e,this.transaction.source="router"}async init(e){const a=new r.default(this.parsePayload(e));return r.default.busy=!1,this.transaction instanceof i.default?await a.doSale(this.transaction):await a.doAuth(this.transaction)}parsePayload(e){const a=JSON.parse(atob(e)),t=new o.default;return t.setupEnvironment(a.env),t.setupCredentials(a.auth_key,a.auth_hash),t.setupEndpoint(a.endpoint),t.setupLanguage(this.transaction.lang),a.auth_user&&t.setupPlatformUser(a.auth_user),t}}},2423(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=class{constructor(){this.address=void 0,this.country=void 0,this.state=void 0,this.city=void 0,this.zip=void 0,this.phone=void 0}}},8888(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=class{constructor(){this.number=void 0,this.cvv2=void 0,this.expire_month=void 0,this.expire_year=void 0,this.cardholder=void 0}getExpireFormat(){if(!this.expire_month||!this.expire_year)return"";const e=String(this.expire_year),a=("00"+this.expire_month).slice(-2);return e.substr(-2)+a}}},8113(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=class{constructor(){this.code=void 0,this.title=void 0,this.price=void 0,this.qty=void 0,this.tax=void 0,this.total=void 0,this.price=0,this.qty=1,this.tax=0,this.total=0}totalize(){return this.total=this.price*this.qty,this}}},7424(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=class{constructor(){this.id=void 0,this.currency=void 0,this.amount=void 0,this.tax_amount=void 0,this.shipping_amount=void 0,this.content=void 0,this.extras=void 0,this.note=void 0,this.callback_url=void 0,this.customer_name=void 0,this.customer_email=void 0,this.content=[],this.extras={}}addItem(e){return this.content.push(e),this.totalize(),this}addExtra(e,a){return this.extras[e]=a,this}totalize(){return this.content.length?(this.amount=0,this.tax_amount=0,this.content.forEach(e=>{e.totalize(),this.amount+=e.total,this.tax_amount+=e.tax*e.qty}),this):this}}},9411(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i=n(t(3514));a.default=class{constructor(){this.auth_key=void 0,this.auth_hash=void 0,this.auth_user=void 0,this.endpoint=void 0,this.environment=void 0,this.lang=void 0,this.sdk=void 0,this.sdk_version=void 0,this.headers=void 0,this.endpoint="https://pixelpay.app"}setupEndpoint(e){this.endpoint=e}setupCredentials(e,a){this.auth_key=e,this.auth_hash=a}setupPlatformUser(e){this.auth_user=e}setupEnvironment(e){this.environment=e}setupSandbox(){this.endpoint="https://pixelpay.dev",this.auth_key="1234567890",this.auth_hash=r.default.hash("MD5","@s4ndb0x-abcd-1234-n1l4-p1x3l"),this.environment=i.default.SANDBOX}setupLanguage(e){this.lang=e}setupHeaders(e){this.headers=e}}},235(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i=n(t(4048));class o extends i.default{setOrder(e){this.order_id=e.id,this.order_currency=e.currency,this.order_amount=r.default.parseAmount(e.amount)}}a.default=o},6402(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(4048));class i extends r.default{}a.default=i},388(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2823));class i extends r.default{constructor(){super(...arguments),this.payment_uuid=null,this.transaction_approved_amount=null}}a.default=i},3331(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2823)),i=n(t(634));class o extends r.default{constructor(){super(...arguments),this.number=null,this.cvv2=null,this.expire_month=null,this.expire_year=null,this.cardholder=null,this.address=null,this.country=null,this.state=null,this.city=null,this.zip=null,this.phone=null,this.email=null}setCard(e){this.number=i.default.cleanString(e.number),this.cvv2=e.cvv2,this.cardholder=i.default.trimValue(e.cardholder),e.expire_month&&(this.expire_month=("00"+e.expire_month).slice(-2)),e.expire_year&&(this.expire_year=String(e.expire_year))}setBilling(e){this.address=i.default.trimValue(e.address),this.country=e.country,this.state=e.state,this.city=i.default.trimValue(e.city),this.zip=e.zip,this.phone=e.phone}}a.default=o},4341(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2823));class i extends r.default{constructor(){super(...arguments),this.identifier=null,this.payload=null,this.card_token=null,this.authenticate_token=!1}}a.default=i},5634(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2823)),i=n(t(235)),o=n(t(7473));class s extends r.default{constructor(){super(...arguments),this.card_token=null,this.card_number=null,this.card_cvv=null,this.card_expire=null,this.billing_address=null,this.billing_country=null,this.billing_state=null,this.billing_city=null,this.billing_zip=null,this.billing_phone=null,this.customer_name=null,this.customer_email=null,this.order_id=null,this.order_currency=null,this.order_amount=null,this.installment=null,this.secure_payload=null,this.apple_pay=null,this.click_to_pay=null,this.reference=null,this.browser_java_enabled="false",this.browser_header=null,this.browser_language=null,this.browser_color_depth=null,this.browser_screen_height=null,this.browser_screen_width=null,this.browser_time_zone=null,this.user_agent=null,this.ip_address=null,this.device_channel="Browser",this.browser_javascript_enabled="true",this.authenticate_token=!1}fromPaymentTransaction(e){this.card_token=e.card_token,this.card_number=e.card_number,this.card_expire=e.card_expire,this.billing_address=e.billing_address,this.billing_country=e.billing_country,this.billing_state=e.billing_state,this.billing_city=e.billing_city,this.billing_zip=e.billing_zip,this.billing_phone=e.billing_phone,this.customer_name=e.customer_name,this.customer_email=e.customer_email,this.order_id=e.order_id,this.order_currency=e.order_currency,this.order_amount=e.order_amount,this.secure_payload=e.secure_payload,this.apple_pay=e.apple_pay,this.click_to_pay=e.click_to_pay,this.authenticate_token=e instanceof i.default,e instanceof o.default&&(this.installment=e.installment_months)}setRequiredEMVFields(){this.browser_java_enabled||(this.browser_java_enabled="function"==typeof navigator.javaEnabled?navigator.javaEnabled().toString():"false"),this.browser_language||(this.browser_language=navigator.language),this.browser_color_depth||(this.browser_color_depth=screen.colorDepth.toString()),this.browser_screen_height||(this.browser_screen_height=screen.height.toString()||window.innerHeight.toString()),this.browser_screen_width||(this.browser_screen_width=screen.width.toString()||window.innerWidth.toString()),this.browser_time_zone||(this.browser_time_zone=(new Date).getTimezoneOffset().toString()),this.user_agent||(this.user_agent=navigator.userAgent)}}a.default=s},4048(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i=n(t(2823));class o extends i.default{constructor(){super(...arguments),this.payment_uuid=null,this.card_token=null,this.card_number=null,this.card_cvv=null,this.card_expire=null,this.card_holder=null,this.billing_address=null,this.billing_country=null,this.billing_state=null,this.billing_city=null,this.billing_zip=null,this.billing_phone=null,this.customer_name=null,this.customer_email=null,this.customer_fingerprint=null,this.order_id=null,this.order_currency=null,this.order_amount=null,this.order_tax_amount=null,this.order_shipping_amount=null,this.order_content=[],this.order_extras={},this.order_note=null,this.order_callback=null,this.authentication_request=!1,this.authentication_identifier=null,this.secure_payload=null,this.apple_pay=null,this.click_to_pay=null,this.source=null,this.before_execute=null}setCard(e){this.card_number=r.default.cleanString(e.number),this.card_cvv=e.cvv2,this.card_expire=e.getExpireFormat(),this.card_holder=r.default.trimValue(e.cardholder)}setCardToken(e=null){this.card_token=e}setBilling(e){this.billing_address=r.default.trimValue(e.address),this.billing_country=e.country,this.billing_state=e.state,this.billing_city=r.default.trimValue(e.city),this.billing_zip=e.zip,this.billing_phone=e.phone}setOrder(e){this.order_id=e.id,this.order_currency=e.currency,this.order_amount=r.default.parseAmount(e.amount),this.order_tax_amount=r.default.parseAmount(e.tax_amount),this.order_shipping_amount=r.default.parseAmount(e.shipping_amount),this.order_content=e.content,this.order_extras=e.extras,this.order_note=r.default.trimValue(e.note),this.order_callback=e.callback_url,this.customer_name=r.default.trimValue(e.customer_name),this.customer_email=e.customer_email}withAuthenticationRequest(){this.authentication_request=!0}setBeforeExecute(e){this.before_execute=e}async doBeforeExecute(){this.before_execute&&await this.before_execute()}}a.default=o},7473(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i=n(t(4048));class o extends i.default{constructor(){super(...arguments),this.installment_type=null,this.installment_months=null,this.points_redeem_amount=null}setInstallment(e,a){this.installment_months=String(e),this.installment_type=a}withPointsRedeemAmount(e){this.points_redeem_amount=r.default.parseAmount(e)}}a.default=o},4282(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2823));class i extends r.default{constructor(){super(...arguments),this.payment_uuid=null}}a.default=i},2210(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2823));class i extends r.default{constructor(){super(...arguments),this.payment_uuid=null,this.void_reason=null,this.void_signature=null}}a.default=i},3514(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});class t{}a.default=t,t.LIVE="live",t.TEST="test",t.SANDBOX="sandbox",t.STAGING="staging"},1299(e,a,t){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,a,t,n){void 0===n&&(n=t);var r=Object.getOwnPropertyDescriptor(a,t);r&&!("get"in r?!a.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return a[t]}}),Object.defineProperty(e,n,r)}:function(e,a,t,n){void 0===n&&(n=t),e[n]=a[t]}),r=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:!0,value:a})}:function(e,a){e.default=a}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)"default"!==t&&Object.prototype.hasOwnProperty.call(e,t)&&n(a,e,t);return r(a,e),a};Object.defineProperty(a,"__esModule",{value:!0});const o=i(t(5021)),s=i(t(4363)),l=i(t(7639));a.default={countriesList:()=>o||{},statesList:e=>Object.prototype.hasOwnProperty.call(s||{},e)&&s[e]||{},formatsList:e=>Object.prototype.hasOwnProperty.call(l||{},e)&&l[e]||{}}},1935(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},4575(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},5037(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},7071(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},2046(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},4756(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},7867(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},2701(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},3596(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},9250(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},8618(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},1020(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(4013)),i=n(t(7473)),o=n(t(6402)),s=n(t(1742));class l extends r.default{free(){l.runningTransaction=null}authenticationLookup(e){return this.post("api/v2/cardinal/authentication/lookup",e)}authenticationContinue(e){return this.post("api/v2/cardinal/authentication/continue",e)}async retryTransaction(e){if(await e.doBeforeExecute(),l.runningTransaction)return l.runningTransaction;if(!(e instanceof i.default||e instanceof o.default))throw this.free(),new s.default("The request payment type is invalid.");const a="api/v2/transaction/"+(e instanceof i.default?"sale":"auth");return l.runningTransaction=this.post(a,e).finally(this.free),l.runningTransaction}}a.default=l,l.runningTransaction=null},4787(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i=n(t(2823)),o=n(t(4013)),s=n(t(7867)),l=n(t(9250)),u=n(t(2711)),c=n(t(1574)),d=n(t(1742)),h="api/v2/tokenization/card";class p extends o.default{async vaultCard(e){u.default.show();const a=await this.post(h,e);return u.default.hide(),a}async authCard(e){if(!r.default.checkIsBrowser())throw new d.default("This platform not support 3DS transactions");try{u.default.show();const a=await this.post(h+"/auth",e);return a instanceof l.default&&a.data.authentication_identifier?a:a instanceof s.default&&"songbird"==a.data.transaction_type?await new c.default(this.settings,e).init(a.data.payload,a.data.collection_url):(c.default.clearAllEvents(),a)}catch(e){throw c.default.clearAllEvents(),e}finally{u.default.hide()}}async updateCard(e,a){u.default.show();const t=await this.put(h+"/"+e,a);return u.default.hide(),t}showCard(e){return this.get(h+"/"+e,new i.default)}showCards(e){let a=e.join(":");return this.get(h+"/"+a.split(" ").join(""),new i.default)}async deleteCard(e){u.default.show();const a=await this.delete(h+"/"+e,new i.default);return u.default.hide(),a}}a.default=p},6266(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i=n(t(4013)),o=n(t(1742)),s=n(t(2350)),l=n(t(2711)),u=n(t(7867)),c=n(t(1574)),d=n(t(5184)),h=n(t(1598)),p=n(t(5473));class f extends i.default{constructor(e){super(e)}static withConcurrency(){f.concurrent=!0}async doSale(e){var a,t;if(await e.doBeforeExecute(),e.authentication_request&&!r.default.checkIsBrowser())throw new o.default("This platform not support 3DS transactions");if(!f.concurrent&&f.busy)throw new s.default("There's an active transaction still running.");try{l.default.show(),f.busy=!0;const n=await this.post("api/v2/transaction/sale",e);if(n instanceof u.default)switch(null===(a=n.data)||void 0===a?void 0:a.transaction_type){case"songbird":return await new c.default(this.settings,e).init(n.data.payload,null===(t=n.data)||void 0===t?void 0:t.collection_url);case"payload":return await new d.default(this.settings).loadPayload(n.data.payload);case"router":return await new p.default(e).init(n.data.payload);default:throw new s.default("This type of transaction is invalid")}return c.default.clearAllEvents(),n}catch(e){throw c.default.clearAllEvents(),e}finally{l.default.hide(),f.busy=!1}}async doAuth(e){var a,t;if(await e.doBeforeExecute(),e.authentication_request&&!r.default.checkIsBrowser())throw new o.default("This platform not support 3DS transactions");if(!f.concurrent&&f.busy)throw new s.default("There's an active transaction still running.");try{l.default.show(),f.busy=!0;const n=await this.post("api/v2/transaction/auth",e);if(n instanceof u.default)switch(null===(a=n.data)||void 0===a?void 0:a.transaction_type){case"songbird":return await new c.default(this.settings,e).init(n.data.payload,null===(t=n.data)||void 0===t?void 0:t.collection_url);case"payload":return await new d.default(this.settings).loadPayload(n.data.payload);case"router":return await new p.default(e).init(n.data.payload);default:throw new s.default("This type of transaction is invalid")}return c.default.clearAllEvents(),n}catch(e){throw c.default.clearAllEvents(),e}finally{l.default.hide(),f.busy=!1}}async doCapture(e){l.default.show();const a=await this.post("api/v2/transaction/capture",e);return l.default.hide(),a}async doVoid(e){l.default.show();const a=await this.post("api/v2/transaction/void",e);return l.default.hide(),a}getStatus(e){return this.post("api/v2/transaction/status",e)}verifyPaymentHash(e,a,t){if(r.default.checkIsBrowser())throw new o.default("This platform not support hash validations in browser/frontend");const n=[a,this.settings.auth_key,t].join("|");return e===r.default.hash("MD5",n)}getCybersourceFingerprint(e,a){return h.default.getFingerprint(e,a)}}a.default=f,f.busy=!1,f.concurrent=!1},1333(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default="2.4.9"},8743(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i=t(3909);r.default.checkIsBrowser()&&(window.Entities=i.Entities,window.Exceptions=i.Exceptions,window.Models=i.Models,window.Requests=i.Requests,window.Resources=i.Resources,window.Responses=i.Responses,window.Services=i.Services)},7526(e,a){"use strict";a.byteLength=function(e){var a=s(e),t=a[0],n=a[1];return 3*(t+n)/4-n},a.toByteArray=function(e){var a,t,i=s(e),o=i[0],l=i[1],u=new r(function(e,a,t){return 3*(a+t)/4-t}(0,o,l)),c=0,d=l>0?o-4:o;for(t=0;t<d;t+=4)a=n[e.charCodeAt(t)]<<18|n[e.charCodeAt(t+1)]<<12|n[e.charCodeAt(t+2)]<<6|n[e.charCodeAt(t+3)],u[c++]=a>>16&255,u[c++]=a>>8&255,u[c++]=255&a;2===l&&(a=n[e.charCodeAt(t)]<<2|n[e.charCodeAt(t+1)]>>4,u[c++]=255&a);1===l&&(a=n[e.charCodeAt(t)]<<10|n[e.charCodeAt(t+1)]<<4|n[e.charCodeAt(t+2)]>>2,u[c++]=a>>8&255,u[c++]=255&a);return u},a.fromByteArray=function(e){for(var a,n=e.length,r=n%3,i=[],o=16383,s=0,l=n-r;s<l;s+=o)i.push(u(e,s,s+o>l?l:s+o));1===r?(a=e[n-1],i.push(t[a>>2]+t[a<<4&63]+"==")):2===r&&(a=(e[n-2]<<8)+e[n-1],i.push(t[a>>10]+t[a>>4&63]+t[a<<2&63]+"="));return i.join("")};for(var t=[],n=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)t[o]=i[o],n[i.charCodeAt(o)]=o;function s(e){var a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");return-1===t&&(t=a),[t,t===a?0:4-t%4]}function l(e){return t[e>>18&63]+t[e>>12&63]+t[e>>6&63]+t[63&e]}function u(e,a,t){for(var n,r=[],i=a;i<t;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),r.push(l(n));return r.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287(e,a,t){"use strict";var n=t(7526),r=t(251);
|
|
1
|
+
(()=>{var e={634(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});const n=t(1396);a.default={objectToJson(e){const a=Object.assign({},e);for(var t in a)null!==a[t]&&void 0!==a[t]||delete a[t];return JSON.stringify(a)},hash(e,a){switch(e){case"MD5":return(0,n.MD5)(a).toString();case"SHA-512":return(0,n.SHA512)(a).toString();default:return""}},trimValue:e=>e?e.trim():null,cleanString:e=>e?e.replace(/\s/g,""):null,parseAmount:e=>"number"==typeof e&&e>0?String(e):null,checkIsBrowser:()=>"undefined"!=typeof window&&void 0!==window.document,serialize(e){const a=Object.getOwnPropertyNames(null!=e?e:{});return JSON.parse(JSON.stringify(e,a))},safeParse(e){if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return null}},addScriptToWebsite:e=>new Promise((a,t)=>{const r=(0,n.MD5)(e).toString(),i=document.createElement("script");document.querySelector(`script[id="${r}"]`)?a(!0):(i.id=r,i.src=e,i.type="text/javascript",i.onload=a,i.onerror=t,document.body.appendChild(i))}),addStylesById(e,a){if(document.getElementById(`styles-${e}`))return;const t=document.createElement("style");t.id=`styles-${e}`,t.innerHTML=a,document.head.appendChild(t)},addSecureForm(e,a){const t=document.createElement("iframe");t.id="cardinal_collection_iframe",t.name="collectionIframe",t.height="10",t.width="10",t.style.display="none",document.body.appendChild(t);const n=document.createElement("form");n.id="cardinal_collection_form",n.method="POST",n.target="collectionIframe",n.action=a;const r=document.createElement("input");return r.type="hidden",r.name="JWT",r.value=e,n.appendChild(r),document.body.appendChild(n),n},removeElementById(e){const a=document.getElementById(e);a&&a.remove()},convertWindowSizeToDimensions:e=>({"01":{width:"250",height:"400"},"02":{width:"390",height:"400"},"03":{width:"500",height:"600"},"04":{width:"600",height:"400"},"05":{width:"100%",height:"100%"}}[e||"02"]||{width:"390",height:"400"})}},2823(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i=n(t(1333));a.default=class{constructor(){this.env=null,this.lang=null,this.from=null,this.sdk_version=null,this.lang=Intl.DateTimeFormat().resolvedOptions().locale,this.from="sdk-javascript",this.sdk_version=i.default,"es"!=this.lang&&"en"!=this.lang&&(this.lang="es")}toJson(){return r.default.objectToJson(this)}}},2624(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634));a.default=class{constructor(){this.action=null,this.success=!1,this.message=null,this.data=void 0,this.errors=void 0}setStatus(e){this.status=e}getStatus(){return this.status}inputHasError(e){return!!this.errors&&this.errors.hasOwnProperty(e)}getData(e){return this.data&&this.data.hasOwnProperty(e)&&this.data[e]||null}toJson(){return r.default.objectToJson(this)}}},4013(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(6425)),i=n(t(3292)),o=n(t(2624)),s=n(t(1935)),l=n(t(4575)),u=n(t(5037)),c=n(t(7071)),d=n(t(2046)),h=n(t(4756)),p=n(t(7867)),f=n(t(2701)),S=n(t(3596)),m=n(t(9250)),g=n(t(8618));a.default=class{constructor(e){this.settings=e}buildRequest(e,a){if(!this.settings.auth_key||!this.settings.auth_hash)throw new i.default("The merchant credentials are not definied (key/hash).");null!=this.settings.environment&&(a.env=this.settings.environment),null!=this.settings.lang&&(a.lang=this.settings.lang),null!=this.settings.sdk&&(a.from=this.settings.sdk),null!=this.settings.sdk_version&&(a.sdk_version=this.settings.sdk_version);const t={Accept:"application/json","Content-Type":"application/json","x-auth-key":this.settings.auth_key,"x-auth-hash":this.settings.auth_hash};if(this.settings.auth_user&&(t["x-auth-user"]=this.settings.auth_user),this.settings.headers)for(const e in this.settings.headers)t[e]=this.settings.headers[e];return r.default.create({baseURL:this.settings.endpoint,timeout:6e4,headers:t,validateStatus:()=>!0})}parseResponse(e,a){let t=new o.default;switch(a){case 200:t=new m.default;break;case 202:t=new p.default;break;case 400:t=new s.default;break;case 401:case 403:t=new d.default;break;case 402:t=new f.default;break;case 404:case 405:case 406:t=new h.default;break;case 408:t=new g.default;break;case 412:case 418:t=new S.default;break;case 422:t=new u.default;break;case 500:t=new l.default;break;default:a>500&&(t=new c.default)}return t.status=a,t.action=(null==e?void 0:e.action)||null,t.success=(null==e?void 0:e.success)||!1,t.message=(null==e?void 0:e.message)||null,t.data=(null==e?void 0:e.data)||null,t.errors=(null==e?void 0:e.errors)||null,t}exceptionResponse(e){const a=new l.default;return a.status=520,a.success=!1,a.message=e.message,a}getRoute(e){return this.settings.endpoint+"/"+e}async post(e,a){try{const t=await this.buildRequest(e,a).post(e,JSON.parse(a.toJson()));return this.parseResponse(t.data,t.status)}catch(e){return this.exceptionResponse(e)}}async put(e,a){try{const t=await this.buildRequest(e,a).put(e,JSON.parse(a.toJson()));return this.parseResponse(t.data,t.status)}catch(e){return this.exceptionResponse(e)}}async delete(e,a){try{const t=await this.buildRequest(e,a).delete(e,{params:JSON.parse(a.toJson())});return this.parseResponse(t.data,t.status)}catch(e){return this.exceptionResponse(e)}}async get(e,a){try{const t=await this.buildRequest(e,a).get(e,{params:JSON.parse(a.toJson())});return this.parseResponse(t.data,t.status)}catch(e){return this.exceptionResponse(e)}}}},8282(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(9250));class i{constructor(){this.status=void 0,this.mask=void 0,this.network=void 0,this.type=void 0,this.bin=void 0,this.last=void 0,this.hash=void 0,this.address=void 0,this.country=void 0,this.state=void 0,this.city=void 0,this.zip=void 0,this.email=void 0,this.phone=void 0}static validateResponse(e){return e instanceof r.default}static fromResponse(e){const a=new i;return Object.getOwnPropertyNames(e.data).map(t=>{t in a&&(a[t]=e.data[t])}),a}}a.default=i},4940(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(9250)),i=n(t(2701)),o=n(t(8618));class s{constructor(){this.transaction_type=void 0,this.transaction_redeemed_points=void 0,this.transaction_approved_amount=void 0,this.transaction_amount=void 0,this.transaction_auth=void 0,this.transaction_terminal=void 0,this.transaction_merchant=void 0,this.response_cvn=void 0,this.response_avs=void 0,this.response_cavv=void 0,this.transaction_id=void 0,this.transaction_reference=void 0,this.transaction_time=void 0,this.transaction_date=void 0,this.response_approved=void 0,this.response_incomplete=void 0,this.response_code=void 0,this.response_time=void 0,this.response_reason=void 0,this.installment_type=void 0,this.installment_months=void 0,this.payment_uuid=void 0,this.payment_hash=void 0}static validateResponse(e){return e instanceof r.default||e instanceof i.default||e instanceof o.default}static fromResponse(e){const a=new s;return Object.getOwnPropertyNames(e.data).map(t=>{t in a&&(a[t]=e.data[t])}),a}}a.default=s},3292(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});class t extends Error{}a.default=t},1742(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});class t extends Error{}a.default=t},2350(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});class t extends Error{}a.default=t},3909(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.Services=a.Responses=a.Resources=a.Requests=a.Models=a.Exceptions=a.Entities=void 0;const r=n(t(8282)),i=n(t(4940)),o=n(t(3292)),s=n(t(1742)),l=n(t(2423)),u=n(t(8888)),c=n(t(8113)),d=n(t(7424)),h=n(t(9411)),p=n(t(6402)),f=n(t(388)),S=n(t(7473)),m=n(t(2210)),g=n(t(4282)),y=n(t(3331)),M=n(t(235)),A=n(t(3514)),B=n(t(1299)),_=n(t(1935)),T=n(t(4575)),C=n(t(5037)),v=n(t(7071)),N=n(t(2046)),b=n(t(4756)),L=n(t(7867)),w=n(t(2701)),R=n(t(3596)),E=n(t(9250)),I=n(t(8618)),k=n(t(4787)),P=n(t(6266));a.Entities={CardResult:r.default,TransactionResult:i.default},a.Exceptions={InvalidCredentialsException:o.default,InvalidTransactionTypeException:s.default},a.Models={Billing:l.default,Card:u.default,Item:c.default,Order:d.default,Settings:h.default},a.Requests={AuthTransaction:p.default,CaptureTransaction:f.default,SaleTransaction:S.default,VoidTransaction:m.default,StatusTransaction:g.default,CardTokenization:y.default,AuthTokenization:M.default},a.Resources={Environment:A.default,Locations:B.default},a.Responses={ErrorResponse:_.default,FailureResponse:T.default,InputErrorResponse:C.default,NetworkFailureResponse:v.default,NoAccessResponse:N.default,NotFoundResponse:b.default,PayloadResponse:L.default,PaymentDeclinedResponse:w.default,PreconditionalResponse:R.default,SuccessResponse:E.default,TimeoutResponse:I.default},a.Services={Tokenization:k.default,Transaction:P.default}},1574(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i=n(t(235)),o=n(t(4341)),s=n(t(5634)),l=n(t(3514)),u=n(t(4575)),c=n(t(1020)),d=n(t(2711)),h=n(t(1850));class p{constructor(e,a){this.direct_api=!1,this.settings=e,this.transaction=a,this.service=new c.default(this.settings)}static clearAllEvents(){r.default.checkIsBrowser()&&(d.default.hide(),void 0!==window.Cardinal&&(window.Cardinal.off("payments.setupComplete"),window.Cardinal.off("payments.validated"),window.Cardinal.onSetupCompleteBusy=!1,window.Cardinal.onValidatedBusy=!1))}async init(e,a){if(a){this.direct_api=!0,this.collection_url=a;const t=r.default.addSecureForm(e,a);return await this.startCardinalDirectApiTransaction(t).finally(()=>{this.listen_direct_message&&window.removeEventListener("message",this.listen_direct_message),r.default.removeElementById("step-up-form"),r.default.removeElementById("cardinal_collection_iframe"),r.default.removeElementById("cardinal_collection_form"),h.default.hide(),d.default.hide()})}const t=this.settings.environment===l.default.SANDBOX||this.settings.environment===l.default.STAGING,n=t?"stag":"";return await r.default.addScriptToWebsite(`https://songbird${n}.cardinalcommerce.com/edge/v1/songbird.js`),window.Cardinal.configure({payment:{framework:"inline"},logging:{level:t?"on":"off"}}),window.Cardinal.onSetupCompleteBusy=!1,window.Cardinal.onValidatedBusy=!1,await this.startCardinalTransaction(e,this)}startCardinalTransaction(e,a){return new Promise((t,n)=>{try{window.Cardinal.on("payments.setupComplete",async e=>{var n;if(window.Cardinal.onSetupCompleteBusy)return console.warn('Cardinal event "payments.setupComplete" is currently busy.');if(window.Cardinal.onSetupCompleteBusy=!0,void 0===e.sessionId||void 0!==e.sessionId&&(!e.sessionId||""==e.sessionId))throw new Error("Cardinal initial setup error.");const r=new s.default;r.fromPaymentTransaction(a.transaction),r.setRequiredEMVFields(),r.reference=e.sessionId;const i=await a.service.authenticationLookup(r);a.identifier=null===(n=null==i?void 0:i.data)||void 0===n?void 0:n.identifier,a.validationLookupResponse(i,t),window.Cardinal.onSetupCompleteBusy=!1}),window.Cardinal.on("payments.validated",async(e,n)=>{if("ERROR"!==(null==e?void 0:e.ActionCode)&&window.Cardinal.onValidatedBusy)return console.warn('Cardinal event "payments.validated" is currently busy.');if(window.Cardinal.onValidatedBusy=!0,void 0!==n&&n&&""!=n){const e=new o.default;e.payload=n,e.identifier=a.identifier,e.card_token=a.transaction.card_token,e.authenticate_token=a.transaction instanceof i.default;const r=await a.service.authenticationContinue(e);if(e.authenticate_token)return p.clearAllEvents(),t(r);const s=await a.service.retryTransaction(a.transaction);p.clearAllEvents(),t(s)}else if("NOACTION"==e.ActionCode){const e=await a.service.retryTransaction(a.transaction);p.clearAllEvents(),t(e)}else{const a=new u.default;a.setStatus(520),a.message=`Cardinal validation failed. ${e.ErrorDescription} (${e.ErrorNumber})`,a.data={},p.clearAllEvents(),t(a)}window.Cardinal.onValidatedBusy=!1}),window.Cardinal.on("ui.close",()=>{h.default.hide()}),window.Cardinal.on("ui.inline.setup",(e,a,t,n)=>{try{let n;if(void 0===e||void 0===a)throw new Error("Unable to process request due to invalid arguments");if("CCA"!==a.paymentType)throw new Error("Unsupported inline payment type found ["+a.paymentType+"]");switch(a.data.mode){case"static":h.default.show();let e=document.querySelector(".pixelpay-modal");document.querySelector("[without-sdk-modal]")&&(e=document.querySelector("[without-sdk-modal]")),n=e.querySelector(".pixelpay-modal-container")||e,e.setAttribute("data-size",a.data.challengeWindowSizeId);break;case"suppress":h.default.hide(),n=document.querySelector(".pixelpay-modal-container");break;default:throw new Error("Unsupported inline mode found ["+a.data.mode+"]")}n.innerHTML=e,t()}catch(e){n(e)}}),window.Cardinal.setup("init",{jwt:e})}catch(e){p.clearAllEvents(),n(e)}})}startCardinalDirectApiTransaction(e){return new Promise((a,t)=>{this.direct_api_resolve=a,this.direct_api_reject=t,this.listen_direct_message=async e=>{var a;try{if((null==e?void 0:e.origin)===this.settings.endpoint&&"pixelpay_continue"===(null===(a=e.data)||void 0===a?void 0:a.name))return await this.handleDirectApiContinue(e);if(e.origin!==new URL(this.collection_url).origin)return;const t=r.default.safeParse(e.data);if("profile.completed"===(null==t?void 0:t.MessageType))return await this.handleDirectApiLookup(t)}catch(e){const a=new u.default;a.setStatus(520),a.message="No se pudo procesar la transacción, intenta de nuevo con otro dispositivo o navegador (1000)",a.data=r.default.serialize(e),t(a)}},window.addEventListener("message",this.listen_direct_message,!1),e.submit()})}async handleDirectApiContinue(e){var a,t;const n=null===(a=e.data)||void 0===a?void 0:a.error;if(n){const e=new u.default;return e.setStatus(520),e.message="No se pudo procesar la transacción, intenta de nuevo con otro dispositivo o navegador (1001)",e.data=r.default.serialize(n),this.direct_api_reject(e)}const i=null===(t=e.data)||void 0===t?void 0:t.identifier;if(!i){const e=new u.default;return e.setStatus(520),e.message="Identifier not found in the response.",e.data={},this.direct_api_reject(e)}this.identifier=i,h.default.hide();const o=await this.service.retryTransaction(this.transaction);return this.direct_api_resolve(o)}async handleDirectApiLookup(e){var a,t;const n=(null==e?void 0:e.SessionId)||(null===(a=null==e?void 0:e.Payload)||void 0===a?void 0:a.SessionId);if(!n){const e=new u.default;return e.setStatus(520),e.message="SessionId not found in the response.",e.data={},this.direct_api_reject(e)}const r=new s.default;r.fromPaymentTransaction(this.transaction),r.setRequiredEMVFields(),r.card_cvv=this.transaction.card_cvv,r.reference=n;const i=await this.service.authenticationLookup(r);if(this.identifier=null===(t=null==i?void 0:i.data)||void 0===t?void 0:t.identifier,await this.validationLookupResponse(i,this.direct_api_resolve),"continue"===i.action){const{continue_url:e,continue_payload:a,window_size:t}=i.data;this.submitChallengeForm(e,a,t,this.settings.auth_key)}}async validationLookupResponse(e,a){if(this.transaction.authentication_identifier=this.identifier,!e.success||["token_auth_success","token_auth_failed"].includes(e.action))return p.clearAllEvents(),a(e);if("continue"!=e.action){const e=await this.service.retryTransaction(this.transaction);return p.clearAllEvents(),a(e)}this.direct_api||window.Cardinal.continue("cca",{AcsUrl:e.data.continue_url,Payload:e.data.continue_payload},{OrderDetails:{TransactionId:e.data.transaction_id,OrderNumber:this.transaction.order_id,CurrencyCode:this.transaction.order_currency}})}submitChallengeForm(e,a,t,n){h.default.show(),t=null!=t?t:"02";const{width:i,height:o}=r.default.convertWindowSizeToDimensions(t);let s=document.querySelector('iframe[name="step-up-iframe"]');s||(s=document.createElement("iframe"),s.name="step-up-iframe"),s.width=i,s.height=o,s.style.border="none",document.body.appendChild(s);let l=document.querySelector(".pixelpay-modal");document.querySelector("[without-sdk-modal]")&&(l=document.querySelector("[without-sdk-modal]"));const u=(null==l?void 0:l.querySelector(".pixelpay-modal-container"))||l;if(null==l||l.setAttribute("data-size",t),!u)return;u.appendChild(s);const c=document.createElement("form");c.id="step-up-form",c.target=s.name,c.method="POST",c.action=e;const d=document.createElement("input");if(d.type="hidden",d.name="JWT",d.value=a,c.appendChild(d),n){const e=document.createElement("input");e.type="hidden",e.name="MD",e.value=n,c.appendChild(e)}document.body.appendChild(c),c.submit()}}a.default=p},1598(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=class{static getFingerprint(e,a){const t=(new Date).getTime(),n=document.createElement("div");n.id="metrics",n.style.position="absolute",n.style.top="0",n.style.opacity="0",n.style.width="1px",n.style.height="1px",document.body.appendChild(n);const r=document.createElement("p");r.styleSheets=`background:url(https://h.online-metrix.net/fp/clear.png?org_id=${a}&session_id=${e}${t}&m=1)`,n.appendChild(r);const i=document.createElement("img");i.src=`https://h.online-metrix.net/fp/clear.png?org_id=${a}&session_id=${e}${t}&m=2`,i.alt="",n.appendChild(i);const o=document.createElement("object");o.data=`https://h.online-metrix.net/fp/fp.swf?org_id=${a}&session_id=${e}${t}`,o.type="application/x-shockwave-flash",o.width="1",o.height="1",o.id="thm_fp";const s=document.createElement("param");s.name="movie",s.value=`https://h.online-metrix.net/fp/fp.swf?org_id=${a}&session_id=${e}${t}`,o.appendChild(s),n.appendChild(o);const l=document.createElement("script");return l.src=`https://h.online-metrix.net/fp/tags.js?org_id=${a}&session_id=${e}${t}`,l.type="text/javascript",document.body.appendChild(l),`${t}`}}},5184(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(4013)),i=n(t(1850)),o=n(t(2711));class s extends r.default{createIFrameElement(e){const a=document.createElement("iframe");return a.setAttribute("frameborder","0"),a.setAttribute("frameborder","0"),a.setAttribute("scrolling","auto"),a.setAttribute("allowtransparency","true"),a.classList.add("pixelpay-modal-iframe"),a.classList.add("pixelpay-modal-loading"),a.onload=()=>{a.classList.remove("pixelpay-modal-loading")},a.onerror=e,a}evaluatePostMessage(e,a,t){var n;e&&e.data&&e.data.hasOwnProperty("success")&&(i.default.hide(),(null==e?void 0:e.origin)==this.settings.endpoint?setTimeout(()=>{var t,n;o.default.hide(),a(this.parseResponse(null==e?void 0:e.data,(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.status)||((null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.success)?200:400)))},300):(o.default.hide(),t(new Error((null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.message)||"Payload frame response error"))))}loadPayload(e){return new Promise((a,t)=>{try{const n=document.querySelector("[without-sdk-modal]")||i.default._init().querySelector(".pixelpay-modal-container");if(n){const r=this.createIFrameElement(t);n.appendChild(r);const i=r.contentWindow.document,o=atob(e);i.open(),i.write(o),i.close(),window.onmessage=e=>{this.evaluatePostMessage(e,a,t)}}i.default.show()}catch(e){o.default.hide(),t(e)}})}}a.default=s},2711(e,a,t){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,a,t,n){void 0===n&&(n=t);var r=Object.getOwnPropertyDescriptor(a,t);r&&!("get"in r?!a.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return a[t]}}),Object.defineProperty(e,n,r)}:function(e,a,t,n){void 0===n&&(n=t),e[n]=a[t]}),r=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:!0,value:a})}:function(e,a){e.default=a}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)"default"!==t&&Object.prototype.hasOwnProperty.call(e,t)&&n(a,e,t);return r(a,e),a},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const s=o(t(634)),l=i(t(2023)),u={_container:()=>{let e=document.querySelector(".pixelpay-loading");return e||(e=document.createElement("div"),e.classList.add("pixelpay-loading"),e.innerHTML=`<div>\n\t\t\t<img alt="Powered by PixelPay®" src="${l.logo}" width="120" height="40" />\n\t\t\t<img alt="Credit/Debit card" src="${l.icon}" width="32" height="32" />\n\t\t</div>\n\t\t<p><span></span></p>`,document.querySelector("body").appendChild(e),s.default.addStylesById("loading",'.pixelpay-loading { margin: 0px; padding: 16px; display: flex; position: fixed; justify-content: center; flex-direction: column; align-items: center; z-index: 999998; background-color: rgba(0, 0, 0, 0.85); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); top: 0; right: 0; left: 0; bottom: 0; width: 100%; max-width: 100vw; transition: 0.3s opacity; visibility: hidden; opacity: 0; cursor: progress; } .pixelpay-loading * { margin: 0px; padding: 0px; } .pixelpay-loading>div { display: flex; width: 220px; max-width: 220px; justify-content: space-between; } .pixelpay-loading>div>img { opacity: 0; transition-delay: 0.2s; transition-duration: 0.3s; } .pixelpay-loading.show-loading>div>img:first-child { opacity: 1; } .pixelpay-loading>div>img:last-child { transform: translateX(-32px); } .pixelpay-loading.show-loading>div>img:last-child { opacity: 1; transform: translateX(0px); } .pixelpay-loading>p { margin-top: 10px; width: 220px; height: 4px; border-radius: 2px; background-color: rgba(255, 255, 255, 0.2); box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1); overflow: hidden; position: relative; } .pixelpay-loading>p>span { display: block; position: absolute; content: ""; left: -200px; width: 200px; height: 4px; background-color: rgba(255, 255, 255, 0.95); animation: loadingBarSDK 1s linear infinite; -moz-animation: loadingBarSDK 1s linear infinite; -webkit-animation: loadingBarSDK 1s linear infinite; border-radius: 0.5rem; } .pixelpay-loading.show-loading { visibility: visible; opacity: 1; } .pixelpay-loading.show-loading.closing-loading { cursor: default; opacity: 0 !important; } @keyframes loadingBarSDK { from { left: -200px; width: 30%; } 50% { width: 30%; } 70% { width: 70%; } 80% { left: 50%; } 95% { left: 120%; } to { left: 100%; } }'),e)},show:()=>{if(s.default.checkIsBrowser()){if(document.dispatchEvent(new Event("pxshowloading")),document.querySelector("[without-sdk-loading]"))return;u._container(),setTimeout(()=>{u._container().classList.add("show-loading")},100)}},hide:()=>{if(s.default.checkIsBrowser()){if(document.dispatchEvent(new Event("pxhideloading")),document.querySelector("[without-sdk-loading]"))return;u._container().classList.add("closing-loading"),setTimeout(()=>{u._container().classList.remove("show-loading","closing-loading")},300)}}};a.default=u},1850(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i={is_open:!1,el:null,_init:()=>(i.is_open=!1,i.el=document.querySelector("body .pixelpay-modal"),i.el||(i.el=i._createModalElement()),i.el),_createContainer:()=>{const e=document.createElement("div");return e.classList.add("pixelpay-modal-container"),e.setAttribute("aria-modal","true"),e},_createLoading:()=>{const e=document.createElement("p");return e.innerHTML="<span></span>",e},_createModalElement:()=>{const e=document.createElement("div");return e.classList.add("pixelpay-modal"),e.setAttribute("aria-hidden","true"),e.appendChild(i._createContainer()),e.appendChild(i._createLoading()),document.querySelector("body").appendChild(e),r.default.addStylesById("modal",'.pixelpay-modal { font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif; margin: 0px; padding: 16px; display: flex; position: fixed; justify-content: center; flex-direction: column; align-items: center; z-index: 999999; top: 0; right: 0; left: 0; bottom: 0; width: 100%; max-width: 100vw; transition: 0.3s opacity; visibility: hidden; opacity: 0; cursor: progress; border-radius: 3px; } .pixelpay-modal.open-modal { visibility: visible; opacity: 1; } .pixelpay-modal.open-modal .pixelpay-modal-container { transform: translateY(0); } .pixelpay-modal * { margin: 0px; padding: 0px; } .pixelpay-modal>p { width: 100%; min-width: 250px; max-width: 500px; margin-top: 10px; height: 4px; border-radius: 2px; background-color: rgba(255, 255, 255, 0.2); box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1); overflow: hidden; position: relative; } .pixelpay-modal>p>span { display: block; position: absolute; content: ""; left: -200px; width: 200px; height: 4px; background-color: rgba(255, 255, 255, 0.95); animation: loadingBarSDK 1s linear infinite; -moz-animation: loadingBarSDK 1s linear infinite; -webkit-animation: loadingBarSDK 1s linear infinite; border-radius: 0.5rem; } .pixelpay-modal .pixelpay-modal-container { display: block; width: 100%; min-width: 250px; min-height: 400px; max-width: 500px; max-height: 600px; margin: 0 auto; background-color: transparent; text-align: center; will-change: transform; transform: translateY(-15%); transition: 0.3s transform cubic-bezier(0, 0, 0.2, 1); border-radius: 3px; background-color: #fff; box-shadow: 0 6px 22px -3px #000; cursor: default; } .pixelpay-modal[data-size="01"] .pixelpay-modal-container { width: 250px; max-width: 250px; } .pixelpay-modal[data-size="02"] .pixelpay-modal-container { width: 390px; max-width: 390px; } .pixelpay-modal[data-size="03"] .pixelpay-modal-container { width: 500px; max-width: 500px; } .pixelpay-modal[data-size="04"] .pixelpay-modal-container { width: 600px; max-width: 600px; } .pixelpay-modal[data-size="05"] .pixelpay-modal-container { width: 100%; height: 100%; max-width: 100%; max-height: 100%; } .pixelpay-modal[data-size="01"]>p { width: 250px; } .pixelpay-modal[data-size="02"]>p { width: 390px; } .pixelpay-modal[data-size="03"]>p { width: 500px; } .pixelpay-modal[data-size="04"]>p { width: 600px; } .pixelpay-modal[data-size="05"]>p { width: 100%; } .pixelpay-modal .pixelpay-modal-container > iframe { display: block; } .pixelpay-modal-iframe { width: 100%; height: 100%; max-height: 100vh; background-color: #fff; opacity: 1; transition: opacity 0.3s ease; border-radius: 3px; } @keyframes rotating { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }'),e},show:()=>{if(r.default.checkIsBrowser()){if(document.dispatchEvent(new Event("pxshowmodal")),document.querySelector("[without-sdk-modal]"))return;i._init(),setTimeout(()=>{i.el.classList.add("open-modal"),i.el.setAttribute("aria-hidden","true"),i.is_open=!0},100)}},hide:()=>{if(r.default.checkIsBrowser()){if(document.dispatchEvent(new Event("pxshowmodal")),document.querySelector("[without-sdk-modal]"))return;i._init(),setTimeout(()=>{i.el.classList.remove("pixelpay-modal-fullscreen"),i.el.classList.remove("open-modal"),i.el.setAttribute("aria-hidden","false");const e=i.el.querySelector(".pixelpay-modal-iframe");e&&e.parentNode.removeChild(e),i.is_open=!1,i.el.dispatchEvent(new Event("onclose"))},300)}}};a.default=i},5473(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(6266)),i=n(t(7473)),o=n(t(9411));a.default=class{constructor(e){this.transaction=e,this.transaction.source="router"}async init(e){const a=new r.default(this.parsePayload(e));return r.default.busy=!1,this.transaction instanceof i.default?await a.doSale(this.transaction):await a.doAuth(this.transaction)}parsePayload(e){const a=JSON.parse(atob(e)),t=new o.default;return t.setupEnvironment(a.env),t.setupCredentials(a.auth_key,a.auth_hash),t.setupEndpoint(a.endpoint),t.setupLanguage(this.transaction.lang),a.auth_user&&t.setupPlatformUser(a.auth_user),t}}},2423(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=class{constructor(){this.address=void 0,this.country=void 0,this.state=void 0,this.city=void 0,this.zip=void 0,this.phone=void 0}}},8888(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=class{constructor(){this.number=void 0,this.cvv2=void 0,this.expire_month=void 0,this.expire_year=void 0,this.cardholder=void 0}getExpireFormat(){if(!this.expire_month||!this.expire_year)return"";const e=String(this.expire_year),a=("00"+this.expire_month).slice(-2);return e.substr(-2)+a}}},8113(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=class{constructor(){this.code=void 0,this.title=void 0,this.price=void 0,this.qty=void 0,this.tax=void 0,this.total=void 0,this.price=0,this.qty=1,this.tax=0,this.total=0}totalize(){return this.total=this.price*this.qty,this}}},7424(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=class{constructor(){this.id=void 0,this.currency=void 0,this.amount=void 0,this.tax_amount=void 0,this.shipping_amount=void 0,this.content=void 0,this.extras=void 0,this.note=void 0,this.callback_url=void 0,this.customer_name=void 0,this.customer_email=void 0,this.content=[],this.extras={}}addItem(e){return this.content.push(e),this.totalize(),this}addExtra(e,a){return this.extras[e]=a,this}totalize(){return this.content.length?(this.amount=0,this.tax_amount=0,this.content.forEach(e=>{e.totalize(),this.amount+=e.total,this.tax_amount+=e.tax*e.qty}),this):this}}},9411(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i=n(t(3514));a.default=class{constructor(){this.auth_key=void 0,this.auth_hash=void 0,this.auth_user=void 0,this.endpoint=void 0,this.environment=void 0,this.lang=void 0,this.sdk=void 0,this.sdk_version=void 0,this.headers=void 0,this.endpoint="https://pixelpay.app"}setupEndpoint(e){this.endpoint=e}setupCredentials(e,a){this.auth_key=e,this.auth_hash=a}setupPlatformUser(e){this.auth_user=e}setupEnvironment(e){this.environment=e}setupSandbox(){this.endpoint="https://pixelpay.dev",this.auth_key="1234567890",this.auth_hash=r.default.hash("MD5","@s4ndb0x-abcd-1234-n1l4-p1x3l"),this.environment=i.default.SANDBOX}setupLanguage(e){this.lang=e}setupHeaders(e){this.headers=e}}},235(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i=n(t(4048));class o extends i.default{setOrder(e){this.order_id=e.id,this.order_currency=e.currency,this.order_amount=r.default.parseAmount(e.amount)}}a.default=o},6402(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(4048));class i extends r.default{}a.default=i},388(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2823));class i extends r.default{constructor(){super(...arguments),this.payment_uuid=null,this.transaction_approved_amount=null}}a.default=i},3331(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2823)),i=n(t(634));class o extends r.default{constructor(){super(...arguments),this.number=null,this.cvv2=null,this.expire_month=null,this.expire_year=null,this.cardholder=null,this.address=null,this.country=null,this.state=null,this.city=null,this.zip=null,this.phone=null,this.email=null}setCard(e){this.number=i.default.cleanString(e.number),this.cvv2=e.cvv2,this.cardholder=i.default.trimValue(e.cardholder),e.expire_month&&(this.expire_month=("00"+e.expire_month).slice(-2)),e.expire_year&&(this.expire_year=String(e.expire_year))}setBilling(e){this.address=i.default.trimValue(e.address),this.country=e.country,this.state=e.state,this.city=i.default.trimValue(e.city),this.zip=e.zip,this.phone=e.phone}}a.default=o},4341(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2823));class i extends r.default{constructor(){super(...arguments),this.identifier=null,this.payload=null,this.card_token=null,this.authenticate_token=!1}}a.default=i},5634(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2823)),i=n(t(235)),o=n(t(7473));class s extends r.default{constructor(){super(...arguments),this.card_token=null,this.card_number=null,this.card_cvv=null,this.card_expire=null,this.billing_address=null,this.billing_country=null,this.billing_state=null,this.billing_city=null,this.billing_zip=null,this.billing_phone=null,this.customer_name=null,this.customer_email=null,this.order_id=null,this.order_currency=null,this.order_amount=null,this.installment=null,this.secure_payload=null,this.apple_pay=null,this.click_to_pay=null,this.reference=null,this.browser_java_enabled="false",this.browser_header=null,this.browser_language=null,this.browser_color_depth=null,this.browser_screen_height=null,this.browser_screen_width=null,this.browser_time_zone=null,this.user_agent=null,this.ip_address=null,this.device_channel="Browser",this.browser_javascript_enabled="true",this.authenticate_token=!1}fromPaymentTransaction(e){this.card_token=e.card_token,this.card_number=e.card_number,this.card_expire=e.card_expire,this.billing_address=e.billing_address,this.billing_country=e.billing_country,this.billing_state=e.billing_state,this.billing_city=e.billing_city,this.billing_zip=e.billing_zip,this.billing_phone=e.billing_phone,this.customer_name=e.customer_name,this.customer_email=e.customer_email,this.order_id=e.order_id,this.order_currency=e.order_currency,this.order_amount=e.order_amount,this.secure_payload=e.secure_payload,this.apple_pay=e.apple_pay,this.click_to_pay=e.click_to_pay,this.authenticate_token=e instanceof i.default,e instanceof o.default&&(this.installment=e.installment_months)}setRequiredEMVFields(){this.browser_java_enabled||(this.browser_java_enabled="function"==typeof navigator.javaEnabled?navigator.javaEnabled().toString():"false"),this.browser_language||(this.browser_language=navigator.language),this.browser_color_depth||(this.browser_color_depth=screen.colorDepth.toString()),this.browser_screen_height||(this.browser_screen_height=screen.height.toString()||window.innerHeight.toString()),this.browser_screen_width||(this.browser_screen_width=screen.width.toString()||window.innerWidth.toString()),this.browser_time_zone||(this.browser_time_zone=(new Date).getTimezoneOffset().toString()),this.user_agent||(this.user_agent=navigator.userAgent)}}a.default=s},4048(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i=n(t(2823));class o extends i.default{constructor(){super(...arguments),this.payment_uuid=null,this.card_token=null,this.card_number=null,this.card_cvv=null,this.card_expire=null,this.card_holder=null,this.billing_address=null,this.billing_country=null,this.billing_state=null,this.billing_city=null,this.billing_zip=null,this.billing_phone=null,this.customer_name=null,this.customer_email=null,this.customer_fingerprint=null,this.order_id=null,this.order_currency=null,this.order_amount=null,this.order_tax_amount=null,this.order_shipping_amount=null,this.order_content=[],this.order_extras={},this.order_note=null,this.order_callback=null,this.authentication_request=!1,this.authentication_identifier=null,this.secure_payload=null,this.apple_pay=null,this.click_to_pay=null,this.source=null,this.before_execute=null}setCard(e){this.card_number=r.default.cleanString(e.number),this.card_cvv=e.cvv2,this.card_expire=e.getExpireFormat(),this.card_holder=r.default.trimValue(e.cardholder)}setCardToken(e=null){this.card_token=e}setBilling(e){this.billing_address=r.default.trimValue(e.address),this.billing_country=e.country,this.billing_state=e.state,this.billing_city=r.default.trimValue(e.city),this.billing_zip=e.zip,this.billing_phone=e.phone}setOrder(e){this.order_id=e.id,this.order_currency=e.currency,this.order_amount=r.default.parseAmount(e.amount),this.order_tax_amount=r.default.parseAmount(e.tax_amount),this.order_shipping_amount=r.default.parseAmount(e.shipping_amount),this.order_content=e.content,this.order_extras=e.extras,this.order_note=r.default.trimValue(e.note),this.order_callback=e.callback_url,this.customer_name=r.default.trimValue(e.customer_name),this.customer_email=e.customer_email}withAuthenticationRequest(){this.authentication_request=!0}setBeforeExecute(e){this.before_execute=e}async doBeforeExecute(){this.before_execute&&await this.before_execute()}}a.default=o},7473(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i=n(t(4048));class o extends i.default{constructor(){super(...arguments),this.installment_type=null,this.installment_months=null,this.points_redeem_amount=null}setInstallment(e,a){this.installment_months=String(e),this.installment_type=a}withPointsRedeemAmount(e){this.points_redeem_amount=r.default.parseAmount(e)}}a.default=o},4282(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2823));class i extends r.default{constructor(){super(...arguments),this.payment_uuid=null}}a.default=i},2210(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2823));class i extends r.default{constructor(){super(...arguments),this.payment_uuid=null,this.void_reason=null,this.void_signature=null}}a.default=i},3514(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});class t{}a.default=t,t.LIVE="live",t.TEST="test",t.SANDBOX="sandbox",t.STAGING="staging"},1299(e,a,t){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,a,t,n){void 0===n&&(n=t);var r=Object.getOwnPropertyDescriptor(a,t);r&&!("get"in r?!a.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return a[t]}}),Object.defineProperty(e,n,r)}:function(e,a,t,n){void 0===n&&(n=t),e[n]=a[t]}),r=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:!0,value:a})}:function(e,a){e.default=a}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)"default"!==t&&Object.prototype.hasOwnProperty.call(e,t)&&n(a,e,t);return r(a,e),a};Object.defineProperty(a,"__esModule",{value:!0});const o=i(t(5021)),s=i(t(4363)),l=i(t(7639));a.default={countriesList:()=>o||{},statesList:e=>Object.prototype.hasOwnProperty.call(s||{},e)&&s[e]||{},formatsList:e=>Object.prototype.hasOwnProperty.call(l||{},e)&&l[e]||{}}},1935(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},4575(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},5037(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},7071(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},2046(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},4756(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},7867(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},2701(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},3596(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},9250(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},8618(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(2624));class i extends r.default{}a.default=i},1020(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(4013)),i=n(t(7473)),o=n(t(6402)),s=n(t(1742));class l extends r.default{free(){l.runningTransaction=null}authenticationLookup(e){return this.post("api/v2/cardinal/authentication/lookup",e)}authenticationContinue(e){return this.post("api/v2/cardinal/authentication/continue",e)}async retryTransaction(e){if(await e.doBeforeExecute(),l.runningTransaction)return l.runningTransaction;if(!(e instanceof i.default||e instanceof o.default))throw this.free(),new s.default("The request payment type is invalid.");const a="api/v2/transaction/"+(e instanceof i.default?"sale":"auth");return l.runningTransaction=this.post(a,e).finally(this.free),l.runningTransaction}}a.default=l,l.runningTransaction=null},4787(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i=n(t(2823)),o=n(t(4013)),s=n(t(7867)),l=n(t(9250)),u=n(t(2711)),c=n(t(1574)),d=n(t(1742)),h="api/v2/tokenization/card";class p extends o.default{async vaultCard(e){u.default.show();const a=await this.post(h,e);return u.default.hide(),a}async authCard(e){if(!r.default.checkIsBrowser())throw new d.default("This platform not support 3DS transactions");try{u.default.show();const a=await this.post(h+"/auth",e);return a instanceof l.default&&a.data.authentication_identifier?a:a instanceof s.default&&"songbird"==a.data.transaction_type?await new c.default(this.settings,e).init(a.data.payload,a.data.collection_url):(c.default.clearAllEvents(),a)}catch(e){throw c.default.clearAllEvents(),e}finally{u.default.hide()}}async updateCard(e,a){u.default.show();const t=await this.put(h+"/"+e,a);return u.default.hide(),t}showCard(e){return this.get(h+"/"+e,new i.default)}showCards(e){let a=e.join(":");return this.get(h+"/"+a.split(" ").join(""),new i.default)}async deleteCard(e){u.default.show();const a=await this.delete(h+"/"+e,new i.default);return u.default.hide(),a}}a.default=p},6266(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i=n(t(4013)),o=n(t(1742)),s=n(t(2350)),l=n(t(2711)),u=n(t(7867)),c=n(t(1574)),d=n(t(5184)),h=n(t(1598)),p=n(t(5473));class f extends i.default{constructor(e){super(e)}static withConcurrency(){f.concurrent=!0}async doSale(e){var a,t;if(await e.doBeforeExecute(),e.authentication_request&&!r.default.checkIsBrowser())throw new o.default("This platform not support 3DS transactions");if(!f.concurrent&&f.busy)throw new s.default("There's an active transaction still running.");try{l.default.show(),f.busy=!0;const n=await this.post("api/v2/transaction/sale",e);if(n instanceof u.default)switch(null===(a=n.data)||void 0===a?void 0:a.transaction_type){case"songbird":return await new c.default(this.settings,e).init(n.data.payload,null===(t=n.data)||void 0===t?void 0:t.collection_url);case"payload":return await new d.default(this.settings).loadPayload(n.data.payload);case"router":return await new p.default(e).init(n.data.payload);default:throw new s.default("This type of transaction is invalid")}return c.default.clearAllEvents(),n}catch(e){throw c.default.clearAllEvents(),e}finally{l.default.hide(),f.busy=!1}}async doAuth(e){var a,t;if(await e.doBeforeExecute(),e.authentication_request&&!r.default.checkIsBrowser())throw new o.default("This platform not support 3DS transactions");if(!f.concurrent&&f.busy)throw new s.default("There's an active transaction still running.");try{l.default.show(),f.busy=!0;const n=await this.post("api/v2/transaction/auth",e);if(n instanceof u.default)switch(null===(a=n.data)||void 0===a?void 0:a.transaction_type){case"songbird":return await new c.default(this.settings,e).init(n.data.payload,null===(t=n.data)||void 0===t?void 0:t.collection_url);case"payload":return await new d.default(this.settings).loadPayload(n.data.payload);case"router":return await new p.default(e).init(n.data.payload);default:throw new s.default("This type of transaction is invalid")}return c.default.clearAllEvents(),n}catch(e){throw c.default.clearAllEvents(),e}finally{l.default.hide(),f.busy=!1}}async doCapture(e){l.default.show();const a=await this.post("api/v2/transaction/capture",e);return l.default.hide(),a}async doVoid(e){l.default.show();const a=await this.post("api/v2/transaction/void",e);return l.default.hide(),a}getStatus(e){return this.post("api/v2/transaction/status",e)}verifyPaymentHash(e,a,t){if(r.default.checkIsBrowser())throw new o.default("This platform not support hash validations in browser/frontend");const n=[a,this.settings.auth_key,t].join("|");return e===r.default.hash("MD5",n)}getCybersourceFingerprint(e,a){return h.default.getFingerprint(e,a)}}a.default=f,f.busy=!1,f.concurrent=!1},1333(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default="2.4.10"},8743(e,a,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});const r=n(t(634)),i=t(3909);r.default.checkIsBrowser()&&(window.Entities=i.Entities,window.Exceptions=i.Exceptions,window.Models=i.Models,window.Requests=i.Requests,window.Resources=i.Resources,window.Responses=i.Responses,window.Services=i.Services)},7526(e,a){"use strict";a.byteLength=function(e){var a=s(e),t=a[0],n=a[1];return 3*(t+n)/4-n},a.toByteArray=function(e){var a,t,i=s(e),o=i[0],l=i[1],u=new r(function(e,a,t){return 3*(a+t)/4-t}(0,o,l)),c=0,d=l>0?o-4:o;for(t=0;t<d;t+=4)a=n[e.charCodeAt(t)]<<18|n[e.charCodeAt(t+1)]<<12|n[e.charCodeAt(t+2)]<<6|n[e.charCodeAt(t+3)],u[c++]=a>>16&255,u[c++]=a>>8&255,u[c++]=255&a;2===l&&(a=n[e.charCodeAt(t)]<<2|n[e.charCodeAt(t+1)]>>4,u[c++]=255&a);1===l&&(a=n[e.charCodeAt(t)]<<10|n[e.charCodeAt(t+1)]<<4|n[e.charCodeAt(t+2)]>>2,u[c++]=a>>8&255,u[c++]=255&a);return u},a.fromByteArray=function(e){for(var a,n=e.length,r=n%3,i=[],o=16383,s=0,l=n-r;s<l;s+=o)i.push(u(e,s,s+o>l?l:s+o));1===r?(a=e[n-1],i.push(t[a>>2]+t[a<<4&63]+"==")):2===r&&(a=(e[n-2]<<8)+e[n-1],i.push(t[a>>10]+t[a>>4&63]+t[a<<2&63]+"="));return i.join("")};for(var t=[],n=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)t[o]=i[o],n[i.charCodeAt(o)]=o;function s(e){var a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");return-1===t&&(t=a),[t,t===a?0:4-t%4]}function l(e){return t[e>>18&63]+t[e>>12&63]+t[e>>6&63]+t[63&e]}function u(e,a,t){for(var n,r=[],i=a;i<t;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),r.push(l(n));return r.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287(e,a,t){"use strict";var n=t(7526),r=t(251);
|
|
2
2
|
/*!
|
|
3
3
|
* The buffer module from node.js, for the browser.
|
|
4
4
|
*
|
|
@@ -207,8 +207,8 @@ class CardinalManager {
|
|
|
207
207
|
if (event.origin !== new URL(this.collection_url).origin) {
|
|
208
208
|
return;
|
|
209
209
|
}
|
|
210
|
-
const event_data =
|
|
211
|
-
if (event_data.MessageType === 'profile.completed') {
|
|
210
|
+
const event_data = Helpers_1.default.safeParse(event.data);
|
|
211
|
+
if ((event_data === null || event_data === void 0 ? void 0 : event_data.MessageType) === 'profile.completed') {
|
|
212
212
|
return await this.handleDirectApiLookup(event_data);
|
|
213
213
|
}
|
|
214
214
|
}
|
|
@@ -260,7 +260,7 @@ class CardinalManager {
|
|
|
260
260
|
*/
|
|
261
261
|
async handleDirectApiLookup(event_data) {
|
|
262
262
|
var _a, _b;
|
|
263
|
-
const sessionId = event_data.SessionId || ((_a = event_data.Payload) === null || _a === void 0 ? void 0 : _a.SessionId);
|
|
263
|
+
const sessionId = (event_data === null || event_data === void 0 ? void 0 : event_data.SessionId) || ((_a = event_data === null || event_data === void 0 ? void 0 : event_data.Payload) === null || _a === void 0 ? void 0 : _a.SessionId);
|
|
264
264
|
if (!sessionId) {
|
|
265
265
|
const failure = new FailureResponse_1.default();
|
|
266
266
|
failure.setStatus(520);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardinalManager.js","sourceRoot":"","sources":["../../src/libraries/CardinalManager.ts"],"names":[],"mappings":";;;;;AAAA,8DAAsC;AAGtC,oFAA4D;AAC5D,sGAA8E;AAC9E,sFAA8D;AAE9D,2EAAmD;AACnD,mFAA2D;AAC3D,gGAAwE;AACxE,wEAAwC;AACxC,oEAAoC;AAQpC,MAAqB,eAAe;IA8CnC;;OAEG;IACH,YAAY,QAAkB,EAAE,OAA2B;QAvB3D;;WAEG;QACH,eAAU,GAAY,KAAK,CAAC;QAqB3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,gCAAsB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1D,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,cAAc;QACpB,IAAI,iBAAO,CAAC,cAAc,EAAE,EAAE;YAC7B,yBAAO,CAAC,IAAI,EAAE,CAAC;YAEf,IAAI,OAAO,MAAM,CAAC,QAA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.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "2.4.
|
|
1
|
+
declare const _default: "2.4.10";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/lib/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;AAAA,kBAAe,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;AAAA,kBAAe,QAAQ,CAAC"}
|