first commit

This commit is contained in:
2026-03-05 13:07:40 +01:00
commit 64ba0721ee
25709 changed files with 4691006 additions and 0 deletions

View File

@@ -0,0 +1 @@
.payu-table input[data-global=can-be-global][readonly=readonly]{color:transparent}.payu-table .absolute-global fieldset{position:relative}.payu-table .absolute-global fieldset span{position:absolute;left:10px;top:6px}.receive-payment{border:1px solid #a6c307 !important;color:#fff !important;background:#a6c307 !important}.discard-payment{border:1px solid red !important;color:#fff !important;background:red !important}.payu-red{color:#a00}

View File

@@ -0,0 +1,31 @@
.payu-table{
input[data-global="can-be-global"]{
&[readonly="readonly"]{
color: transparent;
}
}
.absolute-global{
fieldset{
position: relative;
span{
position: absolute;
left: 10px;
top: 6px;
}
}
}
}
.receive-payment{
border: 1px solid #a6c307 !important;
color: #fff !important;
background: #a6c307 !important;
}
.discard-payment{
border: 1px solid #ff0000 !important;
color: #fff !important;
background: #ff0000 !important;
}
.payu-red {
color: #aa0000;
}

View File

@@ -0,0 +1 @@
.pbl-container{display:flex;justify-content:center;flex-direction:column}.pbl-container .payu-list-banks{list-style-type:none;display:flex;flex-wrap:wrap;margin:0;padding:0;justify-content:center}.pbl-container .payu-list-banks li{padding:5px 3px 0}.pbl-container .payu-list-banks li.payu-inactive{opacity:.5;-webkit-filter:grayscale(1);-moz-filter:grayscale(1);-ms-filter:grayscale(1);-o-filter:grayscale(1);filter:grayscale(1);filter:gray}.pbl-container .payu-list-banks li:not(.payu-inactive) label{cursor:pointer}.pbl-container .payu-list-banks li:not(.payu-inactive) label:hover{background:#ddd;border-color:#aaa}.pbl-container .payu-list-banks li label{padding:10px;display:flex;border:1px solid #bbb;transition:all 250ms;width:86px;justify-content:center;align-items:center}.pbl-container .payu-list-banks li label.active{background:#ddd;border-color:#aaa}.pbl-container .payu-list-banks li label img{width:auto;height:31px;object-fit:contain;margin:0 !important;padding:0}.pbl-container .payu-list-banks li label input{display:none}.pbl-container .pbl-error{padding-top:.5em;padding-bottom:.5em;margin-top:.5em;margin-bottom:.5em;display:none}.pbl-container .pbl-error:before{top:.5em}.payu-accept-conditions{margin-top:15px}.payu-accept-conditions .payu-conditions-description{margin-top:8px;font-size:12px;line-height:120%}.payu-accept-conditions .payu-conditions-description>div{margin:5px 0}.payu-accept-conditions .payu-conditions-description a{text-decoration:underline}.payu-accept-conditions .payu-conditions-description .payu-read-more{text-decoration:underline;cursor:pointer}.payu-accept-conditions .payu-conditions-description .payu-more-hidden{display:none}#payu-card-container{max-width:350px;margin:10px auto 10px;text-align:left;box-sizing:border-box;border:1px solid #bbb;padding:5px;border-radius:5px;background-color:#ddd;color:#333}#payu-card-container .payu-sf-validation-error,#payu-card-container .payu-sf-technical-error{display:none;color:#b21b0f;font-size:13px}#payu-card-container .payu-card-form{background-color:#fff;padding:5px;border-radius:4px;border:1px solid transparent}#payu-card-container .payu-secure-form-invalid:not(.payu-secure-form-focus){border-color:#b21b0f}#payu-card-container label{padding-bottom:2px;font-size:15px}.card-details{clear:both;overflow:auto;margin-top:10px}.card-details .expiration{width:47%;float:left;margin-right:5%}.card-details .cvv{width:47%;float:left}#tokenizeButton{border:none;background:#438f29;padding:8px 15px;cursor:pointer;color:#fff;display:table;margin:10px auto 0}.response-success{color:#438f29}.response-error{color:#900}.autonomy-payu-button{display:flex;align-items:center;text-decoration:none;margin:10px 0}.autonomy-payu-button img{margin-left:10px;width:50px;height:auto}label[for*=payment_method_payu] img{border-radius:0}

View File

@@ -0,0 +1,193 @@
.pbl-container {
display: flex;
justify-content: center;
flex-direction: column;
.payu-list-banks {
list-style-type: none;
display: flex;
flex-wrap: wrap;
margin: 0;
padding: 0;
justify-content: center;
li {
padding: 5px 3px 0;
&.payu-inactive {
opacity: 0.5;
-webkit-filter: grayscale(1);
-moz-filter: grayscale(1);
-ms-filter: grayscale(1);
-o-filter: grayscale(1);
filter: grayscale(1);
filter: gray;
}
&:not(.payu-inactive) {
label {
cursor: pointer;
&:hover {
background: #ddd;
border-color: #aaa;
}
}
}
label {
padding: 10px;
display: flex;
border: 1px solid #bbb;
transition: all 250ms;
width: 86px;
justify-content: center;
align-items: center;
&.active {
background: #ddd;
border-color: #aaa;
}
img {
width: auto;
height: 31px;
object-fit: contain;
margin: 0 !important;
padding: 0;
}
input {
display: none;
}
}
}
}
.pbl-error {
padding-top: 0.5em;
padding-bottom: 0.5em;
margin-top: 0.5em;
margin-bottom: 0.5em;
display: none;
&:before {
top: 0.5em
}
}
}
.payu-accept-conditions {
margin-top: 15px;
.payu-conditions-description {
margin-top: 8px;
font-size: 12px;
line-height: 120%;
> div {
margin: 5px 0;
}
a {
text-decoration: underline;
}
.payu-read-more {
text-decoration: underline;
cursor: pointer;
}
.payu-more-hidden {
display: none;
}
}
}
#payu-card-container {
max-width: 350px;
margin: 10px auto 10px;
text-align: left;
box-sizing: border-box;
border: 1px solid #bbb;
padding: 5px;
border-radius: 5px;
background-color: #ddd;
color: #333;
.payu-sf-validation-error, .payu-sf-technical-error {
display: none;
color: #b21b0f;
font-size: 13px;
}
}
#payu-card-container {
.payu-card-form {
background-color: #ffffff;
padding: 5px;
border-radius: 4px;
border: 1px solid transparent;
}
.payu-secure-form-invalid:not(.payu-secure-form-focus) {
border-color: #b21b0f;
}
label {
padding-bottom: 2px;
font-size: 15px;
}
}
.card-details {
clear: both;
overflow: auto;
margin-top: 10px;
}
.card-details .expiration {
width: 47%;
float: left;
margin-right: 5%;
}
.card-details .cvv {
width: 47%;
float: left;
}
#tokenizeButton {
border: none;
background: #438F29;
padding: 8px 15px;
cursor: pointer;
color: #fff;
display: table;
margin: 10px auto 0;
}
.response-success {
color: #438F29;
}
.response-error {
color: #990000;
}
.autonomy-payu-button {
display: flex;
align-items: center;
text-decoration: none;
margin: 10px 0;
img {
margin-left: 10px;
width: 50px;
height: auto;
}
}
label[for*="payment_method_payu"] {
img {
border-radius: 0;
}
}

View File

@@ -0,0 +1,5 @@
#installment-mini-cart {
margin: inherit;
padding-left: inherit;
font-size: 14px;
}

View File

@@ -0,0 +1 @@
#installment-mini-cart{margin:inherit;padding-left: inherit;font-size: 14px;}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 52 KiB

View File

@@ -0,0 +1,8 @@
<svg version="1.1" width="95" height="23" viewBox="0 0 95 23" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(.3162 0 0 .3194 55.82 -2.376)">
<rect x="48.37" y="15.14" width="34.66" height="56.61" fill="#ff5f00"/>
<path d="m51.94 43.45a35.94 35.94 0 0113.75-28.3 36 36 0 100 56.61 35.94 35.94 0 01-13.75-28.31z" fill="#eb001b"/>
<path d="m123.9 43.45a36 36 0 01-58.25 28.3 36 36 0 000-56.61 36 36 0 0158.25 28.3z" fill="#f79e1b"/>
</g>
<path d="m25.74 3.413-3.475 16.31h-4.2l3.475-16.31zm17.67 10.53 2.212-6.125 1.273 6.125zm4.687 5.779h3.885l-3.39-16.31h-3.587c-.8058 0-1.486.471-1.789 1.197l-6.303 15.12h4.411l.8758-2.436h5.389zm-10.96-5.327c.01809-4.305-5.927-4.543-5.886-6.466.01226-.5856.5677-1.207 1.781-1.367.6028-.07906 2.261-.1397 4.143.7301l.7366-3.459c-1.011-.3689-2.311-.7234-3.93-.7234-4.152 0-7.074 2.217-7.098 5.393-.02599 2.347 2.086 3.658 3.679 4.439 1.635.7998 2.186 1.312 2.18 2.027-.01088 1.095-1.306 1.578-2.514 1.596-2.112.03359-3.338-.5728-4.315-1.03l-.761 3.574c.9813.4531 2.793.8465 4.672.8668 4.413 0 7.299-2.191 7.314-5.581m-17.4-10.99-6.805 16.31h-4.44l-3.349-13.02c-.2034-.8019-.3803-1.095-.9987-1.433-1.009-.5503-2.676-1.067-4.144-1.387l.1006-.4739h7.147c.9107 0 1.73.609 1.937 1.664l1.769 9.44 4.371-11.1z" style="fill:#1434cb;stroke-width:1.533"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,11 @@
<svg version="1.1" width="50" height="25" viewBox="0 0 50 25" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(.2222 0 0 -.2222 0 32.07)" fill="#a6c307">
<path d="m195.1 101.8c-1.462 0-2.646 1.188-2.645 2.652l.004 11.72h-.9756c-6.051 0-8.302-1-8.302-6.524v-12.92c-.00078-.02737-.004-.0548-.004-.08217v-2.833c-.002-.09807-.008-.1894-.008-.2909v-18.06c0-2.206-.424-3.962-1.299-5.326-1.65-2.547-4.917-3.706-10.14-3.712-5.224.0067-8.49 1.164-10.14 3.709-.8776 1.365-1.302 3.122-1.302 5.329v18.06c0 .1014-.005.1928-.007.2909v2.833c0 .02737-.003.0548-.004.08217v12.92c0 5.524-2.251 6.524-8.302 6.524h-1.905c-6.052 0-8.302-1-8.302-6.524v-34.19c0-5.5 1.238-10.16 3.629-13.91 4.619-7.274 13.57-11.15 26.29-11.15.0156 0 .0311.000624.0467.000624.0163 0 .0311-.000624.0475-.000624 12.72 0 21.67 3.874 26.29 11.15 2.391 3.754 3.629 8.411 3.629 13.91v26.34l-6.59.002"/>
<path d="m223 120.7-9.953.004c-1.085 0-1.965.8825-1.964 1.97l.003 10.1c.00078 1.088.8814 1.97 1.967 1.97l9.953-.004c1.086 0 1.966-.8825 1.966-1.971l-.004-10.1c0-1.088-.8807-1.969-1.967-1.969"/>
<path d="m209.8 134.8-6.76.002c-.7375.00077-1.335.5995-1.335 1.338l.002 6.858c.00078.7398.599 1.338 1.336 1.338l6.76-.002c.7375 0 1.335-.5995 1.335-1.339l-.002-6.858c-.00078-.739-.5983-1.337-1.336-1.337"/>
<path d="m38.63 95.42c0-8.113-2.067-12.51-12.97-12.51h-16.79v20.94c0 2.904 1.077 3.983 3.975 3.983h12.81c8.216 0 12.97-2.031 12.97-12.41zm-12.97 20.81h-14.48c-7.735 0-11.18-3.457-11.18-11.21v-49.79c0-2.994.9591-3.956 3.947-3.956h.9782c2.988 0 3.948.9614 3.948 3.956v19.37h16.79c14.9 0 21.85 6.614 21.85 20.81 0 14.2-6.942 20.81-21.85 20.81"/>
<path d="m78.73 73.66v-6.825c0-5.564-2.058-8.786-12.58-8.786-6.952 0-10.33 2.521-10.33 7.707 0 5.687 3.39 7.903 12.09 7.903zm-12.58 28.3c-5.737 0-9.332-.7211-10.7-.9943-2.415-.5262-3.424-1.19-3.424-3.942v-.7841c0-1.078.1593-1.825.5011-2.35.3978-.6121 1.038-.9227 1.905-.9227.4227 0 .9123.07157 1.497.2177 1.379.3457 5.786 1.06 10.61 1.06 8.659 0 12.19-2.404 12.19-8.295v-5.258h-10.92c-14.04 0-20.57-4.744-20.57-14.93 0-9.882 6.751-15.32 19.01-15.32 14.57 0 21.06 4.967 21.06 16.11v19.41c0 10.77-6.922 16.01-21.16 16.01"/>
<path d="m135.3 99.64c-.6185.7781-1.788.8853-2.96.8853h-.8791c-2.921 0-4.067-.9029-4.714-3.711l-8.117-33.81c-1.013-4.155-2.437-4.914-4.872-4.914-2.983 0-4.177.7135-5.366 4.931l-9.194 33.81c-.7609 2.832-1.883 3.695-4.806 3.695h-.7826c-1.179 0-2.354-.1088-2.957-.8968-.6037-.7893-.3999-1.967-.08869-3.125l9.291-34.1c1.743-6.527 3.814-11.93 11.56-11.93 1.445 0 2.781.201 3.893.5768-2.348-7.399-4.736-10.66-11.78-11.39-1.429-.119-2.358-.3243-2.875-1.02-.5376-.7211-.4154-1.754-.2233-2.676l.1937-.8746c.4201-2.022 1.137-3.276 3.402-3.276.2381 0 .494.01249.7686.03593 10.52.6897 16.15 6.364 19.45 19.58l11.25 45.1c.2668 1.157.4279 2.335-.189 3.112"/>
<path d="m208.5 120.7-13.4.005c-1.462 0-2.647-1.187-2.647-2.652l-.00078-1.873h.9297c6.051 0 8.302-1 8.302-6.524v-7.852l6.811-.002c1.462-.00085 2.647 1.186 2.647 2.651l.005 13.59c0 1.465-1.184 2.653-2.645 2.654"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -0,0 +1,15 @@
<svg version="1.1" width="84" height="23" viewBox="0 0 84 23" xmlns="http://www.w3.org/2000/svg">
<defs>
<style>.cls-1{fill:#a70584;}.cls-2{fill:#36b587;}.cls-3{fill:#fad05b;}.cls-4{fill:#000000;}</style>
</defs>
<g transform="matrix(.082111 0 0 .082115 -1.9197 -1.5922)">
<rect class="cls-1" transform="rotate(90 133.64 208.26)" x="103.88" y="178.25" width="59.51" height="60"/>
<rect class="cls-2" transform="rotate(90 133.38 127.76)" x="103.39" y="97.76" width="60" height="60"/>
<rect class="cls-3" transform="rotate(90 53.385 207.76)" x="23.39" y="177.76" width="60" height="60"/>
<path class="cls-4" d="m342.51 94c0 41.36-33.28 74.65-76.2 74.65h-32.66v68.42h-49.76v-217.68h82.42c42.92 0 76.2 33.28 76.2 74.61zm-49.76 0c0-15.87-11.2-28-26.44-28h-32.66v56h32.66c15.24 0 26.44-12.1 26.44-28z"/>
<path class="cls-4" d="m516.07 77.35v159.65h-47.89v-15c-10.54 12.13-26.18 19.48-47.58 19.48-41.82 0-76.31-36.72-76.31-84.3s34.49-84.29 76.31-84.29c21.4 0 37 7.34 47.58 19.48v-15zm-47.89 79.82c0-23.94-16-38.95-38-38.95s-38 15-38 38.95 16 39 38 39 38-15.05 38-39z"/>
<path class="cls-4" d="m698 77.35-54.2 153.79c-17.76 50.42-46 70.4-90.37 68.18v-44.4c22.19 0 32.66-7 39.64-26.31l-63.07-151.26h52.32l35.2 97 29.81-97z"/>
<path class="cls-4" d="m875.32 94c0 41.36-33.29 74.65-76.21 74.65h-32.66v68.42h-49.76v-217.68h82.42c42.89 0 76.21 33.28 76.21 74.61zm-49.77 0c0-15.87-11.2-28-26.44-28h-32.66v56h32.66c15.24 0 26.44-12.1 26.44-28z"/>
<path class="cls-4" d="m881.54 159.35c0-46.34 36.7-82.11 82.42-82.11s82.43 35.77 82.43 82.11-36.71 82.12-82.43 82.12-82.42-35.77-82.42-82.12zm118.19 0c0-22.08-15.55-36.7-35.77-36.7s-35.77 14.62-35.77 36.7 15.55 36.71 35.77 36.71 35.77-14.62 35.77-36.71z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,30 @@
<svg version="1.1" width="77" height="23" viewBox="0 0 77 23" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="linearGradient-1" x1="50.792" x2="73.45" y1="-2.9245" y2="19.734" gradientTransform="scale(1.0009 .9991)" gradientUnits="userSpaceOnUse">
<stop stop-color="#82BC00" stop-opacity="0" offset="0"/>
<stop stop-color="#82BC00" offset="1"/>
</linearGradient>
</defs>
<g transform="scale(.32857)" fill="none" fill-rule="evenodd">
<g transform="translate(-1038,-265)" fill-rule="nonzero">
<g transform="translate(960,180)">
<g id="Twisto-h-c" transform="translate(78,85)">
<g id="Logo">
<g id="Group" transform="translate(91.163 11.9)" fill="#4e0f89">
<path d="m11.113 27.738v-11.32h5.6646v-5.7754h-5.6646v-7.0459h-7.1675v7.0459h-3.9305v5.7754h3.9305v12.244c0 5.7754 3.3525 8.3165 8.5547 8.3165 1.9653 0 3.6993-0.34652 4.6242-0.80855v-6.3529c-0.80923 0.57754-2.0809 0.92406-3.1213 0.92406-1.7341-0.11551-2.8901-1.0396-2.8901-3.0032z"/>
<polygon points="49.031 36.401 56.892 10.643 49.956 10.643 45.332 27.045 40.939 10.643 35.505 10.643 31.228 27.045 26.604 10.643 19.436 10.643 27.297 36.401 33.887 36.401 38.164 20.577 42.441 36.401"/>
<polygon points="67.874 36.517 60.707 36.517 60.707 10.643 67.874 10.643"/>
<path d="m87.643 21.155-5.3178-1.2706c-1.6185-0.46203-2.3121-1.0396-2.3121-2.0791 0-1.6171 1.7341-2.4257 3.4681-2.4257 2.4277 0 3.5837 1.1551 4.0462 2.5412h6.8207c-0.92484-4.8513-4.5086-7.97-10.982-7.97-5.7802 0-10.289 3.3497-10.289 8.432 0 4.3893 2.7745 6.3529 6.7051 7.277l5.2022 1.1551c1.8497 0.46203 2.6589 1.0396 2.6589 2.1946 0 1.7326-1.5029 2.5412-3.6993 2.5412-2.1965 0-3.8149-1.0396-4.393-2.8877h-7.1675c0.80923 5.3133 5.2022 8.3165 11.56 8.3165 6.0114 0 10.636-3.1187 10.636-8.432 0-3.8117-2.4277-6.3529-6.9363-7.3925z"/>
<path d="m108.1 27.738v-11.32h5.6646v-5.7754h-5.6646v-7.0459h-7.1675v7.0459h-3.9306v5.7754h3.9306v12.244c0 5.7754 3.3525 8.3165 8.5547 8.3165 1.9653 0 3.6993-0.34652 4.6242-0.80855v-6.3529c-0.80923 0.57754-2.0809 0.92406-3.1213 0.92406-1.8497-0.11551-2.8901-1.0396-2.8901-3.0032z"/>
<path d="m129.53 10.048c-7.5143 0-13.526 6.0064-13.526 13.514 0 7.508 6.0114 13.514 13.526 13.514 7.5143 0 13.526-6.0064 13.526-13.514 0-7.508-6.0114-13.514-13.526-13.514zm0 19.983c-3.5837 0-6.5894-3.0032-6.5894-6.5839s3.0057-6.5839 6.5894-6.5839c3.5837 0 6.5894 3.0032 6.5894 6.5839s-3.0057 6.5839-6.5894 6.5839z"/>
<ellipse cx="64.291" cy="3.5974" rx="3.5837" ry="3.5807"/>
</g>
<polygon points="23.492 23.333 23.492 70 46.984 70 46.984 0 0 0 0 23.333" fill="#4e0f89"/>
<path d="m46.984 0c0 12.82 10.414 23.1 23.141 23.1v-23.1z" fill="#009d4e"/>
<path d="m46.984 0c0 12.82 10.414 23.1 23.141 23.1v-23.1z" fill="url(#linearGradient-1)"/>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,32 @@
(function ($) {
$(document).ready(function () {
if ($('.form-table input[data-global="can-be-global"]').length) {
$('.form-table').addClass('payu-table');
$('.form-table .forminp').each(function () {
if ($(this).find('input[data-global="can-be-global"]').length) {
$(this).addClass('absolute-global');
}
});
test_values_type();
}
$('input[data-toggle-global]').on('click', function () {
test_values_type();
});
});
function test_values_type() {
if ($('input[data-toggle-global]').prop('checked') == true) {
$('input[data-global="can-be-global"]').each(function () {
$(this).attr('readonly', true);
var global_value = $(this).attr('global-value');
$('<span>' + global_value + '</span>').insertAfter($(this));
});
} else {
$('input[data-global="can-be-global"]').each(function () {
$(this).attr('readonly', false);
$(this).next('span').remove();
});
}
}
})(jQuery);

View File

@@ -0,0 +1,105 @@
(function ($) {
var $form = $('form.checkout');
$('body').on('click', '.payu-list-banks li.payu-active label', function () {
$('.payu-list-banks label').removeClass('active');
$(this).addClass('active');
});
$('body').on('click', '.payu-list-banks .payu-active', function () {
$('.pbl-error').slideUp(250);
});
$('body').on('click', '.payu-conditions-description .payu-read-more', function () {
$(this).next('.payu-more-hidden').show();
$(this).remove();
});
$('form#order_review').on('submit', function (e) {
var paymentMethod = $(this).find('input[name="payment_method"]:checked').val();
var validateResult = true;
if (paymentMethod === 'payusecureform') {
validateResult = validate_payu_secure_form(this);
} else if (paymentMethod === 'payulistbanks') {
validateResult = validate_payu_list_banks();
}
if (!validateResult) {
setTimeout(function () {
$(e.target).unblock();
}, 500);
}
return validateResult;
});
$form.on('checkout_place_order_payusecureform', function () {
return validate_payu_secure_form(this);
});
$form.on('checkout_place_order_payulistbanks', function () {
return validate_payu_list_banks();
});
function validate_payu_secure_form(form) {
var payuTokenElement = document.getElementsByName('payu_sf_token')[0];
if (payuTokenElement.value === '') {
try {
window.payuSdkForms.tokenize()
.then(function (result) {
$('.payu-sf-validation-error, .payu-sf-technical-error')
.html('')
.slideUp(250);
if (result.status === 'SUCCESS') {
payuTokenElement.value = result.body.token;
document.getElementsByName('payu_browser[screenWidth]')[0].value = screen.width;
document.getElementsByName('payu_browser[javaEnabled]')[0].value = navigator.javaEnabled();
document.getElementsByName('payu_browser[timezoneOffset]')[0].value = new Date().getTimezoneOffset();
document.getElementsByName('payu_browser[screenHeight]')[0].value = screen.height;
document.getElementsByName('payu_browser[userAgent]')[0].value = navigator.userAgent;
document.getElementsByName('payu_browser[colorDepth]')[0].value = screen.colorDepth;
document.getElementsByName('payu_browser[language]')[0].value = navigator.language;
$(form).submit();
} else {
$(result.error.messages).each(function (i, error) {
var source = error.source || 'technical';
$('.payu-sf-' + error.type + '-error[data-type="' + source + '"]')
.html(error.message)
.slideDown(250);
$('html, body').animate({
scrollTop: $('.card-container').offset().top
}, 300);
});
}
})
.catch(function (e) {
console.log(e);
});
} catch (e) {
console.log(e);
}
return false;
}
return true;
}
function validate_payu_list_banks() {
if (!$('.payu-list-banks').find('.payu-active .active').length) {
$('html, body').animate({
scrollTop: $('.payu-list-banks').offset().top
}, 300);
$('.pbl-error').slideDown(250);
return false;
} else {
$('.pbl-error').slideUp(250);
return true;
}
}
})(jQuery);

View File

@@ -0,0 +1,20 @@
function showInstallmentsWidgetInCart() {
if (window.OpenPayU && !document.getElementById('installment-mini-cart')) {
jQuery(document).find("label[for='payment_method_payuinstallments']")
.append(("<div id='installment-mini-cart'>"));
var options = {
creditAmount: Number(PayUInstallmentsWidgetCartData.priceTotal),
posId: PayUInstallmentsWidgetCartData.posId,
key: PayUInstallmentsWidgetCartData.widgetKey,
showLongDescription: true
};
OpenPayU.Installments.miniInstallment('#installment-mini-cart', options);
}
}
document.addEventListener("DOMContentLoaded", showInstallmentsWidgetInCart);
showInstallmentsWidgetInCart();
jQuery(document).on('updated_checkout', function() {
showInstallmentsWidgetInCart();
});

View File

@@ -0,0 +1,33 @@
function sf_init() {
var cc = document.getElementById('payu-card-container');
if (cc) {
var lang = cc.dataset.lang;
var optionsForms = {
cardIcon: true,
style: {
basic: {
fontSize: '18px'
}
},
placeholder: {
number: '',
date: 'MM/YY',
cvv: ''
},
lang: lang
};
var pcn = document.getElementById('payu-card-number');
if (pcn.childNodes.length === 0) {
var payuSdkForms = PayU(cc.dataset.payuPosid);
var secureForms = payuSdkForms.secureForms();
var cardNumber = secureForms.add('number', optionsForms);
var cardDate = secureForms.add('date', optionsForms);
var cardCvv = secureForms.add('cvv', optionsForms);
cardNumber.render('#payu-card-number');
cardDate.render('#payu-card-date');
cardCvv.render('#payu-card-cvv');
window.payuSdkForms = payuSdkForms;
}
}
}