Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

feat: Payment link status page UI (#2740)

Kashif856c7af77e17
diff --git a/crates/router/src/core/payment_link/payment_link.html b/crates/router/src/core/payment_link/payment_link.html
index 67410cac84..e02bc16e71 100644
--- a/crates/router/src/core/payment_link/payment_link.html
+++ b/crates/router/src/core/payment_link/payment_link.html
@@ -1,6 +1,8 @@
<!DOCTYPE html>
<html>
<head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
{{ hyperloader_sdk_link }}
<style>
{{ css_color_scheme }}
@@ -41,11 +43,20 @@
.hyper-checkout {
display: flex;
background-color: #fafafa;
- height: 100%;
width: 100%;
+ height: 100%;
max-width: 1900px;
}
+ #hyper-footer {
+ width: 100vw;
+ display: flex;
+ justify-content: center;
+ background-color: white;
+ z-index: 100;
+ padding: 20px 0;
+ }
+
.main {
display: flex;
flex-flow: column;
@@ -338,32 +349,95 @@
}
#hyper-checkout-status {
- margin: 40px !important;
+ display: flex;
+ flex-flow: column;
+ font-family: "Montserrat";
+ height: 100%;
+ width: 100%;
+ }
+
+ #hyper-checkout-status-header {
+ max-width: 1200px;
+ border: 1px solid #e6e6e6;
+ border-radius: 3px;
+ padding: 20px;
}
- .hyper-checkout-status-header {
+ #hyper-checkout-status-header,
+ #hyper-checkout-status-content {
+ width: 100%;
display: flex;
align-items: center;
- font-family: "Montserrat";
+ justify-content: space-between;
font-size: 24px;
font-weight: 600;
}
- #status-img {
- height: 70px;
+ .hyper-checkout-status-amount {
+ font-family: "Montserrat";
+ font-size: 40px;
+ font-weight: 700;
}
- #status-date {
- font-size: 13px;
- font-weight: 500;
- color: #53655c;
+ .hyper-checkout-status-merchant-logo {
+ border: 1px solid #e6e6e6;
+ height: 62px;
+ width: 62px;
}
- #status-details {
- margin-left: 10px;
+ #hyper-checkout-status-content {
justify-content: center;
+ align-items: center;
+ flex-flow: column;
+ height: 100%;
+ }
+
+ .hyper-checkout-status-image {
+ height: 200px;
+ width: 200px;
+ }
+
+ .hyper-checkout-status-text {
+ text-align: center;
+ font-size: 28px;
+ font-weight: 600;
+ margin-top: 20px;
+ }
+
+ .hyper-checkout-status-message {
+ text-align: center;
+ font-size: 12px;
+ margin-top: 10px;
+ font-size: 14px;
+ font-weight: 500;
+ }
+
+ .hyper-checkout-status-details {
display: flex;
flex-flow: column;
+ margin-top: 20px;
+ border-radius: 3px;
+ border: 1px solid #e6e6e6;
+ }
+
+ .hyper-checkout-status-item {
+ display: flex;
+ align-items: center;
+ padding: 5px 10px;
+ border-bottom: 1px solid #e6e6e6;
+ }
+
+ .hyper-checkout-status-item:last-child {
+ border-bottom: 0;
+ }
+
+ .hyper-checkout-item-header {
+ width: 15ch;
+ font-size: 12px;
+ }
+
+ .hyper-checkout-item-value {
+ font-size: 12px;
}
@keyframes loading {
@@ -513,31 +587,11 @@
#payment-form-wrap {
min-width: 300px;
padding: 10px;
- width: 100vw;
- }
-
- #hyper-checkout-status {
- padding: 15px;
- }
-
- #status-img {
- height: 60px;
- }
-
- #status-text {
- font-size: 19px;
- }
-
- #status-date {
- font-size: 12px;
- }
-
- .hyper-checkout-item-header {
- font-size: 11px;
+ width: calc(100vw - 20px);
}
- .hyper-checkout-item-value {
- font-size: 17px;
+ #hyper-checkout-status-header {
+ max-width: calc(100% - 40px);
}
}
</style>
@@ -545,22 +599,144 @@
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800"
/>
+
+ <!-- SVG ICONS -->
+ <svg xmlns="http://www.w3.org/2000/svg" display="none">
+ <defs>
+ <symbol id="cart-icon-small">
+ <mask
+ id="mask0_1_13"
+ style="mask-type: luminance"
+ maskUnits="userSpaceOnUse"
+ x="0"
+ y="0"
+ width="16"
+ height="16"
+ >
+ <path d="M16 0H0V16H16V0Z" fill="white" />
+ </mask>
+ <g mask="url(#mask0_1_13)">
+ <mask
+ id="mask1_1_13"
+ style="mask-type: alpha"
+ maskUnits="userSpaceOnUse"
+ x="0"
+ y="0"
+ width="16"
+ height="16"
+ >
+ <path d="M16 0H0V16H16V0Z" fill="#D9D9D9" />
+ </mask>
+ <g mask="url(#mask1_1_13)">
+ <path
+ d="M3.53716 14.3331C3.20469 14.3331 2.92071 14.2153 2.68525 13.9798C2.44977 13.7444 2.33203 13.4604 2.33203 13.1279V5.53823C2.33203 5.20575 2.44977 4.92178 2.68525 4.68631C2.92071 4.45083 3.20469 4.3331 3.53716 4.3331H4.9987C4.9987 3.50063 5.29058 2.79252 5.87433 2.20876C6.4581 1.62501 7.16621 1.33313 7.99868 1.33313C8.83115 1.33313 9.53927 1.62501 10.123 2.20876C10.7068 2.79252 10.9987 3.50063 10.9987 4.3331H12.4602C12.7927 4.3331 13.0766 4.45083 13.3121 4.68631C13.5476 4.92178 13.6653 5.20575 13.6653 5.53823V13.1279C13.6653 13.4604 13.5476 13.7444 13.3121 13.9798C13.0766 14.2153 12.7927 14.3331 12.4602 14.3331H3.53716ZM3.53716 13.3331H12.4602C12.5115 13.3331 12.5585 13.3117 12.6012 13.269C12.644 13.2262 12.6653 13.1792 12.6653 13.1279V5.53823C12.6653 5.48694 12.644 5.43992 12.6012 5.39718C12.5585 5.35445 12.5115 5.33308 12.4602 5.33308H3.53716C3.48588 5.33308 3.43886 5.35445 3.39611 5.39718C3.35338 5.43992 3.33201 5.48694 3.33201 5.53823V13.1279C3.33201 13.1792 3.35338 13.2262 3.39611 13.269C3.43886 13.3117 3.48588 13.3331 3.53716 13.3331ZM7.99868 8.99973C8.83115 8.99973 9.53927 8.70785 10.123 8.1241C10.7068 7.54033 10.9987 6.83221 10.9987 5.99975H9.99868C9.99868 6.5553 9.80424 7.02752 9.41535 7.41641C9.02646 7.8053 8.55424 7.99975 7.99868 7.99975C7.44313 7.99975 6.9709 7.8053 6.58202 7.41641C6.19313 7.02752 5.99868 6.5553 5.99868 5.99975H4.9987C4.9987 6.83221 5.29058 7.54033 5.87433 8.1241C6.4581 8.70785 7.16621 8.99973 7.99868 8.99973ZM5.99868 4.3331H9.99868C9.99868 3.77754 9.80424 3.30532 9.41535 2.91643C9.02646 2.52754 8.55424 2.3331 7.99868 2.3331C7.44313 2.3331 6.9709 2.52754 6.58202 2.91643C6.19313 3.30532 5.99868 3.77754 5.99868 4.3331Z"
+ fill="#333333"
+ />
+ </g>
+ </g>
+ </symbol>
+ <symbol id="cart-icon-big">
+ <mask
+ id="mask0_1_13"
+ style="mask-type: luminance"
+ maskUnits="userSpaceOnUse"
+ x="0"
+ y="0"
+ width="30"
+ height="30"
+ >
+ <path d="M30 0H0V30H30V0Z" fill="white" />
+ </mask>
+ <g mask="url(#mask0_1_13)">
+ <mask
+ id="mask1_1_13"
+ style="mask-type: alpha"
+ maskUnits="userSpaceOnUse"
+ x="0"
+ y="0"
+ width="30"
+ height="30"
+ >
+ <path d="M30 0H0V30H30V0Z" fill="#D9D9D9" />
+ </mask>
+ <g mask="url(#mask1_1_13)">
+ <path
+ d="M6.63218 26.8746C6.0088 26.8746 5.47633 26.6537 5.03485 26.2121C4.59332 25.7708 4.37256 25.2383 4.37256 24.6148V10.3842C4.37256 9.76078 4.59332 9.22834 5.03485 8.78683C5.47633 8.34531 6.0088 8.12456 6.63218 8.12456H9.37257C9.37257 6.56368 9.91984 5.23597 11.0144 4.14142C12.1089 3.04689 13.4366 2.49962 14.9975 2.49962C16.5584 2.49962 17.8861 3.04689 18.9806 4.14142C20.0753 5.23597 20.6226 6.56368 20.6226 8.12456H23.3629C23.9863 8.12456 24.5186 8.34531 24.9602 8.78683C25.4018 9.22834 25.6224 9.76078 25.6224 10.3842V24.6148C25.6224 25.2383 25.4018 25.7708 24.9602 26.2121C24.5186 26.6537 23.9863 26.8746 23.3629 26.8746H6.63218ZM6.63218 24.9996H23.3629C23.4591 24.9996 23.5472 24.9594 23.6273 24.8794C23.7075 24.7991 23.7474 24.711 23.7474 24.6148V10.3842C23.7474 10.288 23.7075 10.1999 23.6273 10.1197C23.5472 10.0396 23.4591 9.99952 23.3629 9.99952H6.63218C6.53603 9.99952 6.44786 10.0396 6.36771 10.1197C6.28759 10.1999 6.24752 10.288 6.24752 10.3842V24.6148C6.24752 24.711 6.28759 24.7991 6.36771 24.8794C6.44786 24.9594 6.53603 24.9996 6.63218 24.9996ZM14.9975 16.8745C16.5584 16.8745 17.8861 16.3272 18.9806 15.2327C20.0753 14.1381 20.6226 12.8104 20.6226 11.2495H18.7475C18.7475 12.2912 18.383 13.1766 17.6538 13.9058C16.9246 14.6349 16.0392 14.9995 14.9975 14.9995C13.9559 14.9995 13.0704 14.6349 12.3413 13.9058C11.6121 13.1766 11.2475 12.2912 11.2475 11.2495H9.37257C9.37257 12.8104 9.91984 14.1381 11.0144 15.2327C12.1089 16.3272 13.4366 16.8745 14.9975 16.8745ZM11.2475 8.12456H18.7475C18.7475 7.08289 18.383 6.19747 17.6538 5.46831C16.9246 4.73914 16.0392 4.37456 14.9975 4.37456C13.9559 4.37456 13.0704 4.73914 12.3413 5.46831C11.6121 6.19747 11.2475 7.08289 11.2475 8.12456Z"
+ fill="#333333"
+ />
+ </g>
+ </g>
+ </symbol>
+ <symbol id="cart-close">
+ <path
+ d="M 9.15625 6.3125 L 6.3125 9.15625 L 22.15625 25 L 6.21875 40.96875 L 9.03125 43.78125 L 25 27.84375 L 40.9375 43.78125 L 43.78125 40.9375 L 27.84375 25 L 43.6875 9.15625 L 40.84375 6.3125 L 25 22.15625 Z"
+ ></path>
+ </symbol>
+ <symbol id="hyperswitch-brand">
+ <path
+ opacity="0.4"
+ d="M0.791016 11.7578H1.64062V9.16992H1.71875C2.00684 9.73145 2.63672 10.0928 3.35938 10.0928C4.69727 10.0928 5.56641 9.02344 5.56641 7.37305V7.36328C5.56641 5.72266 4.69238 4.64355 3.35938 4.64355C2.62695 4.64355 2.04102 4.99023 1.71875 5.57617H1.64062V4.73633H0.791016V11.7578ZM3.16406 9.34082C2.20703 9.34082 1.62109 8.58887 1.62109 7.37305V7.36328C1.62109 6.14746 2.20703 5.39551 3.16406 5.39551C4.12598 5.39551 4.69727 6.1377 4.69727 7.36328V7.37305C4.69727 8.59863 4.12598 9.34082 3.16406 9.34082ZM8.85762 10.0928C10.3566 10.0928 11.2844 9.05762 11.2844 7.37305V7.36328C11.2844 5.67383 10.3566 4.64355 8.85762 4.64355C7.35859 4.64355 6.43086 5.67383 6.43086 7.36328V7.37305C6.43086 9.05762 7.35859 10.0928 8.85762 10.0928ZM8.85762 9.34082C7.86152 9.34082 7.3 8.61328 7.3 7.37305V7.36328C7.3 6.11816 7.86152 5.39551 8.85762 5.39551C9.85371 5.39551 10.4152 6.11816 10.4152 7.36328V7.37305C10.4152 8.61328 9.85371 9.34082 8.85762 9.34082ZM13.223 10H14.0727L15.2445 5.92773H15.3227L16.4994 10H17.3539L18.8285 4.73633H17.9838L16.9486 8.94531H16.8705L15.6938 4.73633H14.8881L13.7113 8.94531H13.6332L12.598 4.73633H11.7484L13.223 10ZM21.7047 10.0928C22.9449 10.0928 23.6969 9.38965 23.8775 8.67676L23.8873 8.6377H23.0377L23.0182 8.68164C22.8766 8.99902 22.4371 9.33594 21.7242 9.33594C20.7867 9.33594 20.1861 8.70117 20.1617 7.6123H23.9508V7.28027C23.9508 5.70801 23.0816 4.64355 21.651 4.64355C20.2203 4.64355 19.2926 5.75684 19.2926 7.38281V7.3877C19.2926 9.03809 20.2008 10.0928 21.7047 10.0928ZM21.6461 5.40039C22.4225 5.40039 22.9986 5.89355 23.0865 6.93359H20.1764C20.2691 5.93262 20.8648 5.40039 21.6461 5.40039ZM25.0691 10H25.9188V6.73828C25.9188 5.9668 26.4949 5.4541 27.3055 5.4541C27.491 5.4541 27.6521 5.47363 27.8279 5.50293V4.67773C27.7449 4.66309 27.5643 4.64355 27.4031 4.64355C26.6902 4.64355 26.1971 4.96582 25.9969 5.51758H25.9188V4.73633H25.0691V10ZM30.6797 10.0928C31.9199 10.0928 32.6719 9.38965 32.8525 8.67676L32.8623 8.6377H32.0127L31.9932 8.68164C31.8516 8.99902 31.4121 9.33594 30.6992 9.33594C29.7617 9.33594 29.1611 8.70117 29.1367 7.6123H32.9258V7.28027C32.9258 5.70801 32.0566 4.64355 30.626 4.64355C29.1953 4.64355 28.2676 5.75684 28.2676 7.38281V7.3877C28.2676 9.03809 29.1758 10.0928 30.6797 10.0928ZM30.6211 5.40039C31.3975 5.40039 31.9736 5.89355 32.0615 6.93359H29.1514C29.2441 5.93262 29.8398 5.40039 30.6211 5.40039ZM35.9875 10.0928C36.7199 10.0928 37.3059 9.74609 37.6281 9.16016H37.7062V10H38.5559V2.64648H37.7062V5.56641H37.6281C37.34 5.00488 36.7102 4.64355 35.9875 4.64355C34.6496 4.64355 33.7805 5.71289 33.7805 7.36328V7.37305C33.7805 9.01367 34.6545 10.0928 35.9875 10.0928ZM36.1828 9.34082C35.2209 9.34082 34.6496 8.59863 34.6496 7.37305V7.36328C34.6496 6.1377 35.2209 5.39551 36.1828 5.39551C37.1398 5.39551 37.7258 6.14746 37.7258 7.36328V7.37305C37.7258 8.58887 37.1398 9.34082 36.1828 9.34082ZM45.2164 10.0928C46.5494 10.0928 47.4234 9.01367 47.4234 7.37305V7.36328C47.4234 5.71289 46.5543 4.64355 45.2164 4.64355C44.4938 4.64355 43.8639 5.00488 43.5758 5.56641H43.4977V2.64648H42.648V10H43.4977V9.16016H43.5758C43.898 9.74609 44.484 10.0928 45.2164 10.0928ZM45.0211 9.34082C44.0641 9.34082 43.4781 8.58887 43.4781 7.37305V7.36328C43.4781 6.14746 44.0641 5.39551 45.0211 5.39551C45.983 5.39551 46.5543 6.1377 46.5543 7.36328V7.37305C46.5543 8.59863 45.983 9.34082 45.0211 9.34082ZM48.7957 11.8457C49.7283 11.8457 50.1629 11.5039 50.5975 10.3223L52.6531 4.73633H51.7596L50.3191 9.06738H50.241L48.7957 4.73633H47.8875L49.8357 10.0049L49.7381 10.3174C49.5477 10.9229 49.2547 11.1426 48.7713 11.1426C48.6541 11.1426 48.5223 11.1377 48.4197 11.1182V11.8164C48.5369 11.8359 48.6834 11.8457 48.7957 11.8457Z"
+ fill="currentColor"
+ ></path>
+ <g opacity="0.6">
+ <path
+ d="M78.42 6.9958C78.42 9.15638 77.085 10.4444 75.2379 10.4444C74.2164 10.4444 73.3269 10.0276 72.9206 9.33816V12.9166H71.4929V3.65235H72.8018L72.9193 4.66772C73.3256 3.97825 74.189 3.5225 75.2366 3.5225C77.017 3.5225 78.4186 4.75861 78.4186 6.9971L78.42 6.9958ZM76.94 6.9958C76.94 5.62985 76.1288 4.78328 74.9492 4.78328C73.8232 4.77029 72.9598 5.62855 72.9598 7.00878C72.9598 8.38901 73.8246 9.18235 74.9492 9.18235C76.0739 9.18235 76.94 8.36304 76.94 6.9958Z"
+ fill="currentColor"
+ ></path>
+ <path
+ d="M86.0132 7.3736H80.8809C80.9071 8.62268 81.7313 9.2732 82.7789 9.2732C83.564 9.2732 84.2197 8.90834 84.494 8.17992H85.9479C85.5939 9.53288 84.3895 10.4444 82.7528 10.4444C80.749 10.4444 79.4271 9.06545 79.4271 6.96978C79.4271 4.87412 80.749 3.50818 82.7397 3.50818C84.7305 3.50818 86.0132 4.83517 86.0132 6.83994V7.3736ZM80.894 6.38419H84.5594C84.481 5.226 83.709 4.6404 82.7397 4.6404C81.7705 4.6404 80.9985 5.226 80.894 6.38419Z"
+ fill="currentColor"
+ ></path>
+ <path
+ d="M88.5407 3.65204C87.8745 3.65204 87.335 4.18829 87.335 4.85048V10.3156H88.7758V5.22703C88.7758 5.06213 88.9104 4.92709 89.0776 4.92709H91.2773V3.65204H88.5407Z"
+ fill="currentColor"
+ ></path>
+ <path
+ d="M69.1899 3.63908L67.3442 9.17039L65.3535 3.65207H63.8082L66.3606 10.2247C66.439 10.4325 66.4782 10.6026 66.4782 10.7713C66.4782 10.8635 66.469 10.9479 66.4533 11.0258L66.4494 11.0401C66.4403 11.0817 66.4298 11.1206 66.4168 11.1583L66.3201 11.5102C66.2966 11.5971 66.2169 11.6569 66.1268 11.6569H64.0956V12.9189H65.5755C66.5709 12.9189 67.3952 12.6852 67.8667 11.3829L70.6817 3.65207L69.1886 3.63908H69.1899Z"
+ fill="currentColor"
+ ></path>
+ <path
+ d="M57 10.3144H58.4264V6.72299C58.4264 5.60375 59.0417 4.82339 60.1807 4.82339C61.1761 4.81041 61.7913 5.396 61.7913 6.68404V10.3144H63.2191V6.46201C63.2191 4.18457 61.8188 3.50809 60.5478 3.50809C59.5785 3.50809 58.8196 3.88593 58.4264 4.51047V0.919022H57V10.3144Z"
+ fill="currentColor"
+ ></path>
+ <path
+ d="M93.1623 8.29808C93.1753 8.98755 93.8167 9.39136 94.6945 9.39136C95.5723 9.39136 96.0948 9.06545 96.0948 8.47986C96.0948 7.97218 95.8336 7.69951 95.0733 7.58135L93.7253 7.34763C92.4164 7.1269 91.9057 6.44912 91.9057 5.49997C91.9057 4.30282 93.097 3.52246 94.6161 3.52246C96.2529 3.52246 97.4442 4.30282 97.4572 5.63111H96.0439C96.0308 4.95463 95.4417 4.57679 94.6174 4.57679C93.7932 4.57679 93.3347 4.90269 93.3347 5.44933C93.3347 5.93105 93.6756 6.15178 94.4215 6.28162L95.7434 6.51534C96.987 6.73607 97.563 7.34763 97.563 8.35002C97.563 9.72895 96.2803 10.4457 94.722 10.4457C92.9546 10.4457 91.7633 9.60041 91.7372 8.29808H93.1649H93.1623Z"
+ fill="currentColor"
+ ></path>
+ <path
+ d="M100.808 8.75352L102.327 3.652H103.82L105.313 8.75352L106.583 3.652H108.089L106.191 10.3155H104.58L103.061 5.23997L101.529 10.3155H99.9052L97.9941 3.652H99.5002L100.809 8.75352H100.808Z"
+ fill="currentColor"
+ ></path>
+ <path
+ d="M108.926 0.918945H110.511V2.40305H108.926V0.918945ZM109.005 3.65214H110.431V10.3157H109.005V3.65214Z"
+ fill="currentColor"
+ ></path>
+ <path
+ d="M119.504 4.7452C118.391 4.7452 117.632 5.55152 117.632 6.9707C117.632 8.46779 118.417 9.19621 119.465 9.19621C120.302 9.19621 120.919 8.72748 121.193 7.84325H122.712C122.371 9.45719 121.141 10.4466 119.491 10.4466C117.502 10.4466 116.165 9.06767 116.165 6.972C116.165 4.87634 117.5 3.51039 119.504 3.51039C121.141 3.51039 122.358 4.43487 122.712 6.04752H121.167C120.932 5.21523 120.289 4.7465 119.504 4.7465V4.7452Z"
+ fill="currentColor"
+ ></path>
+ <path
+ d="M113.959 9.05208C113.875 9.05208 113.809 8.98456 113.809 8.90276V4.91399H115.367V3.65191H113.809V1.86787H112.382V3.02607C112.382 3.44287 112.252 3.65062 111.833 3.65062H111.256V4.91269H112.382V8.50414C112.382 9.66234 113.024 10.3128 114.189 10.3128H115.354V9.05078H113.96L113.959 9.05208Z"
+ fill="currentColor"
+ ></path>
+ <path
+ d="M127.329 3.50801C126.359 3.50801 125.601 3.88585 125.207 4.5104V0.918945H123.781V10.3144H125.207V6.72292C125.207 5.60367 125.823 4.82332 126.962 4.82332C127.957 4.81033 128.572 5.39592 128.572 6.68397V10.3144H130V6.46193C130 4.18449 128.6 3.50801 127.329 3.50801Z"
+ fill="currentColor"
+ ></path>
+ </g>
+ </symbol>
+ </defs>
+ </svg>
</head>
<body onload="showSDK()">
<div class="page-spinner hidden" id="page-spinner"></div>
<div class="hyper-checkout">
<div class="main hidden" id="hyper-checkout-status">
- <div class="hyper-checkout-status-header">
- <img id="status-img" />
- <div id="status-details">
- <div id="status-text"></div>
- <div id="status-date"></div>
- </div>
- </div>
- <div id="hyper-checkout-status-items"></div>
+ <div id="hyper-checkout-status-header"></div>
+ <div id="hyper-checkout-status-content"></div>
</div>
- <div class="main" id="hyper-checkout-details">
+ <div class="main hidden" id="hyper-checkout-details">
<div class="hyper-checkout-payment">
<div class="hyper-checkout-payment-content-details">
<div id="hyper-checkout-payment-context">
@@ -573,40 +749,27 @@
onclick="viewCartInMobileView()"
>
<svg
- fill="#000000"
- version="1.1"
- id="Capa_1"
+ width="30"
+ height="30"
+ viewBox="0 0 30 30"
+ fill="none"
xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- width="30px"
- height="30px"
- viewBox="0 0 902.86 902.86"
- xml:space="preserve"
+ class="cart-icon"
>
- <g>
- <g>
- <path
- d="M671.504,577.829l110.485-432.609H902.86v-68H729.174L703.128,179.2L0,178.697l74.753,399.129h596.751V577.829z
-M685.766,247.188l-67.077,262.64H131.199L81.928,246.756L685.766,247.188z"
- ></path>
- <path
- d="M578.418,825.641c59.961,0,108.743-48.783,108.743-108.744s-48.782-108.742-108.743-108.742H168.717
-c-59.961,0-108.744,48.781-108.744,108.742s48.782,108.744,108.744,108.744c59.962,0,108.743-48.783,108.743-108.744
-c0-14.4-2.821-28.152-7.927-40.742h208.069c-5.107,12.59-7.928,26.342-7.928,40.742
-C469.675,776.858,518.457,825.641,578.418,825.641z M209.46,716.897c0,22.467-18.277,40.744-40.743,40.744
-c-22.466,0-40.744-18.277-40.744-40.744c0-22.465,18.277-40.742,40.744-40.742C191.183,676.155,209.46,694.432,209.46,716.897z
-M619.162,716.897c0,22.467-18.277,40.744-40.743,40.744s-40.743-18.277-40.743-40.744c0-22.465,18.277-40.742,40.743-40.742
-S619.162,694.432,619.162,716.897z"
- ></path>
- </g>
- </g>
+ <use
+ xlink:href="#cart-icon-big"
+ x="0"
+ y="0"
+ width="30"
+ height="30"
+ />
</svg>
</div>
</div>
</div>
<div id="hyper-checkout-payment-footer"></div>
</div>
- <div id="hyper-checkout-cart" class="hidden">
+ <div id="hyper-checkout-cart" class="">
<div class="hyper-checkout-cart-header">
<svg
width="16"
@@ -616,49 +779,36 @@ S619.162,694.432,619.162,716.897z"
xmlns="http://www.w3.org/2000/svg"
class="cart-icon"
>
- <g clip-path="url(#clip0_11421_6708)">
- <mask
- id="mask0_11421_6708"
- style="mask-type: alpha"
- maskUnits="userSpaceOnUse"
- x="0"
- y="0"
- width="16"
- height="16"
- >
- <rect width="16" height="16" fill="#D9D9D9"></rect>
- </mask>
- <g mask="url(#mask0_11421_6708)">
- <path
- d="M3.53716 14.3331C3.20469 14.3331 2.92071 14.2153 2.68525 13.9798C2.44977 13.7444 2.33203 13.4604 2.33203 13.1279V5.53823C2.33203 5.20575 2.44977 4.92178 2.68525 4.68631C2.92071 4.45083 3.20469 4.3331 3.53716 4.3331H4.9987C4.9987 3.50063 5.29058 2.79252 5.87433 2.20876C6.4581 1.62501 7.16621 1.33313 7.99868 1.33313C8.83115 1.33313 9.53927 1.62501 10.123 2.20876C10.7068 2.79252 10.9987 3.50063 10.9987 4.3331H12.4602C12.7927 4.3331 13.0766 4.45083 13.3121 4.68631C13.5476 4.92178 13.6653 5.20575 13.6653 5.53823V13.1279C13.6653 13.4604 13.5476 13.7444 13.3121 13.9798C13.0766 14.2153 12.7927 14.3331 12.4602 14.3331H3.53716ZM3.53716 13.3331H12.4602C12.5115 13.3331 12.5585 13.3117 12.6012 13.269C12.644 13.2262 12.6653 13.1792 12.6653 13.1279V5.53823C12.6653 5.48694 12.644 5.43992 12.6012 5.39718C12.5585 5.35445 12.5115 5.33308 12.4602 5.33308H3.53716C3.48588 5.33308 3.43886 5.35445 3.39611 5.39718C3.35338 5.43992 3.33201 5.48694 3.33201 5.53823V13.1279C3.33201 13.1792 3.35338 13.2262 3.39611 13.269C3.43886 13.3117 3.48588 13.3331 3.53716 13.3331ZM7.99868 8.99973C8.83115 8.99973 9.53927 8.70785 10.123 8.1241C10.7068 7.54033 10.9987 6.83221 10.9987 5.99975H9.99868C9.99868 6.5553 9.80424 7.02752 9.41535 7.41641C9.02646 7.8053 8.55424 7.99975 7.99868 7.99975C7.44313 7.99975 6.9709 7.8053 6.58202 7.41641C6.19313 7.02752 5.99868 6.5553 5.99868 5.99975H4.9987C4.9987 6.83221 5.29058 7.54033 5.87433 8.1241C6.4581 8.70785 7.16621 8.99973 7.99868 8.99973ZM5.99868 4.3331H9.99868C9.99868 3.77754 9.80424 3.30532 9.41535 2.91643C9.02646 2.52754 8.55424 2.3331 7.99868 2.3331C7.44313 2.3331 6.9709 2.52754 6.58202 2.91643C6.19313 3.30532 5.99868 3.77754 5.99868 4.3331Z"
- fill="#333333"
- ></path>
- </g>
- </g>
- <defs>
- <clipPath id="clip0_11421_6708">
- <rect width="16" height="16" fill="white"></rect>
- </clipPath>
- </defs>
+ <use
+ xlink:href="#cart-icon-small"
+ x="0"
+ y="0"
+ width="16"
+ height="16"
+ />
</svg>
<span>Your Cart</span>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 50 50"
- width="25px"
- height="25px"
+ width="25"
+ height="25"
class="cart-close"
onclick="hideCartInMobileView()"
>
- <path
- d="M 9.15625 6.3125 L 6.3125 9.15625 L 22.15625 25 L 6.21875 40.96875 L 9.03125 43.78125 L 25 27.84375 L 40.9375 43.78125 L 43.78125 40.9375 L 27.84375 25 L 43.6875 9.15625 L 40.84375 6.3125 L 25 22.15625 Z"
- ></path>
+ <use
+ xlink:href="#cart-close"
+ x="0"
+ y="0"
+ width="50"
+ height="50"
+ />
</svg>
</div>
<div id="hyper-checkout-cart-items" class="hide-scrollbar"></div>
</div>
</div>
- <div class="hyper-checkout-sdk" id="hyper-checkout-sdk">
+ <div class="hyper-checkout-sdk hidden" id="hyper-checkout-sdk">
<div id="payment-form-wrap">
<form id="payment-form">
<div id="unified-checkout">
@@ -685,125 +835,28 @@ S619.162,694.432,619.162,716.897z"
<div id="payment-message" class="hidden"></div>
</form>
</div>
-
<div class="powered-by-hyper">
- <svg
- id="powerd-by-hyper"
- xmlns="http://www.w3.org/2000/svg"
- width="130"
- height="13"
- viewBox="0 0 130 13"
- fill="none"
- >
- <path
- opacity="0.2"
- d="M0.791016 11.7578H1.64062V9.16992H1.71875C2.00684 9.73145 2.63672 10.0928 3.35938 10.0928C4.69727 10.0928 5.56641 9.02344 5.56641 7.37305V7.36328C5.56641 5.72266 4.69238 4.64355 3.35938 4.64355C2.62695 4.64355 2.04102 4.99023 1.71875 5.57617H1.64062V4.73633H0.791016V11.7578ZM3.16406 9.34082C2.20703 9.34082 1.62109 8.58887 1.62109 7.37305V7.36328C1.62109 6.14746 2.20703 5.39551 3.16406 5.39551C4.12598 5.39551 4.69727 6.1377 4.69727 7.36328V7.37305C4.69727 8.59863 4.12598 9.34082 3.16406 9.34082ZM8.85762 10.0928C10.3566 10.0928 11.2844 9.05762 11.2844 7.37305V7.36328C11.2844 5.67383 10.3566 4.64355 8.85762 4.64355C7.35859 4.64355 6.43086 5.67383 6.43086 7.36328V7.37305C6.43086 9.05762 7.35859 10.0928 8.85762 10.0928ZM8.85762 9.34082C7.86152 9.34082 7.3 8.61328 7.3 7.37305V7.36328C7.3 6.11816 7.86152 5.39551 8.85762 5.39551C9.85371 5.39551 10.4152 6.11816 10.4152 7.36328V7.37305C10.4152 8.61328 9.85371 9.34082 8.85762 9.34082ZM13.223 10H14.0727L15.2445 5.92773H15.3227L16.4994 10H17.3539L18.8285 4.73633H17.9838L16.9486 8.94531H16.8705L15.6938 4.73633H14.8881L13.7113 8.94531H13.6332L12.598 4.73633H11.7484L13.223 10ZM21.7047 10.0928C22.9449 10.0928 23.6969 9.38965 23.8775 8.67676L23.8873 8.6377H23.0377L23.0182 8.68164C22.8766 8.99902 22.4371 9.33594 21.7242 9.33594C20.7867 9.33594 20.1861 8.70117 20.1617 7.6123H23.9508V7.28027C23.9508 5.70801 23.0816 4.64355 21.651 4.64355C20.2203 4.64355 19.2926 5.75684 19.2926 7.38281V7.3877C19.2926 9.03809 20.2008 10.0928 21.7047 10.0928ZM21.6461 5.40039C22.4225 5.40039 22.9986 5.89355 23.0865 6.93359H20.1764C20.2691 5.93262 20.8648 5.40039 21.6461 5.40039ZM25.0691 10H25.9188V6.73828C25.9188 5.9668 26.4949 5.4541 27.3055 5.4541C27.491 5.4541 27.6521 5.47363 27.8279 5.50293V4.67773C27.7449 4.66309 27.5643 4.64355 27.4031 4.64355C26.6902 4.64355 26.1971 4.96582 25.9969 5.51758H25.9188V4.73633H25.0691V10ZM30.6797 10.0928C31.9199 10.0928 32.6719 9.38965 32.8525 8.67676L32.8623 8.6377H32.0127L31.9932 8.68164C31.8516 8.99902 31.4121 9.33594 30.6992 9.33594C29.7617 9.33594 29.1611 8.70117 29.1367 7.6123H32.9258V7.28027C32.9258 5.70801 32.0566 4.64355 30.626 4.64355C29.1953 4.64355 28.2676 5.75684 28.2676 7.38281V7.3877C28.2676 9.03809 29.1758 10.0928 30.6797 10.0928ZM30.6211 5.40039C31.3975 5.40039 31.9736 5.89355 32.0615 6.93359H29.1514C29.2441 5.93262 29.8398 5.40039 30.6211 5.40039ZM35.9875 10.0928C36.7199 10.0928 37.3059 9.74609 37.6281 9.16016H37.7062V10H38.5559V2.64648H37.7062V5.56641H37.6281C37.34 5.00488 36.7102 4.64355 35.9875 4.64355C34.6496 4.64355 33.7805 5.71289 33.7805 7.36328V7.37305C33.7805 9.01367 34.6545 10.0928 35.9875 10.0928ZM36.1828 9.34082C35.2209 9.34082 34.6496 8.59863 34.6496 7.37305V7.36328C34.6496 6.1377 35.2209 5.39551 36.1828 5.39551C37.1398 5.39551 37.7258 6.14746 37.7258 7.36328V7.37305C37.7258 8.58887 37.1398 9.34082 36.1828 9.34082ZM45.2164 10.0928C46.5494 10.0928 47.4234 9.01367 47.4234 7.37305V7.36328C47.4234 5.71289 46.5543 4.64355 45.2164 4.64355C44.4938 4.64355 43.8639 5.00488 43.5758 5.56641H43.4977V2.64648H42.648V10H43.4977V9.16016H43.5758C43.898 9.74609 44.484 10.0928 45.2164 10.0928ZM45.0211 9.34082C44.0641 9.34082 43.4781 8.58887 43.4781 7.37305V7.36328C43.4781 6.14746 44.0641 5.39551 45.0211 5.39551C45.983 5.39551 46.5543 6.1377 46.5543 7.36328V7.37305C46.5543 8.59863 45.983 9.34082 45.0211 9.34082ZM48.7957 11.8457C49.7283 11.8457 50.1629 11.5039 50.5975 10.3223L52.6531 4.73633H51.7596L50.3191 9.06738H50.241L48.7957 4.73633H47.8875L49.8357 10.0049L49.7381 10.3174C49.5477 10.9229 49.2547 11.1426 48.7713 11.1426C48.6541 11.1426 48.5223 11.1377 48.4197 11.1182V11.8164C48.5369 11.8359 48.6834 11.8457 48.7957 11.8457Z"
- fill="currentColor"
- ></path>
- <g opacity="0.4">
- <path
- d="M78.42 6.9958C78.42 9.15638 77.085 10.4444 75.2379 10.4444C74.2164 10.4444 73.3269 10.0276 72.9206 9.33816V12.9166H71.4929V3.65235H72.8018L72.9193 4.66772C73.3256 3.97825 74.189 3.5225 75.2366 3.5225C77.017 3.5225 78.4186 4.75861 78.4186 6.9971L78.42 6.9958ZM76.94 6.9958C76.94 5.62985 76.1288 4.78328 74.9492 4.78328C73.8232 4.77029 72.9598 5.62855 72.9598 7.00878C72.9598 8.38901 73.8246 9.18235 74.9492 9.18235C76.0739 9.18235 76.94 8.36304 76.94 6.9958Z"
- fill="currentColor"
- ></path>
- <path
- d="M86.0132 7.3736H80.8809C80.9071 8.62268 81.7313 9.2732 82.7789 9.2732C83.564 9.2732 84.2197 8.90834 84.494 8.17992H85.9479C85.5939 9.53288 84.3895 10.4444 82.7528 10.4444C80.749 10.4444 79.4271 9.06545 79.4271 6.96978C79.4271 4.87412 80.749 3.50818 82.7397 3.50818C84.7305 3.50818 86.0132 4.83517 86.0132 6.83994V7.3736ZM80.894 6.38419H84.5594C84.481 5.226 83.709 4.6404 82.7397 4.6404C81.7705 4.6404 80.9985 5.226 80.894 6.38419Z"
- fill="currentColor"
- ></path>
- <path
- d="M88.5407 3.65204C87.8745 3.65204 87.335 4.18829 87.335 4.85048V10.3156H88.7758V5.22703C88.7758 5.06213 88.9104 4.92709 89.0776 4.92709H91.2773V3.65204H88.5407Z"
- fill="currentColor"
- ></path>
- <path
- d="M69.1899 3.63908L67.3442 9.17039L65.3535 3.65207H63.8082L66.3606 10.2247C66.439 10.4325 66.4782 10.6026 66.4782 10.7713C66.4782 10.8635 66.469 10.9479 66.4533 11.0258L66.4494 11.0401C66.4403 11.0817 66.4298 11.1206 66.4168 11.1583L66.3201 11.5102C66.2966 11.5971 66.2169 11.6569 66.1268 11.6569H64.0956V12.9189H65.5755C66.5709 12.9189 67.3952 12.6852 67.8667 11.3829L70.6817 3.65207L69.1886 3.63908H69.1899Z"
- fill="currentColor"
- ></path>
- <path
- d="M57 10.3144H58.4264V6.72299C58.4264 5.60375 59.0417 4.82339 60.1807 4.82339C61.1761 4.81041 61.7913 5.396 61.7913 6.68404V10.3144H63.2191V6.46201C63.2191 4.18457 61.8188 3.50809 60.5478 3.50809C59.5785 3.50809 58.8196 3.88593 58.4264 4.51047V0.919022H57V10.3144Z"
- fill="currentColor"
- ></path>
- <path
- d="M93.1623 8.29808C93.1753 8.98755 93.8167 9.39136 94.6945 9.39136C95.5723 9.39136 96.0948 9.06545 96.0948 8.47986C96.0948 7.97218 95.8336 7.69951 95.0733 7.58135L93.7253 7.34763C92.4164 7.1269 91.9057 6.44912 91.9057 5.49997C91.9057 4.30282 93.097 3.52246 94.6161 3.52246C96.2529 3.52246 97.4442 4.30282 97.4572 5.63111H96.0439C96.0308 4.95463 95.4417 4.57679 94.6174 4.57679C93.7932 4.57679 93.3347 4.90269 93.3347 5.44933C93.3347 5.93105 93.6756 6.15178 94.4215 6.28162L95.7434 6.51534C96.987 6.73607 97.563 7.34763 97.563 8.35002C97.563 9.72895 96.2803 10.4457 94.722 10.4457C92.9546 10.4457 91.7633 9.60041 91.7372 8.29808H93.1649H93.1623Z"
- fill="currentColor"
- ></path>
- <path
- d="M100.808 8.75352L102.327 3.652H103.82L105.313 8.75352L106.583 3.652H108.089L106.191 10.3155H104.58L103.061 5.23997L101.529 10.3155H99.9052L97.9941 3.652H99.5002L100.809 8.75352H100.808Z"
- fill="currentColor"
- ></path>
- <path
- d="M108.926 0.918945H110.511V2.40305H108.926V0.918945ZM109.005 3.65214H110.431V10.3157H109.005V3.65214Z"
- fill="currentColor"
- ></path>
- <path
- d="M119.504 4.7452C118.391 4.7452 117.632 5.55152 117.632 6.9707C117.632 8.46779 118.417 9.19621 119.465 9.19621C120.302 9.19621 120.919 8.72748 121.193 7.84325H122.712C122.371 9.45719 121.141 10.4466 119.491 10.4466C117.502 10.4466 116.165 9.06767 116.165 6.972C116.165 4.87634 117.5 3.51039 119.504 3.51039C121.141 3.51039 122.358 4.43487 122.712 6.04752H121.167C120.932 5.21523 120.289 4.7465 119.504 4.7465V4.7452Z"
- fill="currentColor"
- ></path>
- <path
- d="M113.959 9.05208C113.875 9.05208 113.809 8.98456 113.809 8.90276V4.91399H115.367V3.65191H113.809V1.86787H112.382V3.02607C112.382 3.44287 112.252 3.65062 111.833 3.65062H111.256V4.91269H112.382V8.50414C112.382 9.66234 113.024 10.3128 114.189 10.3128H115.354V9.05078H113.96L113.959 9.05208Z"
- fill="currentColor"
- ></path>
- <path
- d="M127.329 3.50801C126.359 3.50801 125.601 3.88585 125.207 4.5104V0.918945H123.781V10.3144H125.207V6.72292C125.207 5.60367 125.823 4.82332 126.962 4.82332C127.957 4.81033 128.572 5.39592 128.572 6.68397V10.3144H130V6.46193C130 4.18449 128.6 3.50801 127.329 3.50801Z"
- fill="currentColor"
- ></path>
- </g>
+ <svg class="fill-current" height="18" width="130" transform="">
+ <use
+ xlink:href="#hyperswitch-brand"
+ x="0"
+ y="0"
+ height="18"
+ width="130"
+ />
</svg>
</div>
</div>
</div>
<div id="hyper-footer" class="hidden">
- <svg class="fill-current" height="18px" width="130px" transform="">
- <path
- opacity="0.4"
- d="M0.791016 11.7578H1.64062V9.16992H1.71875C2.00684 9.73145 2.63672 10.0928 3.35938 10.0928C4.69727 10.0928 5.56641 9.02344 5.56641 7.37305V7.36328C5.56641 5.72266 4.69238 4.64355 3.35938 4.64355C2.62695 4.64355 2.04102 4.99023 1.71875 5.57617H1.64062V4.73633H0.791016V11.7578ZM3.16406 9.34082C2.20703 9.34082 1.62109 8.58887 1.62109 7.37305V7.36328C1.62109 6.14746 2.20703 5.39551 3.16406 5.39551C4.12598 5.39551 4.69727 6.1377 4.69727 7.36328V7.37305C4.69727 8.59863 4.12598 9.34082 3.16406 9.34082ZM8.85762 10.0928C10.3566 10.0928 11.2844 9.05762 11.2844 7.37305V7.36328C11.2844 5.67383 10.3566 4.64355 8.85762 4.64355C7.35859 4.64355 6.43086 5.67383 6.43086 7.36328V7.37305C6.43086 9.05762 7.35859 10.0928 8.85762 10.0928ZM8.85762 9.34082C7.86152 9.34082 7.3 8.61328 7.3 7.37305V7.36328C7.3 6.11816 7.86152 5.39551 8.85762 5.39551C9.85371 5.39551 10.4152 6.11816 10.4152 7.36328V7.37305C10.4152 8.61328 9.85371 9.34082 8.85762 9.34082ZM13.223 10H14.0727L15.2445 5.92773H15.3227L16.4994 10H17.3539L18.8285 4.73633H17.9838L16.9486 8.94531H16.8705L15.6938 4.73633H14.8881L13.7113 8.94531H13.6332L12.598 4.73633H11.7484L13.223 10ZM21.7047 10.0928C22.9449 10.0928 23.6969 9.38965 23.8775 8.67676L23.8873 8.6377H23.0377L23.0182 8.68164C22.8766 8.99902 22.4371 9.33594 21.7242 9.33594C20.7867 9.33594 20.1861 8.70117 20.1617 7.6123H23.9508V7.28027C23.9508 5.70801 23.0816 4.64355 21.651 4.64355C20.2203 4.64355 19.2926 5.75684 19.2926 7.38281V7.3877C19.2926 9.03809 20.2008 10.0928 21.7047 10.0928ZM21.6461 5.40039C22.4225 5.40039 22.9986 5.89355 23.0865 6.93359H20.1764C20.2691 5.93262 20.8648 5.40039 21.6461 5.40039ZM25.0691 10H25.9188V6.73828C25.9188 5.9668 26.4949 5.4541 27.3055 5.4541C27.491 5.4541 27.6521 5.47363 27.8279 5.50293V4.67773C27.7449 4.66309 27.5643 4.64355 27.4031 4.64355C26.6902 4.64355 26.1971 4.96582 25.9969 5.51758H25.9188V4.73633H25.0691V10ZM30.6797 10.0928C31.9199 10.0928 32.6719 9.38965 32.8525 8.67676L32.8623 8.6377H32.0127L31.9932 8.68164C31.8516 8.99902 31.4121 9.33594 30.6992 9.33594C29.7617 9.33594 29.1611 8.70117 29.1367 7.6123H32.9258V7.28027C32.9258 5.70801 32.0566 4.64355 30.626 4.64355C29.1953 4.64355 28.2676 5.75684 28.2676 7.38281V7.3877C28.2676 9.03809 29.1758 10.0928 30.6797 10.0928ZM30.6211 5.40039C31.3975 5.40039 31.9736 5.89355 32.0615 6.93359H29.1514C29.2441 5.93262 29.8398 5.40039 30.6211 5.40039ZM35.9875 10.0928C36.7199 10.0928 37.3059 9.74609 37.6281 9.16016H37.7062V10H38.5559V2.64648H37.7062V5.56641H37.6281C37.34 5.00488 36.7102 4.64355 35.9875 4.64355C34.6496 4.64355 33.7805 5.71289 33.7805 7.36328V7.37305C33.7805 9.01367 34.6545 10.0928 35.9875 10.0928ZM36.1828 9.34082C35.2209 9.34082 34.6496 8.59863 34.6496 7.37305V7.36328C34.6496 6.1377 35.2209 5.39551 36.1828 5.39551C37.1398 5.39551 37.7258 6.14746 37.7258 7.36328V7.37305C37.7258 8.58887 37.1398 9.34082 36.1828 9.34082ZM45.2164 10.0928C46.5494 10.0928 47.4234 9.01367 47.4234 7.37305V7.36328C47.4234 5.71289 46.5543 4.64355 45.2164 4.64355C44.4938 4.64355 43.8639 5.00488 43.5758 5.56641H43.4977V2.64648H42.648V10H43.4977V9.16016H43.5758C43.898 9.74609 44.484 10.0928 45.2164 10.0928ZM45.0211 9.34082C44.0641 9.34082 43.4781 8.58887 43.4781 7.37305V7.36328C43.4781 6.14746 44.0641 5.39551 45.0211 5.39551C45.983 5.39551 46.5543 6.1377 46.5543 7.36328V7.37305C46.5543 8.59863 45.983 9.34082 45.0211 9.34082ZM48.7957 11.8457C49.7283 11.8457 50.1629 11.5039 50.5975 10.3223L52.6531 4.73633H51.7596L50.3191 9.06738H50.241L48.7957 4.73633H47.8875L49.8357 10.0049L49.7381 10.3174C49.5477 10.9229 49.2547 11.1426 48.7713 11.1426C48.6541 11.1426 48.5223 11.1377 48.4197 11.1182V11.8164C48.5369 11.8359 48.6834 11.8457 48.7957 11.8457Z"
- fill="currentColor"
- ></path>
- <g opacity="0.6">
- <path
- d="M78.42 6.9958C78.42 9.15638 77.085 10.4444 75.2379 10.4444C74.2164 10.4444 73.3269 10.0276 72.9206 9.33816V12.9166H71.4929V3.65235H72.8018L72.9193 4.66772C73.3256 3.97825 74.189 3.5225 75.2366 3.5225C77.017 3.5225 78.4186 4.75861 78.4186 6.9971L78.42 6.9958ZM76.94 6.9958C76.94 5.62985 76.1288 4.78328 74.9492 4.78328C73.8232 4.77029 72.9598 5.62855 72.9598 7.00878C72.9598 8.38901 73.8246 9.18235 74.9492 9.18235C76.0739 9.18235 76.94 8.36304 76.94 6.9958Z"
- fill="currentColor"
- ></path>
- <path
- d="M86.0132 7.3736H80.8809C80.9071 8.62268 81.7313 9.2732 82.7789 9.2732C83.564 9.2732 84.2197 8.90834 84.494 8.17992H85.9479C85.5939 9.53288 84.3895 10.4444 82.7528 10.4444C80.749 10.4444 79.4271 9.06545 79.4271 6.96978C79.4271 4.87412 80.749 3.50818 82.7397 3.50818C84.7305 3.50818 86.0132 4.83517 86.0132 6.83994V7.3736ZM80.894 6.38419H84.5594C84.481 5.226 83.709 4.6404 82.7397 4.6404C81.7705 4.6404 80.9985 5.226 80.894 6.38419Z"
- fill="currentColor"
- ></path>
- <path
- d="M88.5407 3.65204C87.8745 3.65204 87.335 4.18829 87.335 4.85048V10.3156H88.7758V5.22703C88.7758 5.06213 88.9104 4.92709 89.0776 4.92709H91.2773V3.65204H88.5407Z"
- fill="currentColor"
- ></path>
- -
- <path
- d="M69.1899 3.63908L67.3442 9.17039L65.3535 3.65207H63.8082L66.3606 10.2247C66.439 10.4325 66.4782 10.6026 66.4782 10.7713C66.4782 10.8635 66.469 10.9479 66.4533 11.0258L66.4494 11.0401C66.4403 11.0817 66.4298 11.1206 66.4168 11.1583L66.3201 11.5102C66.2966 11.5971 66.2169 11.6569 66.1268 11.6569H64.0956V12.9189H65.5755C66.5709 12.9189 67.3952 12.6852 67.8667 11.3829L70.6817 3.65207L69.1886 3.63908H69.1899Z"
- fill="currentColor"
- ></path>
- <path
- d="M57 10.3144H58.4264V6.72299C58.4264 5.60375 59.0417 4.82339 60.1807 4.82339C61.1761 4.81041 61.7913 5.396 61.7913 6.68404V10.3144H63.2191V6.46201C63.2191 4.18457 61.8188 3.50809 60.5478 3.50809C59.5785 3.50809 58.8196 3.88593 58.4264 4.51047V0.919022H57V10.3144Z"
- fill="currentColor"
- ></path>
- <path
- d="M93.1623 8.29808C93.1753 8.98755 93.8167 9.39136 94.6945 9.39136C95.5723 9.39136 96.0948 9.06545 96.0948 8.47986C96.0948 7.97218 95.8336 7.69951 95.0733 7.58135L93.7253 7.34763C92.4164 7.1269 91.9057 6.44912 91.9057 5.49997C91.9057 4.30282 93.097 3.52246 94.6161 3.52246C96.2529 3.52246 97.4442 4.30282 97.4572 5.63111H96.0439C96.0308 4.95463 95.4417 4.57679 94.6174 4.57679C93.7932 4.57679 93.3347 4.90269 93.3347 5.44933C93.3347 5.93105 93.6756 6.15178 94.4215 6.28162L95.7434 6.51534C96.987 6.73607 97.563 7.34763 97.563 8.35002C97.563 9.72895 96.2803 10.4457 94.722 10.4457C92.9546 10.4457 91.7633 9.60041 91.7372 8.29808H93.1649H93.1623Z"
- fill="currentColor"
- ></path>
- <path
- d="M100.808 8.75352L102.327 3.652H103.82L105.313 8.75352L106.583 3.652H108.089L106.191 10.3155H104.58L103.061 5.23997L101.529 10.3155H99.9052L97.9941 3.652H99.5002L100.809 8.75352H100.808Z"
- fill="currentColor"
- ></path>
- <path
- d="M108.926 0.918945H110.511V2.40305H108.926V0.918945ZM109.005 3.65214H110.431V10.3157H109.005V3.65214Z"
- fill="currentColor"
- ></path>
- <path
- d="M119.504 4.7452C118.391 4.7452 117.632 5.55152 117.632 6.9707C117.632 8.46779 118.417 9.19621 119.465 9.19621C120.302 9.19621 120.919 8.72748 121.193 7.84325H122.712C122.371 9.45719 121.141 10.4466 119.491 10.4466C117.502 10.4466 116.165 9.06767 116.165 6.972C116.165 4.87634 117.5 3.51039 119.504 3.51039C121.141 3.51039 122.358 4.43487 122.712 6.04752H121.167C120.932 5.21523 120.289 4.7465 119.504 4.7465V4.7452Z"
- fill="currentColor"
- ></path>
- <path
- d="M113.959 9.05208C113.875 9.05208 113.809 8.98456 113.809 8.90276V4.91399H115.367V3.65191H113.809V1.86787H112.382V3.02607C112.382 3.44287 112.252 3.65062 111.833 3.65062H111.256V4.91269H112.382V8.50414C112.382 9.66234 113.024 10.3128 114.189 10.3128H115.354V9.05078H113.96L113.959 9.05208Z"
- fill="currentColor"
- ></path>
- <path
- d="M127.329 3.50801C126.359 3.50801 125.601 3.88585 125.207 4.5104V0.918945H123.781V10.3144H125.207V6.72292C125.207 5.60367 125.823 4.82332 126.962 4.82332C127.957 4.81033 128.572 5.39592 128.572 6.68397V10.3144H130V6.46193C130 4.18449 128.6 3.50801 127.329 3.50801Z"
- fill="currentColor"
- ></path>
- </g>
+ <svg class="fill-current" height="18" width="130" transform="">
+ <use
+ xlink:href="#hyperswitch-brand"
+ x="0"
+ y="0"
+ height="18"
+ width="130"
+ />
</svg>
</div>
@@ -817,15 +870,22 @@ S619.162,694.432,619.162,716.897z"
};
var widgets = null;
+ var unifiedCheckout = null;
const pub_key = window.__PAYMENT_DETAILS.pub_key;
const hyper = Hyper(pub_key);
+ function mountUnifiedCheckout(id) {
+ if (unifiedCheckout !== null) {
+ unifiedCheckout.mount(id);
+ }
+ }
+
async function initialize() {
const paymentDetails = window.__PAYMENT_DETAILS;
var client_secret = paymentDetails.client_secret;
const appearance = {
variables: {
- colorPrimary: paymentDetails.sdk_theme,
+ colorPrimary: paymentDetails.sdk_theme || "rgb(0, 109, 249)",
fontFamily: "Work Sans, sans-serif",
fontSizeBase: "16px",
colorText: "rgb(51, 65, 85)",
@@ -856,11 +916,8 @@ S619.162,694.432,619.162,716.897z"
},
};
- const unifiedCheckout = widgets.create(
- "payment",
- unifiedCheckoutOptions
- );
- unifiedCheckout.mount("#unified-checkout");
+ unifiedCheckout = widgets.create("payment", unifiedCheckoutOptions);
+ mountUnifiedCheckout("#unified-checkout");
// Handle button press callback
var paymentElement = widgets.getElement("payment");
@@ -890,6 +947,9 @@ S619.162,694.432,619.162,716.897z"
} else {
showMessage("An unexpected error occurred.");
}
+
+ // Re-initialize SDK
+ mountUnifiedCheckout("#unified-checkout");
} else {
const { paymentIntent } = await hyper.retrievePaymentIntent(
paymentDetails.client_secret
@@ -906,13 +966,19 @@ S619.162,694.432,619.162,716.897z"
// Fetches the payment status after payment submission
async function checkStatus() {
- const clientSecret = new URLSearchParams(window.location.search).get(
- "payment_intent_client_secret"
- );
+ const paymentDetails = window.__PAYMENT_DETAILS;
const res = {
showSdk: true,
};
+ let clientSecret = new URLSearchParams(window.location.search).get(
+ "payment_intent_client_secret"
+ );
+
+ if (!clientSecret) {
+ clientSecret = paymentDetails.client_secret;
+ }
+
if (!clientSecret) {
return res;
}
@@ -921,7 +987,10 @@ S619.162,694.432,619.162,716.897z"
clientSecret
);
- if (!paymentIntent || !paymentIntent.status) {
+ if (
+ !paymentIntent ||
+ paymentIntent.status === "requires_confirmation"
+ ) {
return res;
}
@@ -950,101 +1019,68 @@ S619.162,694.432,619.162,716.897z"
show("#payment-message");
addText("#payment-message", msg);
}
+
function showStatus(paymentDetails) {
const status = paymentDetails.status;
let statusDetails = {
imageSource: "",
- message: "",
+ message: null,
status: status,
amountText: "",
items: [],
};
+ // Payment details
+ var paymentId = createItem("Ref Id", paymentDetails.payment_id);
+ // @ts-ignore
+ statusDetails.items.push(paymentId);
+
+ // Status specific information
switch (status) {
case "succeeded":
- statusDetails.imageSource =
- "http://www.clipartbest.com/cliparts/4ib/oRa/4iboRa7RT.png";
- statusDetails.message = "Payment successful";
- statusDetails.status = "Succeeded";
+ statusDetails.imageSource = "https://i.imgur.com/5BOmYVl.img";
+ statusDetails.message =
+ "We have successfully received your payment";
+ statusDetails.status = "Paid successfully";
statusDetails.amountText = new Date(
paymentDetails.created
).toTimeString();
-
- // Payment details
- var amountNode = createItem(
- "AMOUNT PAID",
- paymentDetails.currency + " " + paymentDetails.amount
- );
- var paymentId = createItem("PAYMENT ID", paymentDetails.payment_id);
- // @ts-ignore
- statusDetails.items.push(amountNode, paymentId);
break;
case "processing":
- statusDetails.imageSource =
- "http://www.clipartbest.com/cliparts/4ib/oRa/4iboRa7RT.png";
- statusDetails.message = "Payment in progress";
- statusDetails.status = "Processing";
- // Payment details
- var amountNode = createItem(
- "AMOUNT PAID",
- paymentDetails.currency + " " + paymentDetails.amount
- );
- var paymentId = createItem("PAYMENT ID", paymentDetails.payment_id);
- // @ts-ignore
- statusDetails.items.push(amountNode, paymentId);
+ statusDetails.imageSource = "https://i.imgur.com/Yb79Qt4.png";
+ statusDetails.message =
+ "Sorry! Your payment is taking longer than expected. Please check back again in sometime.";
+ statusDetails.status = "Payment Pending";
break;
case "failed":
- statusDetails.imageSource = "";
- statusDetails.message = "Payment failed";
- statusDetails.status = "Failed";
- // Payment details
- var amountNode = createItem(
- "AMOUNT PAID",
- paymentDetails.currency + " " + paymentDetails.amount
+ statusDetails.imageSource = "https://i.imgur.com/UD8CEuY.png";
+ statusDetails.status = "Payment Failed!";
+ var errorCodeNode = createItem(
+ "Error code",
+ paymentDetails.error_code
+ );
+ var errorMessageNode = createItem(
+ "Error message",
+ paymentDetails.error_message
);
- var paymentId = createItem("PAYMENT ID", paymentDetails.payment_id);
// @ts-ignore
- statusDetails.items.push(amountNode, paymentId);
+ statusDetails.items.push(errorMessageNode, errorCodeNode);
break;
case "cancelled":
- statusDetails.imageSource = "";
- statusDetails.message = "Payment cancelled";
- statusDetails.status = "Cancelled";
- // Payment details
- var amountNode = createItem(
- "AMOUNT PAID",
- paymentDetails.currency + " " + paymentDetails.amount
- );
- var paymentId = createItem("PAYMENT ID", paymentDetails.payment_id);
- // @ts-ignore
- statusDetails.items.push(amountNode, paymentId);
+ statusDetails.imageSource = "https://i.imgur.com/UD8CEuY.png";
+ statusDetails.status = "Payment Cancelled";
break;
case "requires_merchant_action":
- statusDetails.imageSource = "";
- statusDetails.message = "Payment under review";
- statusDetails.status = "Under review";
- // Payment details
- var amountNode = createItem(
- "AMOUNT PAID",
- paymentDetails.currency + " " + paymentDetails.amount
- );
- var paymentId = createItem("PAYMENT ID", paymentDetails.payment_id);
- var paymentId = createItem(
- "MESSAGE",
- "Your payment is under review by the merchant."
- );
- // @ts-ignore
- statusDetails.items.push(amountNode, paymentId);
+ statusDetails.imageSource = "https://i.imgur.com/Yb79Qt4.png";
+ statusDetails.status = "Payment under review";
break;
default:
- statusDetails.imageSource =
- "http://www.clipartbest.com/cliparts/4ib/oRa/4iboRa7RT.png";
- statusDetails.message = "Something went wrong";
+ statusDetails.imageSource = "https://i.imgur.com/UD8CEuY.png";
statusDetails.status = "Something went wrong";
// Error details
if (typeof paymentDetails.error === "object") {
@@ -1062,36 +1098,52 @@ S619.162,694.432,619.162,716.897z"
break;
}
- // Append status
- var statusTextNode = document.getElementById("status-text");
- if (statusTextNode !== null) {
- statusTextNode.innerText = statusDetails.message;
- }
-
- // Append image
- var statusImageNode = document.getElementById("status-img");
- if (statusImageNode !== null) {
- statusImageNode.src = statusDetails.imageSource;
- }
-
- // Append status details
- var statusDateNode = document.getElementById("status-date");
- if (statusDateNode !== null) {
- statusDateNode.innerText = statusDetails.amountText;
- }
+ // Form header items
+ var amountNode = document.createElement("div");
+ amountNode.className = "hyper-checkout-status-amount";
+ amountNode.innerText =
+ paymentDetails.currency + " " + paymentDetails.amount;
+ var merchantLogoNode = document.createElement("img");
+ merchantLogoNode.className = "hyper-checkout-status-merchant-logo";
+ merchantLogoNode.src = "";
+ merchantLogoNode.alt = "";
+
+ // Form content items
+ var statusImageNode = document.createElement("img");
+ statusImageNode.className = "hyper-checkout-status-image";
+ statusImageNode.src = statusDetails.imageSource;
+ var statusTextNode = document.createElement("div");
+ statusTextNode.className = "hyper-checkout-status-text";
+ statusTextNode.innerText = statusDetails.status;
+ var statusMessageNode = document.createElement("div");
+ statusMessageNode.className = "hyper-checkout-status-message";
+ statusMessageNode.innerText = statusDetails.message;
+ var statusDetailsNode = document.createElement("div");
+ statusDetailsNode.className = "hyper-checkout-status-details";
// Append items
- var statusItemNode = document.getElementById(
- "hyper-checkout-status-items"
+ statusDetails.items.map((item) => statusDetailsNode?.append(item));
+ const statusHeaderNode = document.getElementById(
+ "hyper-checkout-status-header"
);
- if (statusItemNode !== null) {
- statusDetails.items.map((item) => statusItemNode?.append(item));
+ if (statusHeaderNode !== null) {
+ statusHeaderNode.append(amountNode, merchantLogoNode);
+ }
+ const statusContentNode = document.getElementById(
+ "hyper-checkout-status-content"
+ );
+ if (statusContentNode !== null) {
+ statusContentNode.append(statusImageNode, statusTextNode);
+ if (statusDetails.message !== null) {
+ statusContentNode.append(statusMessageNode);
+ }
+ statusContentNode.append(statusDetailsNode);
}
}
function createItem(heading, value) {
var itemNode = document.createElement("div");
- itemNode.className = "hyper-checkout-item";
+ itemNode.className = "hyper-checkout-status-item";
var headerNode = document.createElement("div");
headerNode.className = "hyper-checkout-item-header";
headerNode.innerText = heading;
@@ -1238,8 +1290,7 @@ S619.162,694.432,619.162,716.897z"
// Product price
var priceNode = document.createElement("div");
priceNode.className = "hyper-checkout-card-item-price";
- priceNode.innerText =
- paymentDetails.currency + " " + item.amount;
+ priceNode.innerText = paymentDetails.currency + " " + item.amount;
// Append items
nameAndQuantityWrapperNode.append(productNameNode, quantityNode);
itemWrapperNode.append(
@@ -1336,16 +1387,6 @@ S619.162,694.432,619.162,716.897z"
show("#hyper-checkout-cart");
}
- function hideCartInMobileView() {
- window.history.back();
- hide("#hyper-checkout-cart");
- }
-
- function viewCartInMobileView() {
- show("#hyper-checkout-cart");
- window.history.pushState("view-cart", "");
- }
-
function renderSDKHeader() {
const paymentDetails = window.__PAYMENT_DETAILS;
@@ -1389,6 +1430,8 @@ S619.162,694.432,619.162,716.897z"
show("#hyper-checkout-sdk");
show("#hyper-checkout-details");
} else {
+ hide("#hyper-checkout-sdk");
+ hide("#hyper-checkout-details");
show("#hyper-checkout-status");
show("#hyper-footer");
}