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,26 @@
#woocommerce-revolut-card-element{
border-radius: 3px;
padding: 5px 5px;
}
#revolut-upsell-banner {
margin-top: 5px;
}
.hidden_by_revolut {
display: none !important;
}
.revolut-payment-method-save label {
display: inline !important;
}
.revolut-error {
margin-top: 5px;
}
.revolut-pay {
height: auto;
}
.revolut-card-gateway-icon-amex {
display: none;
}

View File

@@ -0,0 +1,12 @@
<svg width="94" height="17" viewBox="0 0 94 17" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1.68302 12V9.714H3.22202C4.49102 9.714 5.30102 8.895 5.30102 7.689C5.30102 6.519 4.50902 5.7 3.22202 5.7H0.900024V12H1.68302ZM1.68302 6.411H3.12302C3.96902 6.411 4.49102 6.879 4.49102 7.689C4.49102 8.535 3.99602 8.994 3.12302 8.994H1.68302V6.411Z" fill="#8B959E"/>
<path d="M7.92129 12.081C9.36129 12.081 10.0003 11.019 10.0003 9.705C10.0003 8.382 9.34329 7.32 7.92129 7.32C6.49929 7.32 5.84229 8.382 5.84229 9.705C5.84229 11.028 6.48129 12.081 7.92129 12.081ZM7.92129 11.406C6.99429 11.406 6.60729 10.695 6.60729 9.705C6.60729 8.724 6.98529 7.995 7.92129 7.995C8.85729 7.995 9.23529 8.715 9.23529 9.705C9.23529 10.695 8.85729 11.406 7.92129 11.406Z" fill="#8B959E"/>
<path d="M12.534 12L13.641 8.427H13.677L14.757 12H15.54L16.836 7.491V7.401H16.071L15.153 10.974H15.117L14.037 7.401H13.263L12.183 10.974H12.147L11.229 7.401H10.446V7.491L11.751 12H12.534Z" fill="#8B959E"/>
<path d="M19.374 12.081C20.355 12.081 21.165 11.514 21.291 10.668H20.535C20.409 11.154 19.977 11.406 19.374 11.406C18.519 11.406 18.078 10.803 18.078 9.93H21.354V9.561C21.354 8.283 20.661 7.32 19.365 7.32C17.943 7.32 17.286 8.373 17.286 9.705C17.286 11.055 18.015 12.081 19.374 12.081ZM18.087 9.3C18.114 8.58 18.501 7.995 19.365 7.995C20.184 7.995 20.571 8.571 20.571 9.3H18.087Z" fill="#8B959E"/>
<path d="M23.1878 12V9.768C23.1878 8.688 23.5838 8.076 24.4568 8.076H24.8168V7.347H24.4028C23.8358 7.347 23.3768 7.662 23.1878 8.175H23.1518L23.0888 7.401H22.4318V12H23.1878Z" fill="#8B959E"/>
<path d="M27.3109 12.081C28.2919 12.081 29.1019 11.514 29.2279 10.668H28.4719C28.3459 11.154 27.9139 11.406 27.3109 11.406C26.4559 11.406 26.0149 10.803 26.0149 9.93H29.2909V9.561C29.2909 8.283 28.5979 7.32 27.3019 7.32C25.8799 7.32 25.2229 8.373 25.2229 9.705C25.2229 11.055 25.9519 12.081 27.3109 12.081ZM26.0239 9.3C26.0509 8.58 26.4379 7.995 27.3019 7.995C28.1209 7.995 28.5079 8.571 28.5079 9.3H26.0239Z" fill="#8B959E"/>
<path d="M31.9617 12.081C32.6457 12.081 33.1047 11.766 33.3477 11.361H33.3837L33.4827 12H34.1397V5.34H33.3837V8.04H33.3477C33.1047 7.635 32.6457 7.32 31.9617 7.32C30.6657 7.32 30.0177 8.337 30.0087 9.696C30.0177 11.181 30.7557 12.081 31.9617 12.081ZM32.0877 11.406C31.1337 11.406 30.7737 10.623 30.7737 9.696C30.7737 8.778 31.1337 7.995 32.0877 7.995C33.0057 7.995 33.4017 8.787 33.4017 9.696C33.4017 10.614 33.0057 11.406 32.0877 11.406Z" fill="#8B959E"/>
<path d="M40.1847 12.081C41.3907 12.081 42.1287 11.181 42.1377 9.696C42.1287 8.337 41.4807 7.32 40.1847 7.32C39.5007 7.32 39.0417 7.635 38.7987 8.04H38.7627V5.34H38.0067V12H38.6637L38.7627 11.361H38.7987C39.0417 11.766 39.5007 12.081 40.1847 12.081ZM40.0587 11.406C39.1407 11.406 38.7447 10.614 38.7447 9.696C38.7447 8.787 39.1407 7.995 40.0587 7.995C41.0127 7.995 41.3727 8.778 41.3727 9.696C41.3727 10.623 41.0127 11.406 40.0587 11.406Z" fill="#8B959E"/>
<path d="M44.3326 14.061L46.8796 7.491V7.401H46.0875L44.7375 11.01H44.7015L43.3065 7.401H42.4965V7.491L44.3415 11.946L44.3505 11.964L43.5676 13.971V14.061H44.3326Z" fill="#8B959E"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M59.0134 13.0369L56.793 9.12191C58.1976 8.60604 58.8939 7.70677 58.8939 6.39711C58.8954 4.79652 57.6336 3.77778 55.6244 3.77778H51.6981V13.0369H53.4318V9.28037H54.9032L57.0304 13.0369H59.0134ZM55.6244 5.31189C56.6488 5.31189 57.1613 5.72178 57.1613 6.52858C57.1613 7.33537 56.6483 7.74526 55.6244 7.74526H53.4318V5.31189H55.6244ZM82.044 13.0371V3.9604H80.3892V13.0371H82.044ZM78.5549 7.06465C77.8585 6.44281 77.018 6.13889 76.0461 6.13889C75.0876 6.13889 74.247 6.44331 73.5502 7.06465C72.8538 7.673 72.5 8.51977 72.5 9.60449C72.5 10.6892 72.8538 11.5355 73.5502 12.1574C74.2465 12.7657 75.0876 13.0701 76.0461 13.0701C77.018 13.0701 77.8585 12.7657 78.5549 12.1574C79.2646 11.5355 79.6185 10.6892 79.6185 9.60449C79.6185 8.51977 79.2641 7.673 78.5549 7.06465ZM74.7332 10.9931C74.366 10.6362 74.1811 10.1729 74.1811 9.60449C74.1811 9.03565 74.3645 8.57276 74.7332 8.22885C75.1005 7.87195 75.5346 7.69998 76.0456 7.69998C76.557 7.69998 77.0041 7.87195 77.3719 8.22885C77.752 8.57276 77.9368 9.03565 77.9368 9.60449C77.9368 10.1733 77.7535 10.6362 77.3719 10.9931C77.0046 11.3371 76.5576 11.509 76.0456 11.509C75.5346 11.509 75.1015 11.3371 74.7332 10.9931ZM87.3855 10.0976V6.47599H89.0443V10.3755C89.0443 11.8566 88.1001 13.2218 86.0384 13.2218H86.0255C83.9509 13.2218 83.0052 11.8861 83.0052 10.3755V6.47599H84.6631V10.0976C84.6631 10.9708 85.1191 11.5487 86.0255 11.5487C86.9172 11.5487 87.3855 10.9703 87.3855 10.0976ZM70.6804 6.47599L69.0255 10.9204L67.3707 6.47599H65.6107L68.2514 13.0368H69.8017L72.4418 6.47599H70.6804ZM64.7265 7.2166C65.3177 7.83844 65.6196 8.61874 65.6196 9.571H65.6191V10.1533H60.603C60.708 11.1586 61.4044 11.7934 62.3891 11.7934C63.1901 11.7934 63.7818 11.3965 64.1883 10.5897L65.4223 11.3041C64.8063 12.5872 63.7952 13.2221 62.3629 13.2221C61.4306 13.2221 60.6426 12.9046 59.9855 12.2563C59.3417 11.6085 59.0135 10.7752 59.0135 9.75644C59.0135 8.73771 59.3411 7.91792 59.9984 7.26959C60.6684 6.62175 61.4832 6.29084 62.4417 6.29084C63.3745 6.29084 64.1352 6.59476 64.7265 7.2166ZM64.0956 8.93616C63.9385 8.08937 63.3204 7.56051 62.3882 7.56051C61.5342 7.56051 60.8522 8.15586 60.602 8.93616H64.0956ZM89.9207 11.2769C89.9207 12.3511 90.7845 13.2214 91.8496 13.2214H92.9945V11.7398H92.142C91.8288 11.7398 91.5755 11.4848 91.5755 11.1699V7.82728H92.9945V6.47813H91.5755V4.70308H89.9207V11.2769Z" fill="#8B959E"/>
</svg>

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@@ -0,0 +1 @@
<svg id="Revolut_Logos" data-name="Revolut Logos" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1200"><defs><style>.cls-1,.cls-2{fill:#191c1f;}.cls-2{fill-rule:evenodd;}</style></defs><g id="Symbol"><path class="cls-1" d="M564.35,590c36,.72,98.91,1.8,109-89.92,9.71-85.6-44.24-92.43-93.15-89.2-1.8,11.51-3.24,22.3-5,33.45-6.47,43.52-12.59,86.32-21.94,145.66Z"/><path class="cls-2" d="M657.5,273.46c108.26,2.16,161.85,51.43,187.74,92.79a209.05,209.05,0,0,1,30.93,111.14v9.35h0c-1.8,34.89-5,101.06-83.08,165.8,48.91,114.73,59,136,68.7,154.29,14.75,28.77,7.55,64-17.62,84.16-30.21,24.1-59.7,33.81-112.93,37.4-4.32.36-9,.36-13.31.36a155.88,155.88,0,0,1-130.2-65.1,66.75,66.75,0,0,1-21.58,29.13c-30.93,23.74-59.7,32.37-112.93,34.17-4.68.36-9.35.36-13.67.36-48.55,0-75.53-21.22-90.28-38.84-36.69-44.6-25.54-105.38-16.54-153.93v-.36c2.52-13.67,4.68-28,6.11-42.44v-1.8c1.08-11.15,4.68-32,10.79-70.49l.72-4.68c9.71-59.34,34.53-212.92,32-247.09a67.69,67.69,0,0,1,8.27-51.43,65.57,65.57,0,0,1,42.44-29.85,603.62,603.62,0,0,1,143.86-15.11C600,270.94,626.21,271.66,657.5,273.46ZM447.1,352.22C500,340.71,540.61,335,655.34,340.71,806.4,343.59,810,456.88,810,478.1c0,1.8-.36,3.6-.36,5.39-1.8,34.17-4.32,89.56-99.27,145.3,73.37,201.77,80.2,204.65,91.71,209.68.36,0,.36.36.72.36-5.75,6.83-25.54,16.54-79.13,19.78-76.61,5.39-94.95-57.91-94.95-57.91L583.75,664H541c-2.16,14.75-4.68,29.13-6.83,42.8C523,776.24,515.06,826.6,525.49,839.54c-17.62,9-29.49,10.79-66.18,16.18-3.24.36-6.83,1.08-10.43,1.44-73,10.43-62.22-50-51.43-110.06,3.24-17.26,6.11-34.53,7.19-50,1.08-10.07,5.39-36.33,10.79-70.49,10.07-61.5,24.1-147.46,30.21-207.88C449.26,386.75,450.34,362.29,447.1,352.22Z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,7 @@
<svg width="36" height="24" xmlns="http://www.w3.org/2000/svg" version="1.1">
<g id="Layer_1">
<path id="svg_1" fill="#1977C6" d="m32.98707,0.01321l-30,0c-1.65685,0 -3,1.34315 -3,3l0,18c0,1.6569 1.34315,3 3,3l30,0c1.6569,0 3,-1.3431 3,-3l0,-18c0,-1.65685 -1.3431,-3 -3,-3z"/>
<path id="svg_2" fill="white" d="m33.09357,20.17891l2.8935,0l0,-0.9618l0,-6.7165l0,-0.9747l-1.8124,0l0,-4.7113l-1.726,4.7113l-1.6109,0l-1.726,-4.7016l0,4.7016l-1.8123,0l0,-6.7165l2.867,0l1.4958,4.1832l1.5056,-4.1832l2.8192,0l0,-0.9619l-3.5344,0l-0.7968,2.2329l-0.7917,-2.2329l-4.5594,0l0,2.963l-1.3149,-2.963l-3.6834,0l-3.8194,8.6492l3.0792,0l0,7.6822l9.5402,0l1.4973,-1.6483l1.4898,1.6483zm-5.7941,-8.653l-2.9628,-6.7165l-2.3589,0l-2.9631,6.7165l2.0137,0l0.5562,-1.3433l3.0875,0l0.5658,1.3433l2.0616,0zm8.6876,0.9747l-3.183,3.3391l3.183,3.3774l-2.4062,0l-1.9657,-2.1685l-1.9753,2.1685l-2.3398,0l3.1644,-3.3583l-3.1644,-3.3582l2.4068,0l1.9467,2.1493l1.9656,-2.1493l2.3679,0zm-8.687,0l-5.7149,0l0,6.7165l5.7149,0l0,-1.5543l-3.8834,0l0,-1.046l3.7874,0l0,-1.516l-3.7874,0l0,-1.0458l3.8834,0l0,-1.5544zm6.8437,3.342l1.8433,1.9621l0,-3.908l-1.8433,1.9459zm-11.0154,-9.3638l-0.911,2.1973l1.822,0l-0.911,-2.1973z" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_3" fill-opacity="0.07" fill="black" d="m32.98707,1.01321l-30,0c-1.10457,0 -2,0.89543 -2,2l0,18c0,1.1046 0.89543,2 2,2l30,0c1.1046,0 2,-0.8954 2,-2l0,-18c0,-1.10457 -0.8954,-2 -2,-2zm-30,-1l30,0c1.6569,0 3,1.34315 3,3l0,18c0,1.6569 -1.3431,3 -3,3l-30,0c-1.65685,0 -3,-1.3431 -3,-3l0,-18c0,-1.65685 1.34315,-3 3,-3z" clip-rule="evenodd" fill-rule="evenodd"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Artwork" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="165.52107px" height="105.9651px" viewBox="0 0 165.52107 105.9651" enable-background="new 0 0 165.52107 105.9651"
xml:space="preserve">
<g>
<path id="XMLID_4_" d="M150.69807,0H14.82318c-0.5659,0-1.1328,0-1.69769,0.0033c-0.47751,0.0034-0.95391,0.0087-1.43031,0.0217
c-1.039,0.0281-2.0869,0.0894-3.1129,0.2738c-1.0424,0.1876-2.0124,0.4936-2.9587,0.9754
c-0.9303,0.4731-1.782,1.0919-2.52009,1.8303c-0.73841,0.7384-1.35721,1.5887-1.83021,2.52
c-0.4819,0.9463-0.7881,1.9166-0.9744,2.9598c-0.18539,1.0263-0.2471,2.074-0.2751,3.1119
c-0.0128,0.4764-0.01829,0.9528-0.0214,1.4291c-0.0033,0.5661-0.0022,1.1318-0.0022,1.6989V91.142
c0,0.5671-0.0011,1.13181,0.0022,1.69901c0.00311,0.4763,0.0086,0.9527,0.0214,1.4291
c0.028,1.03699,0.08971,2.08469,0.2751,3.11069c0.1863,1.0436,0.4925,2.0135,0.9744,2.9599
c0.473,0.9313,1.0918,1.7827,1.83021,2.52c0.73809,0.7396,1.58979,1.3583,2.52009,1.8302
c0.9463,0.4831,1.9163,0.7892,2.9587,0.9767c1.026,0.1832,2.0739,0.2456,3.1129,0.2737c0.4764,0.0108,0.9528,0.0172,1.43031,0.0194
c0.56489,0.0044,1.13179,0.0044,1.69769,0.0044h135.87489c0.5649,0,1.13181,0,1.69659-0.0044
c0.47641-0.0022,0.95282-0.0086,1.4314-0.0194c1.0368-0.0281,2.0845-0.0905,3.11301-0.2737
c1.041-0.1875,2.0112-0.4936,2.9576-0.9767c0.9313-0.4719,1.7805-1.0906,2.52011-1.8302c0.7372-0.7373,1.35599-1.5887,1.8302-2.52
c0.48299-0.9464,0.78889-1.9163,0.97429-2.9599c0.1855-1.026,0.2457-2.0737,0.2738-3.11069
c0.013-0.4764,0.01941-0.9528,0.02161-1.4291c0.00439-0.5672,0.00439-1.1319,0.00439-1.69901V14.8242
c0-0.5671,0-1.1328-0.00439-1.6989c-0.0022-0.4763-0.00861-0.9527-0.02161-1.4291c-0.02811-1.0379-0.0883-2.0856-0.2738-3.1119
c-0.18539-1.0432-0.4913-2.0135-0.97429-2.9598c-0.47421-0.9313-1.093-1.7816-1.8302-2.52
c-0.73961-0.7384-1.58881-1.3572-2.52011-1.8303c-0.9464-0.4818-1.9166-0.7878-2.9576-0.9754
c-1.0285-0.1844-2.0762-0.2457-3.11301-0.2738c-0.47858-0.013-0.95499-0.0183-1.4314-0.0217C151.82988,0,151.26297,0,150.69807,0
L150.69807,0z"/>
<path id="XMLID_3_" fill="#FFFFFF" d="M150.69807,3.532l1.67149,0.0032c0.4528,0.0032,0.90561,0.0081,1.36092,0.0205
c0.79201,0.0214,1.71849,0.0643,2.58209,0.2191c0.7507,0.1352,1.38029,0.3408,1.9845,0.6484
c0.5965,0.3031,1.14301,0.7003,1.62019,1.1768c0.479,0.4797,0.87671,1.0271,1.18381,1.6302
c0.30589,0.5995,0.51019,1.2261,0.64459,1.9823c0.1544,0.8542,0.1971,1.7832,0.21881,2.5801
c0.01219,0.4498,0.01819,0.8996,0.0204,1.3601c0.00429,0.5569,0.0042,1.1135,0.0042,1.6715V91.142
c0,0.558,0.00009,1.1136-0.0043,1.6824c-0.00211,0.4497-0.0081,0.8995-0.0204,1.3501c-0.02161,0.7957-0.0643,1.7242-0.2206,2.5885
c-0.13251,0.7458-0.3367,1.3725-0.64429,1.975c-0.30621,0.6016-0.70331,1.1484-1.18022,1.6251
c-0.47989,0.48-1.0246,0.876-1.62819,1.1819c-0.5997,0.3061-1.22821,0.51151-1.97151,0.6453
c-0.88109,0.157-1.84639,0.2002-2.57339,0.2199c-0.4574,0.0103-0.9126,0.01649-1.37889,0.0187
c-0.55571,0.0043-1.1134,0.0042-1.6692,0.0042H14.82318c-0.0074,0-0.0146,0-0.0221,0c-0.5494,0-1.0999,0-1.6593-0.0043
c-0.4561-0.00211-0.9112-0.0082-1.3512-0.0182c-0.7436-0.0201-1.7095-0.0632-2.5834-0.2193
c-0.74969-0.1348-1.3782-0.3402-1.9858-0.6503c-0.59789-0.3032-1.1422-0.6988-1.6223-1.1797
c-0.4764-0.4756-0.8723-1.0207-1.1784-1.6232c-0.3064-0.6019-0.5114-1.2305-0.64619-1.9852
c-0.15581-0.8626-0.19861-1.7874-0.22-2.5777c-0.01221-0.4525-0.01731-0.9049-0.02021-1.3547l-0.0022-1.3279l0.0001-0.3506V14.8242
l-0.0001-0.3506l0.0021-1.3251c0.003-0.4525,0.0081-0.9049,0.02031-1.357c0.02139-0.7911,0.06419-1.7163,0.22129-2.5861
c0.1336-0.7479,0.3385-1.3765,0.6465-1.9814c0.3037-0.5979,0.7003-1.1437,1.17921-1.6225
c0.477-0.4772,1.02309-0.8739,1.62479-1.1799c0.6011-0.3061,1.2308-0.5116,1.9805-0.6465c0.8638-0.1552,1.7909-0.198,2.5849-0.2195
c0.4526-0.0123,0.9052-0.0172,1.3544-0.0203l1.6771-0.0033H150.69807"/>
<g>
<g>
<path d="M45.1862,35.64053c1.41724-1.77266,2.37897-4.15282,2.12532-6.58506c-2.07464,0.10316-4.60634,1.36871-6.07207,3.14276
c-1.31607,1.5192-2.4809,3.99902-2.17723,6.3293C41.39111,38.72954,43.71785,37.36345,45.1862,35.64053"/>
<path d="M47.28506,38.98252c-3.38211-0.20146-6.25773,1.91951-7.87286,1.91951c-1.61602,0-4.08931-1.81799-6.76438-1.76899
c-3.48177,0.05114-6.71245,2.01976-8.4793,5.15079c-3.63411,6.2636-0.95904,15.55471,2.57494,20.65606
c1.71618,2.5238,3.78447,5.30269,6.50976,5.20287c2.57494-0.10104,3.58421-1.66732,6.71416-1.66732
c3.12765,0,4.03679,1.66732,6.76252,1.61681c2.82665-0.05054,4.59381-2.52506,6.30997-5.05132
c1.96878-2.877,2.77473-5.65498,2.82542-5.80748c-0.0507-0.05051-5.45058-2.12204-5.50065-8.33358
c-0.05098-5.20101,4.23951-7.6749,4.44144-7.82832C52.3832,39.4881,48.5975,39.08404,47.28506,38.98252"/>
</g>
<g>
<path d="M76.73385,31.94381c7.35096,0,12.4697,5.06708,12.4697,12.44437c0,7.40363-5.22407,12.49704-12.65403,12.49704h-8.13892
v12.94318h-5.88037v-37.8846H76.73385z M68.41059,51.9493h6.74732c5.11975,0,8.0336-2.75636,8.0336-7.53479
c0-4.77792-2.91385-7.50845-8.00727-7.50845h-6.77365V51.9493z"/>
<path d="M90.73997,61.97864c0-4.8311,3.70182-7.79761,10.26583-8.16526l7.56061-0.44614v-2.12639
c0-3.07185-2.07423-4.90959-5.53905-4.90959c-3.28251,0-5.33041,1.57492-5.82871,4.04313h-5.35574
c0.31499-4.98859,4.56777-8.66407,11.3941-8.66407c6.69466,0,10.97377,3.54432,10.97377,9.08388v19.03421h-5.43472v-4.54194
h-0.13065c-1.60125,3.07185-5.09341,5.01441-8.71623,5.01441C94.52078,70.30088,90.73997,66.94038,90.73997,61.97864z
M108.56641,59.4846v-2.17905l-6.8,0.41981c-3.38683,0.23649-5.30306,1.73291-5.30306,4.09579
c0,2.41504,1.99523,3.99046,5.04075,3.99046C105.46823,65.81161,108.56641,63.08108,108.56641,59.4846z"/>
<path d="M119.34167,79.9889v-4.5946c0.4193,0.10483,1.36425,0.10483,1.83723,0.10483c2.6252,0,4.04313-1.10245,4.90908-3.9378
c0-0.05267,0.49931-1.68025,0.49931-1.70658l-9.97616-27.64562h6.14268l6.98432,22.47371h0.10432l6.98433-22.47371h5.9857
l-10.34483,29.06304c-2.36186,6.69517-5.0924,8.84789-10.81577,8.84789C121.17891,80.12006,119.76098,80.06739,119.34167,79.9889
z"/>
</g>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

@@ -0,0 +1,9 @@
<svg width="36" height="24" viewBox="0 0 36 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="36" height="24" rx="3" fill="white"/>
<path d="M33 0H3C1.34315 0 0 1.34315 0 3V21C0 22.6569 1.34315 24 3 24H33C34.6569 24 36 22.6569 36 21V3C36 1.34315 34.6569 0 33 0Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.1603 17.0447H20.8385V6.9554H15.1603V17.0447Z" fill="#FF5F00"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5208 12.0001C15.5214 11.0257 15.7451 10.0644 16.1749 9.18997C16.6046 8.3155 17.229 7.5511 18 6.9554C17.0448 6.21204 15.9011 5.74992 14.6976 5.621C13.4941 5.49207 12.2785 5.70147 11.1875 6.22563C10.0965 6.74979 9.17342 7.56794 8.52198 8.58805C7.87053 9.60817 7.51661 10.7898 7.5 12.0001C7.51661 13.2103 7.87053 14.392 8.52198 15.4121C9.17342 16.4322 10.0965 17.2503 11.1875 17.7745C12.2785 18.2987 13.4941 18.5081 14.6976 18.3791C15.9011 18.2502 17.0448 17.7881 18 17.0447C17.229 16.449 16.6046 15.6846 16.1749 14.8102C15.7451 13.9357 15.5214 12.9744 15.5208 12.0001Z" fill="#EB001B"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M28.297 15.9761V15.7276H28.227L28.1512 15.8991L28.0753 15.7276H28.01V15.9761H28.0567V15.7882L28.1278 15.9504H28.1757L28.2468 15.7882V15.9761H28.297ZM27.8805 15.9761V15.7696H27.9645V15.7276H27.7498V15.7696H27.8338V15.9761H27.8805ZM28.5 12.0001C28.4834 13.2103 28.1295 14.392 27.478 15.4121C26.8266 16.4322 25.9035 17.2503 24.8125 17.7745C23.7215 18.2987 22.5059 18.5081 21.3024 18.3791C20.0989 18.2502 18.9552 17.7881 18 17.0447C18.7714 16.4494 19.396 15.685 19.8258 14.8105C20.2555 13.936 20.479 12.9745 20.479 12.0001C20.479 11.0256 20.2555 10.0642 19.8258 9.18964C19.396 8.31509 18.7714 7.55076 18 6.9554C18.9552 6.21204 20.0989 5.74992 21.3024 5.621C22.5059 5.49207 23.7215 5.70147 24.8125 6.22563C25.9035 6.74979 26.8266 7.56794 27.478 8.58805C28.1295 9.60817 28.4834 10.7898 28.5 12.0001Z" fill="#F79E1B"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M33 1H3C1.89543 1 1 1.89543 1 3V21C1 22.1046 1.89543 23 3 23H33C34.1046 23 35 22.1046 35 21V3C35 1.89543 34.1046 1 33 1ZM3 0H33C34.6569 0 36 1.34315 36 3V21C36 22.6569 34.6569 24 33 24H3C1.34315 24 0 22.6569 0 21V3C0 1.34315 1.34315 0 3 0Z" fill="black" fill-opacity="0.07"/>
<rect x="0.5" y="0.5" width="35" height="23" rx="2.5" stroke="black" stroke-opacity="0.07"/>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1,6 @@
<svg width="52" height="32" viewBox="0 0 52 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="52" height="32" fill="white"/>
<path d="M6.5 12.1111C6.5 10.3929 7.89289 9 9.61111 9H17.3889C19.1071 9 20.5 10.3929 20.5 12.1111V19.8889C20.5 21.6071 19.1071 23 17.3889 23H9.61111C7.89289 23 6.5 21.6071 6.5 19.8889V12.1111Z" fill="#191C1F"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.1055 10.8093C15.1321 10.8632 15.779 10.9855 16.4563 11.3666C16.9818 11.662 17.3827 12.1108 17.6667 12.6605C17.817 12.9528 17.8929 13.2467 17.9491 13.6134C17.9947 13.9126 18.0053 14.2163 17.978 14.5155C17.9628 14.7068 17.9355 14.8807 17.8929 15.0523C17.8064 15.3993 17.656 15.7281 17.4541 16.0295C17.2551 16.3249 17.0122 16.5876 16.7282 16.8306L16.6264 16.9133L16.6963 17.1153C16.9545 17.8442 17.1944 18.3834 17.4814 18.8625L17.5923 19.0394L17.6849 19.1814C17.978 19.6111 18.0266 20.028 17.6849 20.419C17.4298 20.7121 16.9134 21.1115 15.1898 21.2034C14.4776 21.2414 13.9051 20.9202 13.5133 20.419C13.4505 20.3297 13.3134 20.3369 13.2456 20.4225C13.0798 20.6317 12.8445 20.8104 12.5672 20.9217L12.4275 20.9726L12.2787 21.0189C12.0099 21.0948 11.6805 21.1775 11.2749 21.192C8.72282 21.2836 9.01758 19.2467 9.01758 19.2467H9.01303L9.46925 16.5792C9.46925 16.5792 9.56615 15.9774 9.62567 15.5914C9.68662 15.1961 9.77753 14.5785 9.77753 14.5785L9.85498 14.0432L9.94609 13.2687L9.99469 12.7744C10.0053 12.5519 10.0053 12.3704 9.99469 12.2034L10.0615 11.8693L10.0964 11.7159C10.1374 11.5618 10.1784 11.4881 10.2604 11.4L10.3424 11.3188L10.3926 11.2717C10.5748 11.113 10.7084 11.0606 10.8998 11.0098C10.9636 10.9931 11.0273 10.9794 11.0987 10.9672L11.3113 10.9369L11.776 10.8875C12.5368 10.7987 13.3645 10.7698 14.1055 10.8093ZM11.8711 12.0277L11.8711 12.0277L11.9081 12.0242C12.5929 11.9444 13.3568 11.9148 14.0447 11.952C14.6795 11.9854 15.331 12.0462 15.8959 12.3636C16.2315 12.5526 16.476 12.8472 16.6507 13.1851C16.7433 13.3658 16.7888 13.5883 16.8192 13.7888C16.8511 13.9968 16.8587 14.2087 16.8405 14.419L16.8253 14.5557C16.8162 14.6301 16.8025 14.7037 16.7843 14.7759C16.7296 14.9968 16.6324 15.2041 16.5064 15.3932C16.3287 15.6559 16.0994 15.8791 15.8504 16.0728C15.6696 16.214 15.4768 16.3408 15.2778 16.4562C15.6879 17.7812 16.1189 18.6212 16.6962 19.7273C16.6051 19.8313 15.9855 20.0181 15.129 20.0637C14.8997 20.0758 14.722 19.9976 14.5854 19.8898C14.3242 19.6832 14.2209 19.3666 14.2209 19.3666L13.4669 17.1832C13.4301 17.0767 13.3298 17.0052 13.2171 17.0052H12.6248C12.432 18.2421 12.3515 18.9484 12.3515 19.7273C12.3515 19.7273 12.2604 19.9482 11.1639 20.0561C10.8617 20.0857 10.4305 20.05 10.2619 19.7546C10.1024 19.476 10.1753 19.1176 10.2391 18.804L10.2771 18.6111L10.3168 18.3876C10.4343 17.7274 10.5516 17.0679 10.6567 16.4053C10.7691 15.6954 10.886 14.9103 10.9893 14.1988C10.9935 14.1614 11.0001 14.1056 11.0081 14.0374L11.0139 13.9883C11.0562 13.6297 11.1293 13.0103 11.1366 12.826C11.1472 12.6005 11.1503 12.3689 11.1366 12.1441C11.1352 12.0981 11.6371 12.0501 11.8711 12.0277ZM12.804 15.8542C12.804 15.8542 13.0219 14.817 13.2198 13.1048C14.0447 12.9696 14.9407 13.1328 14.7296 14.4525C14.5005 15.8797 13.5374 15.864 12.9754 15.8549L12.9741 15.8549L12.804 15.8542Z" fill="white"/>
<path d="M25.118 20.5V16.944H27.512C29.486 16.944 30.746 15.67 30.746 13.794C30.746 11.974 29.514 10.7 27.512 10.7H23.9V20.5H25.118ZM25.118 11.806H27.358C28.674 11.806 29.486 12.534 29.486 13.794C29.486 15.11 28.716 15.824 27.358 15.824H25.118V11.806ZM34.1604 20.626C35.1684 20.626 35.9664 20.22 36.4004 19.492H36.4564L36.5404 20.5H37.5344V15.684C37.5344 14.326 36.5684 13.22 34.7344 13.22C33.1664 13.22 32.0184 14.13 32.0184 15.502H33.1524C33.1664 14.816 33.6844 14.228 34.7344 14.228C35.8964 14.228 36.3864 14.914 36.3864 15.712V16.426C35.9384 16.3 35.3784 16.174 34.6224 16.174C32.5224 16.174 31.6684 17.21 31.6684 18.414C31.6684 19.66 32.6064 20.626 34.1604 20.626ZM34.3704 19.646C33.3344 19.646 32.8584 19.114 32.8584 18.4C32.8584 17.56 33.4604 17.112 34.6224 17.112C35.2524 17.112 35.7984 17.182 36.3864 17.364V17.728C36.3864 18.764 35.5884 19.646 34.3704 19.646ZM41.3012 23.706L45.2632 13.486V13.346H44.0312L41.9312 18.96H41.8752L39.7052 13.346H38.4452V13.486L41.3152 20.416L41.3292 20.444L40.1112 23.566V23.706H41.3012Z" fill="#191C1F"/>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -0,0 +1,13 @@
<svg width="36" height="24" viewBox="0 0 36 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="36" height="24" rx="3" fill="white"/>
<path d="M33 0H3C1.34315 0 0 1.34315 0 3V21C0 22.6569 1.34315 24 3 24H33C34.6569 24 36 22.6569 36 21V3C36 1.34315 34.6569 0 33 0Z" fill="white"/>
<g clip-path="url(#clip0_601_24744)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M24.1966 9H23.0973V14.9496H24.1966V9ZM31.9994 10.5833V11.5066H30.8628V13.5831C30.8628 13.7563 30.901 13.9067 30.9599 13.9662C31.024 14.0312 31.1349 14.0642 31.2893 14.0642H31.9994V14.9874H31.029C30.6016 14.9874 30.2804 14.8845 30.0742 14.6815C29.868 14.4786 29.7635 14.1713 29.7635 13.7681V9.37959H30.8628V10.5833H31.9994ZM15.6303 13.7916L16.7669 10.5832H17.9217L16.2809 14.9496H14.9796L13.3388 10.5832H14.4937L15.6303 13.7916ZM27.8434 13.4854C27.9285 13.2875 27.9717 13.047 27.9717 12.7706V10.5833H29.071V14.9496H28.1062L28.0077 14.4406C27.8777 14.5836 27.7119 14.7112 27.5138 14.8203C27.2968 14.9395 27.0123 15 26.6686 15C26.4301 15 26.2014 14.9671 25.9887 14.9022C25.7749 14.8369 25.5833 14.726 25.4193 14.5725C25.2551 14.4189 25.1231 14.2118 25.0271 13.9573C24.9311 13.7036 24.8825 13.3836 24.8825 13.0063V10.5833H25.9818V12.8885C25.9818 13.2855 26.0603 13.588 26.2153 13.7876C26.3687 13.9851 26.6059 14.0853 26.9202 14.0853C27.1398 14.0853 27.3294 14.0343 27.4836 13.9336C27.6379 13.833 27.7589 13.6822 27.8434 13.4854ZM21.4169 10.8136C21.0705 10.6273 20.6591 10.5329 20.1944 10.5329C19.7354 10.5329 19.3255 10.6273 18.9762 10.8135C18.6265 11.0003 18.3518 11.264 18.1595 11.5973C17.9676 11.9304 17.8703 12.3252 17.8703 12.7706C17.8703 13.2106 17.9676 13.6026 18.1595 13.9357C18.3516 14.2689 18.6265 14.5326 18.9762 14.7193C19.3255 14.9055 19.7354 14.9999 20.1944 14.9999C20.6591 14.9999 21.0704 14.9055 21.4169 14.7192C21.7637 14.5326 22.037 14.2689 22.2292 13.9356C22.4212 13.6024 22.5186 13.2104 22.5186 12.7706C22.5186 12.3253 22.4212 11.9306 22.2292 11.5973C22.0369 11.2639 21.7636 11.0002 21.4169 10.8136ZM20.8361 13.9334C20.659 14.0453 20.4431 14.102 20.1944 14.102C19.9514 14.102 19.7369 14.0453 19.5569 13.9334C19.3765 13.8213 19.235 13.6632 19.1363 13.4633C19.0372 13.2632 18.9869 13.0302 18.9869 12.7706C18.9869 12.5057 19.0372 12.2713 19.1363 12.074C19.235 11.8768 19.3766 11.7186 19.5571 11.6037C19.7371 11.489 19.9516 11.4308 20.1944 11.4308C20.443 11.4308 20.6588 11.489 20.8359 11.6036C21.0136 11.7185 21.1537 11.8768 21.2526 12.074C21.3517 12.2719 21.402 12.5063 21.402 12.7706C21.402 13.0296 21.3517 13.2627 21.2526 13.4633C21.1538 13.6632 21.0136 13.8214 20.8361 13.9334ZM4 10.4683H5.14242V14.9496H4V10.4683ZM8.725 10.7246C8.725 9.7737 7.92677 9.00006 6.94556 9.00006H4V9.95708H6.80551C7.24956 9.95708 7.61739 10.2955 7.62551 10.7114C7.62957 10.9197 7.549 11.1162 7.39864 11.2649C7.24822 11.4135 7.04724 11.4955 6.83273 11.4955H5.73985C5.70104 11.4955 5.66946 11.5261 5.66946 11.5637V12.4143C5.66946 12.4287 5.67407 12.4426 5.68274 12.4542L7.53699 14.9497H8.89434L7.03578 12.4474C7.97175 12.4018 8.725 11.6389 8.725 10.7246ZM11.0765 10.5329C11.518 10.5329 11.9088 10.6187 12.2379 10.7882C12.5669 10.9576 12.8286 11.2014 13.0156 11.5127C13.2019 11.8237 13.2994 12.1958 13.3053 12.6188C13.3053 12.6814 13.3037 12.7434 13.301 12.8054C13.2977 12.8691 13.2903 12.9325 13.2788 12.9939L13.2751 13.0135H9.97302V13.0486C9.98435 13.2728 10.0373 13.4704 10.1305 13.6346C10.2232 13.7982 10.3572 13.9267 10.5284 14.0165C10.7006 14.1068 10.8996 14.1526 11.12 14.1526C11.38 14.1526 11.6045 14.0917 11.7872 13.9716C11.9574 13.8599 12.0742 13.702 12.1344 13.5021L12.1396 13.485H13.2328L13.2268 13.5135C13.171 13.7815 13.057 14.0278 12.888 14.2456C12.7101 14.4747 12.4722 14.6598 12.1807 14.7957C11.8892 14.9313 11.5498 15 11.1719 15C10.6955 15 10.2769 14.907 9.92803 14.7236C9.57845 14.5401 9.30501 14.2778 9.11543 13.9439C8.92627 13.6108 8.83042 13.2189 8.83042 12.7791C8.83042 12.3279 8.92482 11.9303 9.11107 11.5976C9.2975 11.264 9.56348 11.0003 9.90154 10.8137C10.2391 10.6273 10.6344 10.5329 11.0765 10.5329ZM12.1848 12.2585C12.1419 11.9817 12.0251 11.7638 11.8373 11.6105C11.6432 11.4521 11.3901 11.3718 11.0851 11.3718C10.9047 11.3718 10.7346 11.4093 10.5797 11.4831C10.425 11.5567 10.2952 11.6619 10.1939 11.7957C10.0973 11.9233 10.0358 12.0789 10.011 12.2585H12.1848Z" fill="#191C1F"/>
</g>
<path fill-rule="evenodd" clip-rule="evenodd" d="M33 1H3C1.89543 1 1 1.89543 1 3V21C1 22.1046 1.89543 23 3 23H33C34.1046 23 35 22.1046 35 21V3C35 1.89543 34.1046 1 33 1ZM3 0H33C34.6569 0 36 1.34315 36 3V21C36 22.6569 34.6569 24 33 24H3C1.34315 24 0 22.6569 0 21V3C0 1.34315 1.34315 0 3 0Z" fill="black" fill-opacity="0.07"/>
<defs>
<clipPath id="clip0_601_24744">
<rect width="28" height="6" fill="white" transform="translate(4 9)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -0,0 +1,6 @@
<svg width="36" height="24" viewBox="0 0 36 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="36" height="24" rx="3" fill="white"/>
<path d="M33 0H3C1.34315 0 0 1.34315 0 3V21C0 22.6569 1.34315 24 3 24H33C34.6569 24 36 22.6569 36 21V3C36 1.34315 34.6569 0 33 0Z" fill="white"/>
<path d="M17.2985 7.65897L15.4366 16.3633H13.1846L15.0466 7.65897H17.2985ZM26.7724 13.2795L27.9577 10.0106L28.6397 13.2795H26.7724ZM29.286 16.3633H31.3681L29.5489 7.65897H27.6284C27.1953 7.65897 26.8304 7.90995 26.6689 8.297L23.29 16.3633H25.6549L26.1244 15.0634H29.0131L29.286 16.3633ZM23.4072 13.5215C23.417 11.2244 20.2316 11.0972 20.2529 10.0707C20.2598 9.75886 20.5573 9.42663 21.2077 9.34166C21.5301 9.29996 22.4199 9.26648 23.4286 9.73125L23.8231 7.8845C23.2814 7.68873 22.5842 7.5 21.7167 7.5C19.4906 7.5 17.9246 8.68248 17.912 10.3771C17.8977 11.6303 19.0309 12.329 19.8825 12.7462C20.7608 13.1728 21.055 13.4465 21.0507 13.8277C21.0446 14.4117 20.3504 14.6703 19.7042 14.6799C18.5712 14.6977 17.9146 14.3739 17.3913 14.1297L16.9825 16.038C17.5095 16.2792 18.4806 16.4892 19.4861 16.5C21.8528 16.5 23.4002 15.3312 23.4072 13.5215ZM14.0807 7.65897L10.432 16.3633H8.05198L6.25632 9.41664C6.14747 8.98946 6.05252 8.83245 5.72147 8.65194C5.17995 8.35769 4.28604 8.08263 3.5 7.91152L3.55325 7.65897H7.38497C7.87304 7.65897 8.31216 7.98376 8.42395 8.54583L9.37248 13.5831L11.7149 7.65897H14.0807Z" fill="#1434CB"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M33 1H3C1.89543 1 1 1.89543 1 3V21C1 22.1046 1.89543 23 3 23H33C34.1046 23 35 22.1046 35 21V3C35 1.89543 34.1046 1 33 1ZM3 0H33C34.6569 0 36 1.34315 36 3V21C36 22.6569 34.6569 24 33 24H3C1.34315 24 0 22.6569 0 21V3C0 1.34315 1.34315 0 3 0Z" fill="black" fill-opacity="0.07"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,560 @@
jQuery(function ($) {
let wcAddToCartButton = $('.single_add_to_cart_button')
let orderSelectedShippingOption = null
let paymentRequestType = null
let paymentRequest = null
let address_info = null
let wc_order_id = null
function handleError(message) {
$.blockUI({ message: null, overlayCSS: { background: '#fff', opacity: 0.6 } })
if (paymentRequest) {
paymentRequest.destroy()
}
sendRequest(getAjaxURL('set_error_message'), {
revolut_payment_request_error: message,
})
.then(response => {
window.location.reload()
})
.catch(error => {
window.location.reload()
})
}
function logError(message) {
sendRequest(
getAjaxURL('log_error'),
{
revolut_payment_request_error: message,
},
false,
)
}
function getAjaxURL(endpoint, controller = 'revolut_payment_request_') {
return wc_revolut_payment_request_params.ajax_url
.toString()
.replace('%%wc_revolut_gateway_ajax_endpoint%%', `${controller}${endpoint}`)
}
function getProductAttributes() {
const select = $('.variations_form').find('.variations select'),
data = {}
select.each(function () {
const attribute_name = $(this).data('attribute_name') || $(this).attr('name')
data[attribute_name] = $(this).val() || ''
})
return data
}
function checkCartCreateErrors() {
if (!wcAddToCartButton.is('.disabled')) {
return false
}
if (wcAddToCartButton.is('.wc-variation-is-unavailable')) {
return wc_add_to_cart_variation_params.i18n_unavailable_text
}
if (wcAddToCartButton.is('.wc-variation-selection-needed')) {
return wc_add_to_cart_variation_params.i18n_make_a_selection_text
}
return wc_revolut_payment_request_params.error_messages.cart_create_failed
}
function createCart(add_to_cart = 0, revpay = false) {
return new Promise((resolve, reject) => {
if (checkCartCreateErrors()) {
let errorMsg = checkCartCreateErrors()
if (revpay) {
return reject(errorMsg)
}
handleError(errorMsg)
return resolve(false)
}
if (wc_revolut_payment_request_params.is_cart_page) {
return resolve({ success: true })
}
let product_data = {}
product_data['add_to_cart'] = add_to_cart
product_data['is_revolut_pay'] = revpay ? 1 : 0
product_data['security'] = wc_revolut_payment_request_params.nonce.add_to_cart
product_data['revolut_public_id'] =
wc_revolut_payment_request_params.revolut_public_id
product_data['product_id'] = $('.single_add_to_cart_button').val()
product_data['qty'] = $('.quantity .qty').val()
product_data['attributes'] = []
if ($('.single_variation_wrap').length) {
product_data['product_id'] = $('.single_variation_wrap')
.find('input[name="product_id"]')
.val()
}
if ($('.variations_form').length) {
product_data['attributes'] = getProductAttributes()
}
sendRequest(getAjaxURL('add_to_cart'), product_data).then(response => {
if (!response.success) {
if (revpay) {
displayErrorMessage(
wc_revolut_payment_request_params.error_messages.cart_create_failed,
)
return resolve(false)
}
handleError(wc_revolut_payment_request_params.error_messages.cart_create_failed)
return resolve(false)
}
wc_revolut_payment_request_params.total = response.total.amount
wc_revolut_payment_request_params.nonce.checkout = response.checkout_nonce
resolve(response)
})
})
}
function getShippingOptions(address) {
let address_data = {
security: wc_revolut_payment_request_params.nonce.shipping,
revolut_public_id: wc_revolut_payment_request_params.revolut_public_id,
country: address.country,
state: address.region,
postcode: address.postalCode,
city: address.city,
address: '',
address_2: '',
is_product_page: wc_revolut_payment_request_params.is_product_page,
require_shipping: wc_revolut_payment_request_params.shipping_required,
}
return new Promise((resolve, reject) => {
sendRequest(getAjaxURL('get_shipping_options'), address_data)
.then(response => {
if (response['shippingOptions'] && response['shippingOptions'].length !== 0) {
orderSelectedShippingOption = response['shippingOptions'][0]['id']
}
resolve(response)
})
.catch(error => {
reject(error)
})
})
}
function updateShippingOptions(shippingOption) {
let shipping_option_data = {
revolut_public_id: wc_revolut_payment_request_params.revolut_public_id,
security: wc_revolut_payment_request_params.nonce.update_shipping,
shipping_method: [shippingOption.id],
is_product_page: wc_revolut_payment_request_params.is_product_page,
}
return new Promise((resolve, reject) => {
sendRequest(getAjaxURL('update_shipping_method'), shipping_option_data)
.then(response => {
resolve(response)
})
.catch(error => {
reject(error)
})
})
}
function updatePaymentTotal() {
let shipping_option_data = {
revolut_public_id: wc_revolut_payment_request_params.revolut_public_id,
security: wc_revolut_payment_request_params.nonce.update_order_total,
}
return new Promise((resolve, reject) => {
sendRequest(getAjaxURL('update_payment_total'), shipping_option_data)
.then(response => {
resolve(response)
})
.catch(error => {
reject(error)
})
})
}
function udpateExpressCheckoutParams(revpay = false) {
return new Promise((resolve, reject) => {
sendRequest(
getAjaxURL(revpay ? 'get_express_checkout_params' : 'get_payment_request_params'),
{
security: revpay
? wc_revolut_payment_request_params.nonce.get_express_checkout_params
: wc_revolut_payment_request_params.nonce.get_payment_request_params,
},
)
.then(response => {
if (response.success) {
wc_revolut_payment_request_params.revolut_public_id =
response.revolut_public_id
wc_revolut_payment_request_params.nonce.checkout = response.checkout_nonce
return resolve()
}
reject('')
})
.catch(error => {
reject(error)
})
})
}
function loadOrderData() {
return new Promise((resolve, reject) => {
sendRequest(getAjaxURL('load_order_data'), {
revolut_public_id: wc_revolut_payment_request_params.revolut_public_id,
security: wc_revolut_payment_request_params.nonce.load_order_data,
})
.then(response => {
resolve(response)
})
.catch(error => {
reject(error)
})
})
}
function cancelOrder(messages) {
$.blockUI({ message: null, overlayCSS: { background: '#fff', opacity: 0.6 } })
return new Promise((resolve, reject) => {
sendRequest(getAjaxURL('cancel_order'), {
revolut_public_id: wc_revolut_payment_request_params.revolut_public_id,
security: wc_revolut_payment_request_params.nonce.cancel_order,
}).then(response => {
handleError(messages)
})
})
}
function submitOrder(errorMessage = '', revolut_gateway = 'revolut_payment_request') {
$.blockUI({ message: null, overlayCSS: { background: '#fff', opacity: 0.6 } })
let data = {}
data['is_express_checkout'] = 1
data['revolut_gateway'] = revolut_gateway
data['revolut_public_id'] = wc_revolut_payment_request_params.revolut_public_id
data['revolut_payment_error'] = errorMessage
data['wc_order_id'] = wc_order_id
data['reload_checkout'] = 0
data['revolut_save_payment_method'] = 0
data['wc-revolut_cc-payment-token'] = ''
sendRequest(getAjaxURL('process_payment_result', 'wc_revolut_'), data).then(
response => {
if (response.result === 'success') {
window.location.href = response.redirect
return
}
$.unblockUI()
$('.blockUI.blockOverlay').hide()
if (!response.messages || typeof response.messages == 'undefined') {
response.messages = `<div class="woocommerce-error">${wc_revolut_payment_request_params.error_messages.checkout_general}</div>`
}
cancelOrder(response.messages)
},
)
}
function submitWooCommerceOrder(payment_method = 'revolut_payment_request') {
return new Promise((resolve, reject) => {
sendRequest(getAjaxURL('create_order'), {
payment_method: payment_method,
_wpnonce: wc_revolut_payment_request_params.nonce.checkout,
shipping_method: [orderSelectedShippingOption],
payment_request_type: paymentRequestType,
revolut_public_id: wc_revolut_payment_request_params.revolut_public_id,
shipping_required: wc_revolut_payment_request_params.shipping_required ? 1 : 0,
address_info: address_info,
revolut_create_wc_order: 1,
is_express_checkout: 1,
})
.then(response => {
if (true === response.reload) {
window.location.reload()
return
}
if (response.result === 'revolut_wc_order_created') {
wc_order_id = response['wc_order_id']
return resolve(true)
}
if (typeof response.messages == 'undefined') {
response.messages = `<div class="woocommerce-error">${wc_revolut_payment_request_params.error_messages.checkout_general}</div>`
}
logError('submitWooCommerceOrder failed: ' + JSON.stringify(response))
return cancelOrder($(response.messages).text())
})
.catch(error => {
cancelOrder(error)
})
})
}
function displayErrorMessage(message) {
if (message && !message.includes('woocommerce-error')) {
message = `<div class="woocommerce-error">${message}</div>`
}
$('.woocommerce-error').remove()
if (wc_revolut_payment_request_params.is_product_page) {
var element = $('.product').first()
element.before(message)
$('html, body').animate(
{
scrollTop: element.prev('.woocommerce-error').offset().top,
},
600,
)
} else {
var $form = $('.shop_table.cart').closest('form')
$form.before(message)
$('html, body').animate(
{
scrollTop: $form.prev('.woocommerce-error').offset().top,
},
600,
)
}
}
function initPaymentRequestButton() {
if ($('#revolut-payment-request-button').length < 1) {
return false
}
// remove duplicated instances
if ($('.wc-revolut-payment-request-instance').length > 1) {
$('.wc-revolut-payment-request-instance').not(':last').remove()
}
udpateExpressCheckoutParams().then(function () {
const RC = RevolutCheckout(wc_revolut_payment_request_params.revolut_public_id)
const revolutPaymentReuqestButton = document.getElementById(
'revolut-payment-request-button',
)
paymentRequest = RC.paymentRequest({
target: revolutPaymentReuqestButton,
requestShipping: wc_revolut_payment_request_params.shipping_required,
shippingOptions: wc_revolut_payment_request_params.free_shipping_option,
onClick() {
if (!wc_revolut_payment_request_params.shipping_required) {
return createCart(1)
}
},
onShippingOptionChange: selectedShippingOption => {
orderSelectedShippingOption = selectedShippingOption['id']
return updateShippingOptions(selectedShippingOption)
},
onShippingAddressChange: selectedShippingAddress => {
return createCart(1).then(function () {
return getShippingOptions(selectedShippingAddress)
})
},
onSuccess() {
submitOrder()
},
validate(address) {
address_info = address
return submitWooCommerceOrder()
},
onError(error) {
let errorMessage = error
if (error['message']) {
errorMessage = error['message']
}
if (errorMessage == 'Unknown') {
errorMessage =
wc_revolut_payment_request_params.error_messages.checkout_general
}
if (wc_order_id) {
return submitOrder(errorMessage)
}
displayErrorMessage(errorMessage)
},
buttonStyle: {
action: wc_revolut_payment_request_params.payment_request_button_type,
size: wc_revolut_payment_request_params.payment_request_button_size,
variant: wc_revolut_payment_request_params.payment_request_button_theme,
radius: wc_revolut_payment_request_params.payment_request_button_radius,
},
})
paymentRequest.canMakePayment().then(result => {
if (result) {
paymentRequest.render()
} else {
paymentRequest.destroy()
}
})
})
}
function initRevolutPayExpressCheckoutButton() {
if ($('#revolut-pay-express-checkout-button').length < 1) {
return false
}
// remove duplicated instances
if ($('.wc-revolut-pay-express-checkout-instance').length > 1) {
$('.wc-revolut-pay-express-checkout-instance').not(':last').remove()
}
udpateExpressCheckoutParams(true).then(function () {
instance = RevolutCheckout.payments({
locale: wc_revolut_payment_request_params.locale,
publicToken: wc_revolut_payment_request_params.publicToken,
})
instance.revolutPay.mount('#revolut-pay-express-checkout-button', {
currency: wc_revolut_payment_request_params.currency,
totalAmount: parseInt(wc_revolut_payment_request_params.total),
requestShipping: true,
validate() {
return createCart(1, true).then(function (result) {
if (result && result.success) {
if (wc_revolut_payment_request_params.is_cart_page) {
return updatePaymentTotal()
}
return Promise.resolve(true)
}
})
},
createOrder: () => {
return { publicId: wc_revolut_payment_request_params.revolut_public_id }
},
buttonStyle: {
cashbackCurrency: wc_revolut_payment_request_params.currency,
variant: wc_revolut_payment_request_params.revolut_pay_button_theme,
size: wc_revolut_payment_request_params.revolut_pay_button_size,
radius: wc_revolut_payment_request_params.revolut_pay_button_radius,
},
mobileRedirectUrls: {
success: wc_revolut_payment_request_params.redirect_url,
failure: wc_revolut_payment_request_params.redirect_url,
cancel: wc_revolut_payment_request_params.redirect_url,
},
__metadata: {
environment: 'woocommerce',
context: wc_revolut_payment_request_params.is_cart_page ? 'cart' : 'product',
origin_url: wc_revolut_payment_request_params.revolut_pay_origin_url,
},
})
instance.revolutPay.on('payment', function (event) {
switch (event.type) {
case 'success':
$.blockUI({ message: null, overlayCSS: { background: '#fff', opacity: 0.6 } })
loadOrderData()
.then(function (order_data) {
address_info = order_data.address_info
orderSelectedShippingOption = order_data.selected_shipping_option
submitWooCommerceOrder('revolut_pay')
.then(function () {
submitOrder('', 'revolut_pay')
})
.catch(error => {
displayErrorMessage([error])
$.unblockUI()
$('.blockUI.blockOverlay').hide()
})
})
.catch(error => {
displayErrorMessage([error])
$.unblockUI()
$('.blockUI.blockOverlay').hide()
})
break
case 'error':
displayErrorMessage(event.error.message)
break
}
})
})
}
$('.quantity').on('input', '.qty', function () {
if (
!paymentRequest ||
wcAddToCartButton.is('.disabled') ||
wc_revolut_payment_request_params.is_cart_page
) {
return
}
paymentRequest.updateWith(createCart())
})
$(document.body).on('woocommerce_variation_has_changed', function () {
if (
!paymentRequest ||
wcAddToCartButton.is('.disabled') ||
wc_revolut_payment_request_params.is_cart_page
) {
return
}
paymentRequest.updateWith(createCart())
})
$(document.body).on('updated_cart_totals', function () {
initPaymentRequestButton()
initRevolutPayExpressCheckoutButton()
})
initPaymentRequestButton()
initRevolutPayExpressCheckoutButton()
function buildFormData(formData, data, parentKey) {
if (data && typeof data === 'object') {
Object.keys(data).forEach(key => {
buildFormData(formData, data[key], parentKey ? `${parentKey}[${key}]` : key)
})
} else {
const value = data == null ? '' : data
formData.append(parentKey, value)
}
}
function sendRequest(url, data, shouldLogError = true) {
const requestData = new FormData()
buildFormData(requestData, data)
return fetch(url, {
method: 'POST',
body: requestData,
})
.then(response => response.json())
.catch(error => {
if (shouldLogError) {
logError(error)
}
throw error
})
}
})

View File

@@ -0,0 +1,249 @@
jQuery(document).ready(function ($) {
$('#woocommerce_revolut_cc_restore_button').hide()
const revolutMode = $('#woocommerce_revolut_mode')
const apiDevKey = $('#woocommerce_revolut_api_key_dev').parents().closest('tr')
const apiSandboxKey = $('#woocommerce_revolut_api_key_sandbox').parents().closest('tr')
const apiLiveKey = $('#woocommerce_revolut_api_key').parents().closest('tr')
const payment_action = $('#woocommerce_revolut_payment_action')
const capture_checkbox = $('#woocommerce_revolut_accept_capture')
const capture_checkbox_container = capture_checkbox.parents().closest('tr')
const customize_capture_status_checkbox = $(
'#woocommerce_revolut_customise_capture_status',
)
const customize_capture_status_checkbox_container = customize_capture_status_checkbox
.parents()
.closest('tr')
const capture_status = $('#woocommerce_revolut_selected_capture_status_list')
.parents()
.closest('tr')
$('#woocommerce_revolut_payment_request_onboard_applepay').hide()
if (!capture_checkbox.is(':checked')) {
customize_capture_status_checkbox_container.hide()
capture_status.hide()
} else {
customize_capture_status_checkbox_container.show()
}
if (!customize_capture_status_checkbox.is(':checked')) {
capture_status.hide()
}
if (revolutMode.val() == 'sandbox') {
change('sandbox')
} else if (revolutMode.val() == 'dev') {
change('dev')
} else {
change('live')
}
if (payment_action.val() == 'authorize') {
capture_checkbox_container.show()
} else {
capture_checkbox_container.hide()
customize_capture_status_checkbox_container.hide()
capture_status.hide()
}
customize_capture_status_checkbox.on('change', function () {
capture_status.toggle($(this).is(':checked'))
if (!$(this).is(':checked')) {
$('#woocommerce_revolut_selected_capture_status_list').val(null).trigger('change')
}
})
capture_checkbox.on('change', function () {
customize_capture_status_checkbox_container.toggle($(this).is(':checked'))
customize_capture_status_checkbox.change()
if (!$(this).is(':checked')) {
capture_status.hide()
}
})
revolutMode.on('change', function () {
var mode = $(this).val()
if (mode == 'sandbox') {
change('sandbox')
} else if (mode == 'dev') {
change('dev')
} else {
change('live')
}
})
// change payment action
payment_action.on('change', function () {
if (payment_action.val() == 'authorize') {
capture_checkbox_container.show()
capture_checkbox.change()
} else {
capture_checkbox_container.hide()
customize_capture_status_checkbox_container.hide()
capture_status.hide()
}
})
// change API mode
function change(mode) {
if (mode == 'sandbox') {
apiSandboxKey.show()
apiLiveKey.hide()
apiDevKey.hide()
} else if (mode == 'dev') {
apiSandboxKey.hide()
apiLiveKey.hide()
apiDevKey.show()
apiLiveKey.hide()
} else {
apiSandboxKey.hide()
apiDevKey.hide()
apiLiveKey.show()
}
}
// onboard apple pay domain
$('.setup-applepay-domain').click(function (event) {
event.preventDefault()
$.ajax({
type: 'POST',
url: ajaxurl,
data: {
action: 'wc_revolut_onboard_applepay_domain',
},
success: function (response) {
let message = ''
const setup_button = $('.setup-applepay-domain')
if (!response.success && response.message) {
message = response.message
}
if (response.success) {
setup_button.text('Success')
setup_button.prop('disabled', true)
return true
}
$('.setup-applepay-domain-error')
.show()
.text('Setup Failed: ' + message)
},
})
})
$(document).on('change', '.revolut_styling_option_enable', function () {
if (!$('.revolut_styling_option_enable').is(':checked')) {
$('.revolut_styling_option').parents('tr').hide()
restoreStylinOptions()
} else {
$('.revolut_styling_option').parents('tr').show()
}
})
$(document).on('click', '.revolut_style_restore', function () {
restoreStylinOptions()
})
if (!$('.revolut_styling_option_enable').is(':checked')) {
$('.revolut_styling_option').parents('tr').hide()
}
function restoreStylinOptions() {
$('#woocommerce_revolut_cc_widget_background_color')
.val(default_options.default_bg_color)
.trigger('change')
$('#woocommerce_revolut_cc_widget_text_color')
.val(default_options.default_text_color)
.trigger('change')
$('#woocommerce_revolut_cc_revolut_logo_color').prop('selectedIndex', 0).val()
}
adjustCardWidgetStylingOptions()
$(document).on('change', '#woocommerce_revolut_cc_card_widget_type', function () {
adjustCardWidgetStylingOptions()
})
function adjustCardWidgetStylingOptions() {
if ($('#woocommerce_revolut_cc_card_widget_type').val() === 'popup') {
$('#woocommerce_revolut_cc_styling_title').hide()
$('#woocommerce_revolut_cc_widget_styling').parents('table').hide()
$('#woocommerce_revolut_cc_enable_cardholder_name').parents('tr').hide()
} else {
$('#woocommerce_revolut_cc_styling_title').show()
$('#woocommerce_revolut_cc_widget_styling').parents('table').show()
$('#woocommerce_revolut_cc_enable_cardholder_name').parents('tr').show()
}
}
$('#woocommerce_revolut_advanced_settings_clear_unused_order_records').hide()
const consent_clear_unused_order_records = $(
'#woocommerce_revolut_advanced_settings_consent_clear_unused_order_records',
)
consent_clear_unused_order_records.change(function () {
if ($(this).is(':checked')) {
consent_clear_unused_order_records.removeAttr('style')
} else {
consent_clear_unused_order_records.css({ borderColor: 'red' })
}
})
$('.revolut_clear_unused_order_records').click(function (e) {
e.preventDefault()
self = $(this)
if (!consent_clear_unused_order_records.is(':checked')) {
consent_clear_unused_order_records.css({ borderColor: 'red' })
alert(
'Please indicate that you have read and agree to the consequences of this operation.',
)
return false
}
$.blockUI({
message: null,
overlayCSS: { background: '#fff', opacity: 0.6 },
})
$.ajax({
type: 'POST',
url: ajaxurl,
data: {
action: 'wc_revolut_clear_records',
},
success: function (response) {
$.unblockUI()
if (response && !response.success) {
return alert(response.message)
}
alert('Operation completed successfully.')
},
error: function (jqXHR, textStatus, errorThrown) {
$.unblockUI()
if (jqXHR && jqXHR.responseText) {
let response = jqXHR.responseText.match(/{(.*?)}/)
if (response.length > 0 && response[0]) {
try {
response = JSON.parse(response[0])
if (response.message) {
alert(response.message)
return false
}
} catch (e) {
// swallow error and handle in generic block below
}
}
}
alert(errorThrown)
},
})
})
})

File diff suppressed because it is too large Load Diff