Compare commits

...

11 Commits

Author SHA1 Message Date
fea84cc50e Added Icons to WC plugin checkout page 2025-10-25 13:19:29 +02:00
462cb0127a Updated .gitignore 2025-10-18 17:34:54 +02:00
fe769ebb35 Added logo for second domain 2025-10-18 17:34:23 +02:00
be4037d93a Set ordered item name to only show Order ID 2025-10-13 20:07:54 +02:00
a92b8021f6 Success text showing only on processing orders 2025-10-12 01:33:20 +02:00
b997e14fe6 Added text for failed and successful orders 2025-10-12 01:18:26 +02:00
ee1ce09508 Fixed order total mismatch issue on cancelled page
Fixed token validation issue
Fixed issue displaying shipping method and fee on checkout
Added Light only theme
Fixed positioning issue on mobile view
2025-10-12 00:45:36 +02:00
5df46cba7e Added customer's billing and shipping data to paypal checkout fields 2025-10-06 21:41:22 +02:00
be64c0484e Replaced Favicon 2025-09-30 20:53:27 +02:00
4b277d0df9 Replaced Favicon 2025-09-30 20:41:38 +02:00
58f8986c0c Added Docker support 2025-09-30 20:29:34 +02:00
23 changed files with 602 additions and 69 deletions

11
.gitignore vendored
View File

@@ -1,7 +1,16 @@
node_modules node_modules
backend/.env backend/.env
backend/node_modules backend/node_modules
backend/DockerFile
backend/.dockerignore
frontend/.env frontend/.env
frontend/node_modules frontend/node_modules
frontend/dist frontend/dist
frontend/dist-ssr frontend/dist-ssr
frontend/.env.production
frontend/DockerFile
frontend/nginx.conf
frontend/.dockerignore
docker-compose.yml
aluxpay-payment-gateway.zip
.env

View File

@@ -4,7 +4,7 @@ Tags: woocommerce, payment, paypal, gateway
Requires at least: 5.8 Requires at least: 5.8
Tested up to: 6.3 Tested up to: 6.3
Requires PHP: 7.4 Requires PHP: 7.4
Stable tag: 1.0.0 Stable tag: 1.1.0
License: GPLv2 or later License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -103,6 +103,10 @@ The plugin automatically handles returns from your payment website. Your payment
== Changelog == == Changelog ==
= 1.1.0 =
* Added Text for Success and Failed orders
*
= 1.0.0 = = 1.0.0 =
* Initial release * Initial release
* Basic payment gateway functionality * Basic payment gateway functionality

View File

@@ -3,7 +3,7 @@
* Plugin Name: AluxPay Payment Gateway * Plugin Name: AluxPay Payment Gateway
* Plugin URI: https://affordableluxurybags.is * Plugin URI: https://affordableluxurybags.is
* Description: AluxPay payment gateway that redirects to standalone payment website with PayPal integration * Description: AluxPay payment gateway that redirects to standalone payment website with PayPal integration
* Version: 1.0.0 * Version: 1.1.0
* Author: ALUXB * Author: ALUXB
* Author URI: https://affordableluxurybags.is * Author URI: https://affordableluxurybags.is
* Text Domain: aluxpay-payment-gateway * Text Domain: aluxpay-payment-gateway
@@ -18,6 +18,11 @@ if (!defined('ABSPATH')) {
exit; // Exit if accessed directly exit; // Exit if accessed directly
} }
// Define plugin constants
define('ALUXPAY_PLUGIN_FILE', __FILE__);
define('ALUXPAY_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('ALUXPAY_PLUGIN_URL', plugin_dir_url(__FILE__));
// Declare HPOS compatibility // Declare HPOS compatibility
add_action('before_woocommerce_init', function() { add_action('before_woocommerce_init', function() {
if (class_exists(\Automattic\WooCommerce\Utilities\FeaturesUtil::class)) { if (class_exists(\Automattic\WooCommerce\Utilities\FeaturesUtil::class)) {
@@ -25,8 +30,26 @@ add_action('before_woocommerce_init', function() {
} }
}); });
// Include the gateway class
add_action('plugins_loaded', 'aluxpay_init_gateway');
function aluxpay_init_gateway() {
if (!class_exists('WC_Payment_Gateway')) {
return;
}
require_once ALUXPAY_PLUGIN_DIR . 'includes/class-aluxpay-payment-gateway.php';
add_filter('woocommerce_payment_gateways', 'aluxpay_add_gateway');
}
function aluxpay_add_gateway($gateways) {
$gateways[] = 'WC_AluxPay_Payment_Gateway';
return $gateways;
}
// Define plugin constants // Define plugin constants
define('CPG_VERSION', '1.0.0'); define('CPG_VERSION', '1.1.0');
define('CPG_PLUGIN_DIR', plugin_dir_path(__FILE__)); define('CPG_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('CPG_PLUGIN_URL', plugin_dir_url(__FILE__)); define('CPG_PLUGIN_URL', plugin_dir_url(__FILE__));

View File

@@ -0,0 +1,34 @@
/* Force payment method label to be column layout */
.wc_payment_methods .payment_method_aluxpay_payment_gateway label {
display: flex !important;
flex-direction: column !important;
align-items: flex-start !important;
}
/* Icons container styling */
.aluxpay-payment-icons {
display: inline-flex !important;
align-items: center !important;
gap: 6px;
margin-top: 8px !important;
margin-left: 0 !important;
white-space: nowrap;
}
.aluxpay-payment-icons img {
display: inline-block !important;
height: 24px !important;
width: auto !important;
max-width: none !important;
vertical-align: middle !important;
margin: 0 3px !important;
border: none !important;
box-shadow: none !important;
}
/* Responsive adjustments */
@media (max-width: 768px) {
.aluxpay-payment-icons img {
height: 20px !important;
}
}

View File

@@ -0,0 +1,4 @@
<svg width="120" height="80" version="1.1" viewBox="0 0 120 80" xmlns="http://www.w3.org/2000/svg">
<rect x="40" width="80" height="80" rx="4" fill="#fff" fill-rule="evenodd" />
<path d="m120 76v-8.6763h-9.651l-4.969-5.4944-4.994 5.4944h-31.822v-25.607h-10.27l12.74-28.831h12.286l4.3857 9.877v-9.877h15.208l2.64 7.4429 2.658-7.4429h11.789v-8.8854c0-2.2091-1.7909-4-4-4h-112c-2.2091 4.4409e-16 -4 1.7909-4 4v72c4.4409e-16 2.2091 1.7909 4 4 4h112c2.2091 0 4-1.7909 4-4zm-8.026-11.882h8.026l-10.616-11.258 10.616-11.13h-7.898l-6.556 7.1645-6.4935-7.1645h-8.0275l10.554 11.194-10.554 11.194h7.8041l6.5889-7.2283 6.556 7.2283zm1.878-11.249 6.148 6.5406v-13.027l-6.148 6.4861zm-35.78 6.0675v-3.4864h12.633v-5.0534h-12.633v-3.4859h12.953l5e-4 -5.1815h-19.062v22.388h19.062l-5e-4 -5.1813h-12.953zm35.883-20.456h6.045v-22.388h-9.403l-5.022 13.944-4.989-13.944h-9.5631v22.388h6.0446v-15.672l5.7575 15.672h5.373l5.757-15.704v15.704zm-29.809 0h6.8765l-9.8824-22.388h-7.8682l-9.8833 22.388h6.7166l1.8554-4.4776h10.298l1.887 4.4776zm-3.9976-9.4992h-6.0773l3.0387-7.3242 3.0386 7.3242z" fill="#0690FF"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,22 @@
<svg width="120" height="80" viewBox="0 0 120 80" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="120" height="80" rx="4" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M29 80H116.002C118.21 80 120 78.211 120 75.9957V48C120 48 87.8616 70.1063 29 80Z" fill="#E7792B"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M113.088 33.8624C113.088 30.7125 110.888 28.8951 107.053 28.8951H102.12V45.7197H105.443V38.9609H105.877L110.481 45.7197H114.571L109.202 38.6314C111.708 38.129 113.088 36.4383 113.088 33.8624ZM106.414 36.6411H105.443V31.5451H106.467C108.538 31.5451 109.665 32.4018 109.665 34.0385C109.665 35.7305 108.538 36.6411 106.414 36.6411Z" fill="#1A1918"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M90.4839 45.7197H99.9176V42.8713H93.8077V38.3298H99.6923V35.4802H93.8077V31.746H99.9176V28.8951H90.4839V45.7197Z" fill="#1A1918"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M80.7677 40.1959L76.2205 28.8951H72.5864L79.8236 46.1512H81.613L88.9799 28.8951H85.3742L80.7677 40.1959Z" fill="#1A1918"/>
<path d="M64.6178 46.7197C69.7118 46.7197 73.8414 42.6454 73.8414 37.6197C73.8414 32.5939 69.7118 28.5197 64.6178 28.5197C59.5238 28.5197 55.3943 32.5939 55.3943 37.6197C55.3943 42.6454 59.5238 46.7197 64.6178 46.7197Z" fill="url(#paint0_radial_823_341)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M41.2231 37.3191C41.2231 42.2643 45.159 46.0986 50.224 46.0986C51.6556 46.0986 52.8817 45.8211 54.3943 45.1184V41.2555C53.0642 42.5685 51.8869 43.0982 50.3788 43.0982C47.0287 43.0982 44.651 40.7017 44.651 37.2944C44.651 34.0645 47.1038 31.5165 50.224 31.5165C51.8104 31.5165 53.0115 32.0749 54.3943 33.4093V29.5483C52.9344 28.8177 51.7334 28.5148 50.3024 28.5148C45.2631 28.5148 41.2231 32.4272 41.2231 37.3191Z" fill="#1A1918"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M35.2687 35.3515C33.2725 34.6229 32.6868 34.1419 32.6868 33.2332C32.6868 32.173 33.731 31.3683 35.1646 31.3683C36.1614 31.3683 36.9803 31.772 37.8467 32.7307L39.5873 30.4824C38.157 29.248 36.446 28.6169 34.5763 28.6169C31.5589 28.6169 29.2576 30.6839 29.2576 33.4379C29.2576 35.7558 30.3295 36.9421 33.453 38.0516C34.7555 38.5047 35.4182 38.8063 35.7529 39.0097C36.417 39.4381 36.7497 40.0439 36.7497 40.7504C36.7497 42.1135 35.6515 43.1236 34.1671 43.1236C32.5807 43.1236 31.3032 42.341 30.537 40.8798L28.3879 42.9214C29.9204 45.1405 31.7611 46.124 34.2923 46.124C37.7485 46.124 40.1736 43.8568 40.1736 40.5996C40.1736 37.9268 39.0523 36.7165 35.2687 35.3515Z" fill="#1A1918"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.8091 28.8951H27.1355V45.7197H23.8091V28.8951Z" fill="#1A1918"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.1242 28.8951H8.2417V45.7197H13.0985C15.6811 45.7197 17.5456 45.1184 19.1828 43.7775C21.1283 42.1889 22.2786 39.7949 22.2786 37.319C22.2786 32.3537 18.5187 28.8951 13.1242 28.8951ZM17.01 41.5336C15.9644 42.4651 14.6073 42.8713 12.4582 42.8713H11.5655V31.746H12.4582C14.6073 31.746 15.9111 32.1249 17.01 33.1064C18.1603 34.1171 18.8521 35.683 18.8521 37.2943C18.8521 38.9096 18.1603 40.5235 17.01 41.5336Z" fill="#1A1918"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M115.21 29.5275C115.21 29.233 115.005 29.0712 114.643 29.0712H114.162V30.5499H114.52V29.9766L114.939 30.5499H115.376L114.883 29.9402C115.094 29.8843 115.21 29.7329 115.21 29.5275ZM114.58 29.7296H114.52V29.3429H114.584C114.761 29.3429 114.853 29.4059 114.853 29.5327C114.853 29.664 114.76 29.7296 114.58 29.7296Z" fill="#1A1918"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M114.715 28.5187C113.987 28.5187 113.41 29.092 113.41 29.8077C113.41 30.5233 113.994 31.0973 114.715 31.0973C115.424 31.0973 116.005 30.5175 116.005 29.8077C116.005 29.1018 115.424 28.5187 114.715 28.5187ZM114.71 30.8672C114.138 30.8672 113.669 30.3966 113.669 29.8096C113.669 29.2207 114.132 28.7508 114.71 28.7508C115.28 28.7508 115.745 29.2318 115.745 29.8096C115.745 30.3914 115.28 30.8672 114.71 30.8672Z" fill="#1A1918"/>
<defs>
<radialGradient id="paint0_radial_823_341" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(71.5 44) rotate(-142.431) scale(16.4012 16.1816)">
<stop stop-color="#F59900"/>
<stop offset="0.210082" stop-color="#F39501"/>
<stop offset="0.908163" stop-color="#CE3C0B"/>
<stop offset="1" stop-color="#A4420A"/>
</radialGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,9 @@
<svg width="120" height="80" viewBox="0 0 120 80" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="120" height="80" rx="4" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M97.5288 48.1562V47.2384H97.289L97.0137 47.8698L96.7378 47.2384H96.498V48.1562H96.6675V47.4637L96.9257 48.0609H97.1011L97.36 47.4624V48.1562H97.5288ZM96.0111 48.1562V47.3947H96.318V47.2397H95.5361V47.3947H95.843V48.1562H96.0111Z" fill="#F79E1B"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M49.6521 52.095H70.3479V14.9044H49.6521V52.095Z" fill="#FF5F00"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M98.2675 33.5003C98.2675 46.563 87.6791 57.152 74.6171 57.152C69.0996 57.152 64.0229 55.2624 60 52.0956C65.5011 47.7646 69.0339 41.0448 69.0339 33.5003C69.0339 25.9552 65.5011 19.2354 60 14.9044C64.0229 11.7376 69.0996 9.84802 74.6171 9.84802C87.6791 9.84802 98.2675 20.437 98.2675 33.5003Z" fill="#F79E1B"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M50.966 33.5003C50.966 25.9552 54.4988 19.2354 59.9999 14.9044C55.977 11.7376 50.9003 9.84802 45.3828 9.84802C32.3208 9.84802 21.7324 20.437 21.7324 33.5003C21.7324 46.563 32.3208 57.152 45.3828 57.152C50.9003 57.152 55.977 55.2624 59.9999 52.0956C54.4988 47.7646 50.966 41.0448 50.966 33.5003Z" fill="#EB001B"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M34.9203 69.7951V65.9251C34.9203 64.4415 34.0233 63.474 32.4855 63.474C31.7165 63.474 30.8836 63.732 30.3069 64.5705C29.8583 63.861 29.2176 63.474 28.2564 63.474C27.6157 63.474 26.9749 63.6675 26.4623 64.377V63.603H25.1167V69.7951H26.4623V66.3766C26.4623 65.28 27.039 64.764 27.936 64.764C28.8331 64.764 29.2816 65.3445 29.2816 66.3766V69.7951H30.6272V66.3766C30.6272 65.28 31.268 64.764 32.101 64.764C32.9981 64.764 33.4466 65.3445 33.4466 66.3766V69.7951H34.9203ZM54.848 63.6034H52.6694V61.7325H51.3238V63.6034H50.1064V64.8292H51.3238V67.6679C51.3238 69.0872 51.9005 69.9259 53.4384 69.9259C54.015 69.9259 54.6558 69.7324 55.1043 69.4743L54.7199 68.313C54.3354 68.5711 53.8869 68.6356 53.5665 68.6356C52.9257 68.6356 52.6694 68.2485 52.6694 67.6034V64.8292H54.848V63.6034ZM66.2536 63.474C65.4847 63.474 64.9721 63.861 64.6517 64.377V63.603H63.3061V69.7951H64.6517V66.3121C64.6517 65.28 65.1002 64.6995 65.9332 64.6995C66.1895 64.6995 66.5099 64.764 66.7662 64.8285L67.1506 63.5385C66.8943 63.474 66.5099 63.474 66.2536 63.474ZM49.0171 64.119C48.3763 63.6675 47.4793 63.474 46.5181 63.474C44.9803 63.474 43.9551 64.248 43.9551 65.4735C43.9551 66.5056 44.724 67.0861 46.0696 67.2796L46.7104 67.3441C47.4152 67.4731 47.7997 67.6666 47.7997 67.9891C47.7997 68.4406 47.287 68.7631 46.39 68.7631C45.4929 68.7631 44.7881 68.4406 44.3395 68.1181L43.6988 69.1501C44.4036 69.6661 45.3648 69.9241 46.3259 69.9241C48.12 69.9241 49.1453 69.0856 49.1453 67.9246C49.1453 66.8281 48.3123 66.2476 47.0307 66.0541L46.39 65.9896C45.8133 65.9251 45.3648 65.7961 45.3648 65.409C45.3648 64.9575 45.8133 64.6995 46.5181 64.6995C47.287 64.6995 48.056 65.022 48.4404 65.2155L49.0171 64.119ZM84.7716 63.474C84.0027 63.474 83.4901 63.861 83.1697 64.377V63.603H81.8241V69.7951H83.1697V66.3121C83.1697 65.28 83.6182 64.6995 84.4512 64.6995C84.7075 64.6995 85.0279 64.764 85.2842 64.8285L85.6686 63.5385C85.4123 63.474 85.0279 63.474 84.7716 63.474ZM67.5992 66.6991C67.5992 68.5696 68.8807 69.9241 70.8671 69.9241C71.7641 69.9241 72.4049 69.7306 73.0456 69.2146L72.4049 68.1181C71.8923 68.5051 71.3797 68.6986 70.803 68.6986C69.7137 68.6986 68.9448 67.9246 68.9448 66.6991C68.9448 65.5381 69.7137 64.764 70.803 64.6995C71.3797 64.6995 71.8923 64.893 72.4049 65.28L73.0456 64.1835C72.4049 63.6675 71.7641 63.474 70.8671 63.474C68.8807 63.474 67.5992 64.8285 67.5992 66.6991ZM80.0299 63.603H78.6843V64.377C78.2358 63.7965 77.5951 63.474 76.7621 63.474C75.032 63.474 73.6864 64.8285 73.6864 66.6991C73.6864 68.5696 75.032 69.9241 76.7621 69.9241C77.6591 69.9241 78.2999 69.6016 78.6843 69.0211V69.7951H80.0299V63.603ZM75.0961 66.6991C75.0961 65.6026 75.8009 64.6995 76.9543 64.6995C78.0436 64.6995 78.8125 65.5381 78.8125 66.6991C78.8125 67.7956 78.0436 68.6986 76.9543 68.6986C75.8009 68.6341 75.0961 67.7956 75.0961 66.6991ZM59.013 63.474C57.2188 63.474 55.9373 64.764 55.9373 66.6991C55.9373 68.6341 57.2188 69.9241 59.077 69.9241C59.9741 69.9241 60.8712 69.6661 61.576 69.0856L60.9353 68.1181C60.4226 68.5051 59.7819 68.7631 59.1411 68.7631C58.3081 68.7631 57.4751 68.3761 57.2829 67.2796H61.8323V66.7636C61.8964 64.764 60.743 63.474 59.013 63.474ZM59.013 64.635C59.846 64.635 60.4226 65.151 60.5508 66.1186H57.347C57.4751 65.28 58.0518 64.635 59.013 64.635ZM92.3966 61.152H91.051V64.377C90.6025 63.7965 89.9617 63.474 89.1288 63.474C87.3987 63.474 86.0531 64.8285 86.0531 66.6991C86.0531 68.5696 87.3987 69.9241 89.1288 69.9241C90.0258 69.9241 90.6666 69.6016 91.051 69.0211V69.7951H92.3966V61.152ZM87.4628 66.6991C87.4628 65.6026 88.1676 64.6995 89.321 64.6995C90.4103 64.6995 91.1792 65.5381 91.1792 66.6991C91.1792 67.7956 90.4103 68.6986 89.321 68.6986C88.1676 68.6341 87.4628 67.7956 87.4628 66.6991ZM42.4813 63.603H41.1357V64.377C40.6872 63.7965 40.0464 63.474 39.2134 63.474C37.4834 63.474 36.1378 64.8285 36.1378 66.6991C36.1378 68.5696 37.4834 69.9241 39.2134 69.9241C40.1105 69.9241 40.7513 69.6016 41.1357 69.0211V69.7951H42.4813V63.603ZM37.4834 66.6991C37.4834 65.6026 38.1882 64.6995 39.3416 64.6995C40.4309 64.6995 41.1998 65.5381 41.1998 66.6991C41.1998 67.7956 40.4309 68.6986 39.3416 68.6986C38.1882 68.6341 37.4834 67.7956 37.4834 66.6991Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M94.3102 69.5156V69.6371H94.4202C94.4455 69.6371 94.4653 69.632 94.4805 69.6221C94.4952 69.6123 94.5028 69.5968 94.5028 69.5756C94.5028 69.5559 94.4952 69.5409 94.4805 69.5306C94.4653 69.5207 94.4455 69.5156 94.4202 69.5156H94.3102ZM94.4212 69.4302C94.479 69.4302 94.5231 69.4431 94.5541 69.469C94.5855 69.4954 94.6007 69.5306 94.6007 69.5756C94.6007 69.6133 94.5885 69.6449 94.5637 69.6692C94.5388 69.6935 94.5039 69.7086 94.4577 69.7142L94.6042 69.8865H94.4897L94.3543 69.7158H94.3102V69.8865H94.2149V69.4302H94.4212ZM94.3928 70.0433C94.445 70.0433 94.4932 70.0335 94.5383 70.0133C94.5835 69.9931 94.6225 69.9657 94.6565 69.9316C94.6904 69.8969 94.7168 69.856 94.7361 69.8094C94.7553 69.7629 94.765 69.7132 94.765 69.6599C94.765 69.6071 94.7553 69.5575 94.7361 69.5109C94.7168 69.4643 94.6904 69.4235 94.6565 69.3888C94.6225 69.3546 94.5835 69.3277 94.5383 69.3076C94.4932 69.2879 94.445 69.2781 94.3928 69.2781C94.3401 69.2781 94.2909 69.2879 94.2448 69.3076C94.1986 69.3277 94.1591 69.3546 94.1251 69.3888C94.0912 69.4235 94.0648 69.4643 94.0455 69.5109C94.0263 69.5575 94.0166 69.6071 94.0166 69.6599C94.0166 69.7132 94.0263 69.7629 94.0455 69.8094C94.0648 69.856 94.0912 69.8969 94.1251 69.9316C94.1591 69.9657 94.1986 69.9931 94.2448 70.0133C94.2909 70.0335 94.3401 70.0433 94.3928 70.0433ZM94.3928 69.1684C94.4608 69.1684 94.5241 69.1813 94.584 69.2072C94.6433 69.233 94.695 69.2677 94.7396 69.3127C94.7837 69.3572 94.8192 69.4095 94.8446 69.469C94.8699 69.529 94.8831 69.5927 94.8831 69.6599C94.8831 69.7277 94.8699 69.7913 94.8446 69.8508C94.8192 69.9098 94.7837 69.9621 94.7396 70.0066C94.695 70.0511 94.6433 70.0863 94.584 70.1127C94.5241 70.1385 94.4608 70.152 94.3928 70.152C94.3239 70.152 94.259 70.1385 94.1986 70.1127C94.1388 70.0863 94.0866 70.0511 94.0425 70.0066C93.9984 69.9621 93.9634 69.9098 93.938 69.8508C93.9122 69.7913 93.8995 69.7277 93.8995 69.6599C93.8995 69.5927 93.9122 69.529 93.938 69.469C93.9634 69.4095 93.9984 69.3572 94.0425 69.3127C94.0866 69.2677 94.1388 69.233 94.1986 69.2072C94.259 69.1813 94.3239 69.1684 94.3928 69.1684Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@@ -0,0 +1,9 @@
<svg width="120" height="80" viewBox="0 0 120 80" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="120" height="80" rx="4" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M76.2315 34.67C75.8559 37.1343 73.9727 37.1343 72.1505 37.1343H71.1141L71.8414 32.5332C71.8848 32.2553 72.1248 32.0508 72.4065 32.0508H72.8822C74.1224 32.0508 75.2934 32.0508 75.8975 32.7563C76.2589 33.1785 76.3679 33.8052 76.2315 34.67ZM75.4387 28.2401H68.5683C68.0979 28.2401 67.6984 28.5818 67.6249 29.0456L64.847 46.6499C64.7921 46.9969 65.0613 47.3112 65.4121 47.3112H68.9377C69.2663 47.3112 69.5462 47.0722 69.5976 46.7482L70.386 41.7567C70.4586 41.2929 70.859 40.9512 71.3285 40.9512H73.5023C78.0279 40.9512 80.6402 38.7631 81.3223 34.4248C81.6297 32.5288 81.3347 31.0382 80.4462 29.9945C79.4692 28.8474 77.7374 28.2401 75.4387 28.2401Z" fill="#009CDE"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M27.2281 34.67C26.8525 37.1343 24.9693 37.1343 23.1471 37.1343H22.1107L22.838 32.5332C22.8814 32.2553 23.1214 32.0508 23.4031 32.0508H23.8788C25.119 32.0508 26.29 32.0508 26.8941 32.7563C27.2556 33.1785 27.3645 33.8052 27.2281 34.67ZM26.4353 28.2401H19.5649C19.0945 28.2401 18.695 28.5818 18.6215 29.0456L15.8436 46.6499C15.7887 46.9969 16.0571 47.3112 16.4087 47.3112H19.6898C20.1593 47.3112 20.5588 46.9695 20.6323 46.5065L21.3826 41.7567C21.4552 41.2929 21.8556 40.9512 22.3251 40.9512H24.4989C29.0245 40.9512 31.6368 38.7631 32.3189 34.4248C32.6263 32.5288 32.3313 31.0382 31.4428 29.9945C30.4658 28.8474 28.734 28.2401 26.4353 28.2401Z" fill="#003087"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M42.3858 40.9899C42.0678 42.8683 40.5761 44.1296 38.6724 44.1296C37.7184 44.1296 36.954 43.8225 36.4632 43.2418C35.9769 42.6665 35.7935 41.8459 35.9477 40.9333C36.2435 39.0709 37.7601 37.7697 39.6344 37.7697C40.569 37.7697 41.3272 38.0795 41.8277 38.6655C42.3317 39.2559 42.5302 40.0809 42.3858 40.9899ZM46.9708 34.591H43.6808C43.3992 34.591 43.1591 34.7955 43.1148 35.0743L42.9704 35.9931L42.741 35.6603C42.0279 34.6273 40.4396 34.2812 38.854 34.2812C35.2195 34.2812 32.1147 37.0341 31.5106 40.8943C31.1961 42.8205 31.6426 44.6607 32.7357 45.9451C33.7393 47.1251 35.1717 47.6163 36.8787 47.6163C39.8089 47.6163 41.4335 45.7362 41.4335 45.7362L41.2865 46.6497C41.2316 46.9967 41.5 47.311 41.8525 47.311H44.8147C45.2851 47.311 45.6846 46.9702 45.7581 46.5063L47.5368 35.2523C47.5917 34.9053 47.3224 34.591 46.9708 34.591Z" fill="#003087"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M91.3887 40.9899C91.0707 42.8683 89.579 44.1296 87.6754 44.1296C86.7213 44.1296 85.9569 43.8225 85.4661 43.2418C84.9789 42.6665 84.7965 41.8459 84.9506 40.9333C85.2465 39.0709 86.763 37.7697 88.6374 37.7697C89.5719 37.7697 90.3302 38.0795 90.8306 38.6655C91.3347 39.2559 91.5331 40.0809 91.3887 40.9899ZM95.9737 34.591H92.6838C92.4021 34.591 92.162 34.7955 92.1177 35.0743L91.9734 35.9931L91.743 35.6603C91.0308 34.6273 89.4426 34.2812 87.857 34.2812C84.2225 34.2812 81.1177 37.0341 80.5135 40.8943C80.1991 42.8205 80.6455 44.6607 81.7386 45.9451C82.7423 47.1251 84.1746 47.6163 85.8816 47.6163C88.8119 47.6163 90.4365 45.7362 90.4365 45.7362L90.2894 46.6497C90.2345 46.9967 90.5029 47.311 90.8555 47.311H93.8176C94.288 47.311 94.6875 46.9702 94.761 46.5063L96.5397 35.2523C96.5947 34.9053 96.3254 34.591 95.9737 34.591Z" fill="#009CDE"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M64.4927 34.5911H61.186C60.8697 34.5911 60.5739 34.7478 60.3967 35.0098L55.8347 41.7229L53.9019 35.2718C53.7805 34.8682 53.4085 34.5911 52.9868 34.5911H49.7368C49.3444 34.5911 49.068 34.977 49.1947 35.3479L52.8354 46.0284L49.4108 50.857C49.1424 51.2359 49.4135 51.7599 49.8785 51.7599H53.1817C53.4944 51.7599 53.7876 51.6068 53.9665 51.3501L64.9631 35.4896C65.2262 35.1098 64.9551 34.5911 64.4927 34.5911Z" fill="#003087"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M99.8516 28.7239L97.0321 46.6504C96.9771 46.9973 97.2455 47.3116 97.5972 47.3116H100.434C100.903 47.3116 101.303 46.9699 101.376 46.5061L104.157 28.9018C104.212 28.5548 103.943 28.2406 103.591 28.2406H100.418C100.135 28.2406 99.895 28.445 99.8516 28.7239Z" fill="#009CDE"/>
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -0,0 +1,7 @@
<svg width="120" height="80" viewBox="0 0 120 80" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="120" height="80" rx="4" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M86.6666 44.9375L90.3239 35.0625L92.3809 44.9375H86.6666ZM100.952 52.8375L95.8086 27.1625H88.7383C86.3525 27.1625 85.7723 29.0759 85.7723 29.0759L76.1904 52.8375H82.8868L84.2269 49.0244H92.3947L93.1479 52.8375H100.952Z" fill="#1434CB"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M77.1866 33.5711L78.0952 28.244C78.0952 28.244 75.2896 27.1625 72.3648 27.1625C69.2031 27.1625 61.6955 28.5638 61.6955 35.3738C61.6955 41.7825 70.5071 41.8621 70.5071 45.2266C70.5071 48.5912 62.6034 47.9901 59.9955 45.8676L59.0476 51.4362C59.0476 51.4362 61.8919 52.8375 66.2397 52.8375C70.5869 52.8375 77.1467 50.5544 77.1467 44.3455C77.1467 37.8964 68.2552 37.296 68.2552 34.4921C68.2552 31.6882 74.4602 32.0484 77.1866 33.5711Z" fill="#1434CB"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M54.6517 52.8375H47.6191L52.0144 27.1625H59.0477L54.6517 52.8375Z" fill="#1434CB"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M42.3113 27.1625L35.9217 44.8213L35.1663 41.0185L35.167 41.0199L32.9114 29.4749C32.9114 29.4749 32.6394 27.1625 29.7324 27.1625H19.1709L19.0476 27.5966C19.0476 27.5966 22.2782 28.2669 26.057 30.5326L31.8793 52.8375H38.8617L49.5238 27.1625H42.3113Z" fill="#1434CB"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -9,6 +9,99 @@ if (!defined('ABSPATH')) {
class WC_Aluxpay_Payment_Gateway extends WC_Payment_Gateway { class WC_Aluxpay_Payment_Gateway extends WC_Payment_Gateway {
/**
* Reusable: HTML notice for Thank You page + HTML emails
*/
protected function get_generic_notice_html(): string {
// Keep inline styles for email clients; translate strings
$html .= '<h5>' . esc_html__( 'Important Note:', 'aluxpay-payment-gateway' ) . '</h5>';
$html .= '<p>' . esc_html__( "Because of the nature of our business and how our website integrates with PayPal, youll also receive a PayPal payment confirmation email. That email will display a generic product name instead of the specific item(s) you purchased.", 'aluxpay-payment-gateway' ) . '</p>';
$html .= '<p>' . esc_html__( 'Rest assured — your order is fully confirmed, and the webstore confirmation email contains the correct details of your purchase.', 'aluxpay-payment-gateway' ) . '</p>';
$html .= '<p>' . esc_html__( "If you have any questions or need assistance, please dont hesitate to contact our support team.", 'aluxpay-payment-gateway' ) . '</p>';
// For frontend we can allow basic tags; for email we echo directly.
$allowed = array(
'p' => array('style'=>true),
'h5' => array('style'=>true),
'strong' => array(),
);
return wp_kses( $html, $allowed );
}
/**
* Reusable: Plain-text version for plain emails
*/
protected function get_generic_notice_plain(): string {
$lines = array(
__( 'Important Note:', 'aluxpay-payment-gateway' ),
__( "Because of the nature of our business and how our website integrates with PayPal, youll also receive a PayPal payment confirmation email. That email will display a generic product name instead of the specific item(s) you purchased.", 'aluxpay-payment-gateway' ),
__( 'Rest assured — your order is fully confirmed, and the webstore confirmation email contains the correct details of your purchase.', 'aluxpay-payment-gateway' ),
'',
__( "If you have any questions or need assistance, please dont hesitate to contact our support team.", 'aluxpay-payment-gateway' ),
);
return implode( PHP_EOL, $lines ) . PHP_EOL;
}
/**
* Reusable: HTML notice for Failed Order emails
*/
protected function get_failed_notice_html(): string {
$html = '';
$html .= '<p><strong>' . esc_html__( 'Payment Failed', 'aluxpay-payment-gateway' ) . '</strong></p>';
$html .= '<p>' . esc_html__( 'Unfortunately, your payment could not be processed. This may have occurred for one of the following reasons:', 'aluxpay-payment-gateway' ) . '</p>';
$html .= '<ul style="margin-left: 20px;">';
$html .= '<li>' . esc_html__( 'Insufficient funds in your account', 'aluxpay-payment-gateway' ) . '</li>';
$html .= '<li>' . esc_html__( 'Payment was cancelled during the process', 'aluxpay-payment-gateway' ) . '</li>';
$html .= '<li>' . esc_html__( 'Payment method declined the transaction', 'aluxpay-payment-gateway' ) . '</li>';
$html .= '<li>' . esc_html__( 'Technical issue during payment processing', 'aluxpay-payment-gateway' ) . '</li>';
$html .= '</ul>';
$html .= '<p>' . esc_html__( 'Your order has not been completed and no charges have been made to your account.', 'aluxpay-payment-gateway' ) . '</p>';
$html .= '<h5>' . esc_html__( 'What to do next:', 'aluxpay-payment-gateway' ) . '</h5>';
$html .= '<p>' . esc_html__( 'You can try placing your order again by visiting our website. If you continue to experience issues, please contact us for assistance.', 'aluxpay-payment-gateway' ) . '</p>';
$html .= '<p>' . esc_html__( 'We apologize for any inconvenience this may have caused.', 'aluxpay-payment-gateway' ) . '</p>';
$allowed = array(
'p' => array('style'=>true),
'h5' => array('style'=>true),
'ul' => array('style'=>true),
'li' => array(),
'strong' => array(),
);
return wp_kses( $html, $allowed );
}
/**
* Reusable: Plain-text version for Failed Order emails
*/
protected function get_failed_notice_plain(): string {
$lines = array(
__( 'Payment Failed', 'aluxpay-payment-gateway' ),
'',
__( 'Unfortunately, your payment could not be processed. This may have occurred for one of the following reasons:', 'aluxpay-payment-gateway' ),
'',
'- ' . __( 'Insufficient funds in your account', 'aluxpay-payment-gateway' ),
'- ' . __( 'Payment was cancelled during the process', 'aluxpay-payment-gateway' ),
'- ' . __( 'Payment method declined the transaction', 'aluxpay-payment-gateway' ),
'- ' . __( 'Technical issue during payment processing', 'aluxpay-payment-gateway' ),
'',
__( 'Your order has not been completed and no charges have been made to your account.', 'aluxpay-payment-gateway' ),
'',
__( 'What to do next:', 'aluxpay-payment-gateway' ),
__( 'You can try placing your order again by visiting our website. If you continue to experience issues, please contact us for assistance.', 'aluxpay-payment-gateway' ),
'',
__( 'We apologize for any inconvenience this may have caused.', 'aluxpay-payment-gateway' ),
);
return implode( PHP_EOL, $lines ) . PHP_EOL;
}
/** /**
* Constructor * Constructor
*/ */
@@ -42,8 +135,70 @@ class WC_Aluxpay_Payment_Gateway extends WC_Payment_Gateway {
add_action('woocommerce_api_' . $this->id, array($this, 'webhook_handler')); add_action('woocommerce_api_' . $this->id, array($this, 'webhook_handler'));
add_action('woocommerce_thankyou_' . $this->id, array($this, 'thankyou_page')); add_action('woocommerce_thankyou_' . $this->id, array($this, 'thankyou_page'));
// Customer Emails add_action('wp_enqueue_scripts', array($this, 'enqueue_checkout_styles'));
// Customer Emails - Success
add_action('woocommerce_email_before_order_table', array($this, 'email_instructions'), 10, 3); add_action('woocommerce_email_before_order_table', array($this, 'email_instructions'), 10, 3);
// Customer Emails - Failed Orders
add_action('woocommerce_email_before_order_table', array($this, 'failed_email_instructions'), 10, 3);
}
// SVG icons on checkout
public function get_icon() {
$icons = array(
'discover' => array(
'file' => 'discover.svg',
'alt' => 'Discover'
),
'amex' => array(
'file' => 'american-express.svg',
'alt' => 'American Express'
),
'visa' => array(
'file' => 'visa.svg',
'alt' => 'Visa'
),
'mastercard' => array(
'file' => 'mastercard-alt.svg',
'alt' => 'Mastercard'
),
'paypal' => array(
'file' => 'paypal.svg',
'alt' => 'PayPal'
),
);
$icons_html = '<span class="aluxpay-payment-icons">';
foreach ($icons as $key => $icon) {
// Use the constant defined in main plugin file
$icon_url = ALUXPAY_PLUGIN_URL . 'assets/images/' . $icon['file'];
$icons_html .= sprintf(
'<img src="%s" alt="%s" class="aluxpay-icon aluxpay-icon-%s" />',
esc_url($icon_url),
esc_attr($icon['alt']),
esc_attr($key)
);
}
$icons_html .= '</span>';
return $icons_html;
}
/**
* Enqueue checkout styles
*/
public function enqueue_checkout_styles() {
if (is_checkout()) {
wp_enqueue_style(
'aluxpay-checkout',
ALUXPAY_PLUGIN_URL . 'assets/css/checkout.css',
array(),
'1.0.1'
);
}
} }
/** /**
@@ -63,14 +218,14 @@ class WC_Aluxpay_Payment_Gateway extends WC_Payment_Gateway {
'title' => __('Title', 'aluxpay-payment-gateway'), 'title' => __('Title', 'aluxpay-payment-gateway'),
'type' => 'text', 'type' => 'text',
'description' => __('This controls the title which the user sees during checkout.', 'aluxpay-payment-gateway'), 'description' => __('This controls the title which the user sees during checkout.', 'aluxpay-payment-gateway'),
'default' => __('PayPal Payment', 'aluxpay-payment-gateway'), 'default' => __(' PayPal or Credit/Debit Card Payment ', 'aluxpay-payment-gateway'),
'desc_tip' => true, 'desc_tip' => true,
), ),
'description' => array( 'description' => array(
'title' => __('Description', 'aluxpay-payment-gateway'), 'title' => __('Description', 'aluxpay-payment-gateway'),
'type' => 'textarea', 'type' => 'textarea',
'description' => __('Payment method description that the customer will see on your checkout.', 'aluxpay-payment-gateway'), 'description' => __('Payment method description that the customer will see on your checkout.', 'aluxpay-payment-gateway'),
'default' => __('You will be redirected to complete payment securely with PayPal.', 'aluxpay-payment-gateway'), 'default' => __('You will be redirected to complete payment securely with PayPal or Credit Card.', 'aluxpay-payment-gateway'),
'desc_tip' => true, 'desc_tip' => true,
), ),
'payment_url' => array( 'payment_url' => array(
@@ -137,28 +292,22 @@ class WC_Aluxpay_Payment_Gateway extends WC_Payment_Gateway {
*/ */
private function get_payment_redirect_url($order) { private function get_payment_redirect_url($order) {
// Build description without special characters OR encode it // Build the base URL
$description = sprintf( $base_url = $this->payment_url;
__('Order %s from %s', 'aluxpay-payment-gateway'),
$order->get_id(),
get_bloginfo('name')
);
// Build parameters array - NO special characters
$params = array( $params = array(
'wc_order_id' => $order->get_id(), 'wc_order_id' => $order->get_id(),
'total' => $order->get_total(), 'total' => $order->get_total(),
'currency' => $order->get_currency(), 'currency' => $order->get_currency(),
'description' => $description, 'description' => 'Order ' . $order->get_id(), // ← No # symbol
'customer_email' => $order->get_billing_email(), 'customer_email' => $order->get_billing_email(),
'return_url' => $this->get_return_url($order), 'return_url' => urlencode($this->get_return_url($order)),
'cancel_url' => wc_get_checkout_url(), 'cancel_url' => urlencode(wc_get_checkout_url()),
'_wpnonce' => wp_create_nonce('cpg_payment_' . $order->get_id()), '_wpnonce' => wp_create_nonce('cpg_payment_' . $order->get_id()),
); );
// Add nonce for security return add_query_arg($params, $base_url);
$params['_wpnonce'] = wp_create_nonce('cpg_payment_' . $order->get_id());
return add_query_arg($params, $this->payment_url);
} }
/** /**
@@ -233,24 +382,58 @@ class WC_Aluxpay_Payment_Gateway extends WC_Payment_Gateway {
*/ */
public function thankyou_page($order_id) { public function thankyou_page($order_id) {
if ($this->description) { /**if ($this->description) {
echo wpautop(wptexturize($this->description)); echo wpautop(wptexturize($this->description));
} }*/
$order = wc_get_order($order_id); $order = wc_get_order($order_id);
if ($order && $order->get_status() === 'processing') { if ($order && $order->get_status() === 'processing') {
echo '<p>' . __('Your payment has been received and your order is being processed.', 'aluxpay-payment-gateway') . '</p>'; echo $this->get_generic_notice_html();
} }
} }
/** /**
* Add content to the WC emails * Add content to the WC emails for successful orders
*/ */
public function email_instructions($order, $sent_to_admin, $plain_text = false) { public function email_instructions($order, $sent_to_admin, $plain_text = false) {
if ($this->description && !$sent_to_admin && $this->id === $order->get_payment_method()) { /** if ($this->description && !$sent_to_admin && $this->id === $order->get_payment_method()) {
echo wpautop(wptexturize($this->description)) . PHP_EOL; * echo wpautop(wptexturize($this->description)) . PHP_EOL;
*} */
if ( $sent_to_admin ) return; // customers only
if ( ! $order instanceof WC_Order ) return;
if ( $order->get_payment_method() !== $this->id ) return;
// Only show for completed/processing orders
if ( ! in_array( $order->get_status(), array( 'processing' ) ) ) return;
// Pick the right format for the email renderer
if ( $plain_text ) {
echo $this->get_generic_notice_plain();
} else {
echo $this->get_generic_notice_html();
}
}
/**
* Add content to the WC emails for failed orders
*/
public function failed_email_instructions($order, $sent_to_admin, $plain_text = false) {
if ( $sent_to_admin ) return; // customers only
if ( ! $order instanceof WC_Order ) return;
if ( $order->get_payment_method() !== $this->id ) return;
// Only show for failed orders
if ( $order->get_status() !== 'failed' ) return;
// Pick the right format for the email renderer
if ( $plain_text ) {
echo $this->get_failed_notice_plain();
} else {
echo $this->get_failed_notice_html();
} }
} }
} }

View File

@@ -76,7 +76,31 @@ router.post('/create-order', validateCreateOrder, async (req, res) => {
currency: currency || 'USD', currency: currency || 'USD',
description: description || `Order #${wc_order_id} from ${wcOrder?.order?.billing?.first_name || 'Test Customer'}`, description: description || `Order #${wc_order_id} from ${wcOrder?.order?.billing?.first_name || 'Test Customer'}`,
items: items || [], items: items || [],
brand_name: 'Your Store Name' // Customize this brand_name: 'Fashion Store', // Customize this
// ADD CUSTOMER DETAILS FROM WOOCOMMERCE:
payer: wcOrder ? {
email: wcOrder.order.billing.email,
first_name: wcOrder.order.billing.first_name,
last_name: wcOrder.order.billing.last_name,
phone: wcOrder.order.billing.phone
} : null,
shipping: wcOrder ? {
first_name: wcOrder.order.shipping.first_name,
last_name: wcOrder.order.shipping.last_name,
address_1: wcOrder.order.shipping.address_1,
address_2: wcOrder.order.shipping.address_2,
city: wcOrder.order.shipping.city,
state: wcOrder.order.shipping.state,
postcode: wcOrder.order.shipping.postcode,
country: wcOrder.order.shipping.country
} : null,
// Optional: Add breakdown
items_total: wcOrder ? wcOrder.order.total : total,
shipping_total: wcOrder ? wcOrder.order.shipping_total : '0.00',
tax_total: wcOrder ? wcOrder.order.total_tax : '0.00'
}; };
// Create PayPal order // Create PayPal order
@@ -136,17 +160,20 @@ router.post('/capture-order', validateCaptureOrder, async (req, res) => {
tokenLength: token?.length tokenLength: token?.length
}); });
// Declare tokenData at function scope
let tokenData = null;
// Verify token (optional in development) // Verify token (optional in development)
const skipTokenValidation = process.env.NODE_ENV === 'development' && process.env.SKIP_TOKEN_VALIDATION === 'true'; const skipTokenValidation = process.env.NODE_ENV === 'development' && process.env.SKIP_TOKEN_VALIDATION === 'true';
if (token && !skipTokenValidation) { if (token && !skipTokenValidation) {
const tokenData = verifyToken(token); tokenData = verifyToken(token);
console.log('Token verification result:', { console.log('Token verification result:', {
isValid: !!tokenData, isValid: !!tokenData,
tokenData: tokenData tokenData: tokenData
}); });
if (!tokenData || tokenData.wc_order_id !== parseInt(wc_order_id)) { if (!tokenData || tokenData.wc_order_id !== String(wc_order_id)) {
console.error('Token validation failed:', { console.error('Token validation failed:', {
tokenData, tokenData,
expectedOrderId: wc_order_id, expectedOrderId: wc_order_id,
@@ -262,14 +289,31 @@ router.get('/order-status/:wc_order_id', async (req, res) => {
total: item.total, total: item.total,
image: item.image?.src || null image: item.image?.src || null
})), })),
shipping: {
total: wcOrder.order.shipping_total,
method: wcOrder.order.shipping_lines[0]?.method_title
},
billing: { billing: {
first_name: wcOrder.order.billing.first_name, first_name: wcOrder.order.billing.first_name,
last_name: wcOrder.order.billing.last_name, last_name: wcOrder.order.billing.last_name,
email: wcOrder.order.billing.email company: wcOrder.order.billing.company,
address_1: wcOrder.order.billing.address_1,
address_2: wcOrder.order.billing.address_2,
city: wcOrder.order.billing.city,
state: wcOrder.order.billing.state,
postcode: wcOrder.order.billing.postcode,
country: wcOrder.order.billing.country,
email: wcOrder.order.billing.email,
phone: wcOrder.order.billing.phone
},
shipping: {
total: wcOrder.order.shipping_total,
method: wcOrder.order.shipping_lines[0]?.method_title,
first_name: wcOrder.order.shipping.first_name,
last_name: wcOrder.order.shipping.last_name,
company: wcOrder.order.shipping.company,
address_1: wcOrder.order.shipping.address_1,
address_2: wcOrder.order.shipping.address_2,
city: wcOrder.order.shipping.city,
state: wcOrder.order.shipping.state,
postcode: wcOrder.order.shipping.postcode,
country: wcOrder.order.shipping.country
} }
}); });

View File

@@ -27,18 +27,62 @@ async function createOrder(orderData) {
request.prefer("return=representation"); request.prefer("return=representation");
request.requestBody({ request.requestBody({
intent: 'CAPTURE', intent: 'CAPTURE',
// ADD PAYER INFORMATION
payer: orderData.payer ? {
email_address: orderData.payer.email,
name: {
given_name: orderData.payer.first_name,
surname: orderData.payer.last_name
},
phone: orderData.payer.phone ? {
phone_type: "MOBILE",
phone_number: {
national_number: orderData.payer.phone
}
} : undefined,
} : undefined,
purchase_units: [{ purchase_units: [{
reference_id: orderData.reference_id, reference_id: orderData.reference_id,
amount: { amount: {
currency_code: orderData.currency || 'USD', currency_code: orderData.currency || 'USD',
value: orderData.total value: orderData.total,
breakdown: {
item_total: {
currency_code: orderData.currency || 'USD',
value: orderData.items_total || orderData.total
},
shipping: orderData.shipping.total ? {
currency_code: orderData.currency_code || 'USD',
value: orderData.shipping.total
} : undefined,
tax_total: orderData.tax_total ? {
currency_code: orderData.currency || 'USD',
value: orderData.tax_total
} : undefined,
}
}, },
description: orderData.description || 'Payment from WooCommerce', description: orderData.description || 'Payment from WooCommerce',
custom_id: orderData.wc_order_id, custom_id: orderData.wc_order_id,
items: orderData.items || [] items: orderData.items || [],
// ADD SHIPPING INFORMATION
shipping: orderData.shipping ? {
name: {
full_name: `${orderData.shipping.first_name} ${orderData.shipping.last_name}`
},
address: {
address_line_1: orderData.shipping.address_1,
address_line_2: orderData.shipping.address_2 || undefined,
admin_area_2: orderData.shipping.city,
admin_area_1: orderData.shipping.state,
postal_code: orderData.shipping.postcode,
country_code: orderData.shipping.country
}
} : undefined
}], }],
application_context: { application_context: {
brand_name: orderData.brand_name || 'Your Store', brand_name: orderData.brand_name || 'Fashion Store',
landing_page: 'BILLING', landing_page: 'BILLING',
user_action: 'PAY_NOW', user_action: 'PAY_NOW',
return_url: `${process.env.FRONTEND_URL}/success`, return_url: `${process.env.FRONTEND_URL}/success`,

View File

@@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> <link rel="icon" type="image/svg+xml" href="%VITE_REACT_APP_FAVICON%" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>%VITE_REACT_APP_STORE_NAME% - Payment Gateway</title> <title>%VITE_REACT_APP_STORE_NAME% - Payment Gateway</title>
</head> </head>

View File

@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 1580 228" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g transform="matrix(1,0,0,1,-46.879,-1954.91)">
<g transform="matrix(1.24376,0,0,2.25524,247.304,346.271)">
<g transform="matrix(0.343554,0,0,0.189469,-213.604,710.743)">
<path d="M350,222.88C361.199,222.88 370.16,213.919 370.16,202.72C370.16,191.521 361.199,182.56 350,182.56C338.801,182.56 329.84,191.521 329.84,202.72C329.84,213.923 338.801,222.88 350,222.88Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
<path d="M546,380.24L518.559,236.32C530.879,226.801 537.598,210.558 534.239,194.32L524.719,146.16C519.68,120.961 497.278,102.48 471.52,102.48L428.399,102.484L428.399,91.843C428.399,48.722 393.118,13.445 350.001,13.445C306.881,13.445 271.603,48.726 271.603,91.843L271.603,102.484L229.044,102.484C203.282,102.484 180.884,120.964 175.845,146.164L166.326,194.324C162.967,210.562 169.685,226.246 182.006,235.765L154.002,380.245C150.08,399.284 155.123,418.886 167.443,434.007C179.763,449.128 198.244,457.527 217.841,457.527L277.763,457.527L341.603,541.527C343.841,544.328 346.642,546.007 350.564,546.007C353.923,546.007 357.283,544.328 359.525,541.527L423.365,457.527L483.287,457.527C502.889,457.527 520.807,449.129 533.127,434.007C544.881,418.886 549.924,399.288 546.002,380.245L546,380.24ZM293.44,92.4C293.44,61.041 318.639,35.841 349.999,35.841C381.359,35.841 406.558,61.04 406.558,92.4L406.558,103.041L293.438,103.041L293.44,92.4ZM187.6,199.36L197.119,151.2C199.92,136.079 213.357,124.88 229.041,124.88L471.521,124.88C487.201,124.88 500.08,136.079 503.443,151.2L512.963,199.36C515.201,209.438 509.041,219.52 499.522,222.88C454.721,236.88 403.202,244.72 350.562,244.72C297.922,244.72 246.402,237.439 201.602,222.88C190.961,219.521 185.36,209.442 187.602,199.36L187.6,199.36ZM403.2,391.44L445.2,391.44L376.88,481.6L403.2,391.44ZM350.001,495.6L319.763,391.44L380.243,391.44L350.001,495.6ZM402.079,369.6L386.958,334.881L423.919,334.881L446.88,369.6L402.079,369.6ZM362.88,334.877L378.001,369.6L322.001,369.6L337.122,334.881L362.88,334.877ZM297.923,369.6L253.122,369.6L276.083,334.881L313.044,334.881L297.923,369.6ZM296.802,391.44L323.122,481.6L254.802,391.44L296.802,391.44ZM515.202,419.999C506.803,430.077 495.042,435.679 482.163,435.679L439.042,435.679L476.003,386.96C478.804,383.038 478.804,377.999 476.561,374.081L439.041,317.522C436.803,314.721 433.44,312.483 430.081,312.483L270.481,312.479C266.559,312.479 263.199,314.159 261.52,317.518L224,374.077C221.199,377.999 221.761,383.038 224.558,386.956L261.519,435.675L218.398,435.675C205.519,435.675 193.199,430.073 184.796,419.995C176.398,409.917 173.034,397.034 175.835,384.155L202.155,245.275C246.956,258.716 297.917,265.994 349.995,265.994C402.073,265.994 453.035,258.713 497.835,245.275L524.155,384.155C526.96,397.038 523.601,409.921 515.198,419.999L515.202,419.999Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
</g>
<g transform="matrix(1.24376,0,0,2.25524,247.304,346.271)">
<g transform="matrix(0.804015,0,0,0.443413,-170.869,642.475)">
<g transform="matrix(144,0,0,144,218.806,316.687)">
<path d="M0.08,-0.162C0.055,-0.127 0.041,-0.1 0.035,-0.079C0.031,-0.058 0.034,-0.043 0.047,-0.035C0.06,-0.025 0.08,-0.021 0.107,-0.02L0.102,-0C0.083,-0.001 0.064,-0.002 0.044,-0.003C0.024,-0.003 0.005,-0.003 -0.012,-0.003C-0.029,-0.003 -0.043,-0.003 -0.054,-0.003C-0.065,-0.002 -0.076,-0.001 -0.087,-0L-0.082,-0.02C-0.073,-0.022 -0.063,-0.026 -0.053,-0.033C-0.043,-0.039 -0.032,-0.048 -0.02,-0.06C-0.008,-0.072 0.005,-0.088 0.018,-0.107L0.449,-0.713L0.464,-0.713L0.504,-0.084C0.506,-0.06 0.512,-0.043 0.523,-0.035C0.533,-0.025 0.543,-0.021 0.553,-0.02L0.549,-0C0.536,-0.001 0.519,-0.002 0.499,-0.003C0.479,-0.003 0.459,-0.003 0.44,-0.003C0.416,-0.003 0.393,-0.003 0.372,-0.003C0.351,-0.002 0.333,-0.001 0.32,-0L0.324,-0.02C0.356,-0.021 0.379,-0.027 0.392,-0.038C0.405,-0.048 0.411,-0.07 0.41,-0.104L0.383,-0.598L0.39,-0.6L0.08,-0.162ZM0.16,-0.288L0.452,-0.288L0.444,-0.268L0.142,-0.268L0.16,-0.288Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
<g transform="matrix(144,0,0,144,309.382,316.687)">
<path d="M0.067,-0.494L0.073,-0.514L0.368,-0.514L0.362,-0.494L0.067,-0.494ZM0.065,0.174C0.049,0.175 0.033,0.176 0.018,0.178C0.003,0.18 -0.012,0.183 -0.025,0.188L0.16,-0.499C0.169,-0.533 0.182,-0.566 0.198,-0.598C0.214,-0.63 0.232,-0.655 0.253,-0.674C0.28,-0.698 0.309,-0.715 0.339,-0.726C0.369,-0.737 0.4,-0.742 0.432,-0.742C0.468,-0.742 0.497,-0.735 0.518,-0.721C0.539,-0.707 0.554,-0.692 0.565,-0.676L0.552,-0.658C0.541,-0.678 0.526,-0.694 0.505,-0.706C0.485,-0.718 0.461,-0.724 0.434,-0.724C0.397,-0.724 0.366,-0.715 0.343,-0.696C0.32,-0.677 0.301,-0.652 0.288,-0.621C0.274,-0.589 0.262,-0.554 0.251,-0.515L0.065,0.174ZM0.356,-0.494L0.362,-0.514L0.657,-0.514L0.651,-0.494L0.356,-0.494ZM0.678,-0.767C0.665,-0.767 0.654,-0.764 0.645,-0.759C0.636,-0.754 0.627,-0.748 0.62,-0.741C0.608,-0.73 0.598,-0.713 0.589,-0.69C0.58,-0.667 0.571,-0.64 0.564,-0.61C0.556,-0.58 0.548,-0.548 0.539,-0.515L0.354,0.174C0.338,0.175 0.322,0.176 0.307,0.178C0.292,0.18 0.277,0.183 0.264,0.188L0.452,-0.515C0.466,-0.568 0.481,-0.612 0.497,-0.647C0.512,-0.682 0.531,-0.71 0.554,-0.732C0.569,-0.747 0.588,-0.759 0.611,-0.769C0.633,-0.778 0.656,-0.782 0.679,-0.782C0.71,-0.782 0.733,-0.775 0.75,-0.761C0.766,-0.748 0.774,-0.731 0.774,-0.711C0.774,-0.7 0.771,-0.689 0.765,-0.678C0.759,-0.667 0.751,-0.659 0.741,-0.652C0.731,-0.645 0.72,-0.642 0.707,-0.642C0.694,-0.642 0.684,-0.645 0.677,-0.651C0.67,-0.657 0.666,-0.665 0.667,-0.676C0.667,-0.693 0.672,-0.707 0.683,-0.719C0.694,-0.73 0.707,-0.738 0.724,-0.743C0.724,-0.749 0.72,-0.754 0.711,-0.759C0.702,-0.764 0.691,-0.767 0.678,-0.767Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
<g transform="matrix(144,0,0,144,397.222,316.687)">
<path d="M0.304,-0.508C0.283,-0.508 0.262,-0.5 0.243,-0.483C0.223,-0.466 0.205,-0.443 0.189,-0.413C0.172,-0.385 0.158,-0.352 0.146,-0.316C0.133,-0.28 0.124,-0.243 0.117,-0.204C0.11,-0.165 0.107,-0.128 0.107,-0.093C0.107,-0.063 0.112,-0.041 0.122,-0.027C0.131,-0.013 0.145,-0.006 0.164,-0.006C0.185,-0.006 0.206,-0.015 0.226,-0.032C0.245,-0.049 0.263,-0.071 0.28,-0.101C0.297,-0.13 0.311,-0.162 0.323,-0.198C0.335,-0.234 0.344,-0.271 0.351,-0.31C0.358,-0.348 0.361,-0.385 0.361,-0.421C0.361,-0.452 0.356,-0.474 0.347,-0.488C0.338,-0.501 0.323,-0.508 0.304,-0.508ZM0.021,-0.143C0.021,-0.172 0.025,-0.204 0.033,-0.239C0.041,-0.274 0.053,-0.308 0.069,-0.342C0.085,-0.376 0.105,-0.407 0.128,-0.435C0.151,-0.463 0.177,-0.486 0.208,-0.502C0.239,-0.52 0.273,-0.528 0.31,-0.528C0.351,-0.528 0.385,-0.515 0.409,-0.49C0.435,-0.464 0.447,-0.424 0.447,-0.371C0.447,-0.342 0.443,-0.31 0.435,-0.275C0.427,-0.24 0.415,-0.206 0.399,-0.172C0.383,-0.138 0.364,-0.107 0.341,-0.079C0.318,-0.051 0.291,-0.029 0.26,-0.012C0.229,0.005 0.195,0.014 0.158,0.014C0.117,0.014 0.084,0.001 0.059,-0.025C0.034,-0.051 0.021,-0.09 0.021,-0.143Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
<g transform="matrix(144,0,0,144,467.494,316.687)">
<path d="M0.121,-0L0.034,-0L0.154,-0.429C0.161,-0.452 0.163,-0.468 0.161,-0.477C0.158,-0.486 0.151,-0.491 0.14,-0.491C0.125,-0.491 0.112,-0.483 0.1,-0.468C0.088,-0.453 0.075,-0.426 0.062,-0.389L0.049,-0.352L0.03,-0.352L0.055,-0.425C0.065,-0.453 0.077,-0.474 0.091,-0.489C0.104,-0.504 0.118,-0.514 0.134,-0.52C0.149,-0.525 0.163,-0.528 0.176,-0.528C0.196,-0.528 0.21,-0.524 0.219,-0.515C0.227,-0.506 0.232,-0.495 0.233,-0.481C0.234,-0.467 0.233,-0.452 0.23,-0.436C0.227,-0.419 0.223,-0.403 0.219,-0.388L0.121,-0ZM0.378,-0.503C0.363,-0.503 0.347,-0.496 0.331,-0.482C0.314,-0.467 0.298,-0.447 0.281,-0.42C0.264,-0.393 0.247,-0.36 0.23,-0.323C0.213,-0.285 0.196,-0.243 0.18,-0.197C0.163,-0.151 0.147,-0.101 0.132,-0.048L0.157,-0.176C0.179,-0.241 0.2,-0.296 0.219,-0.341C0.237,-0.386 0.256,-0.422 0.275,-0.45C0.294,-0.477 0.313,-0.497 0.333,-0.509C0.352,-0.522 0.373,-0.528 0.395,-0.528C0.414,-0.528 0.428,-0.523 0.439,-0.512C0.449,-0.501 0.454,-0.488 0.454,-0.471C0.454,-0.458 0.451,-0.446 0.444,-0.435C0.437,-0.424 0.429,-0.415 0.419,-0.408C0.408,-0.402 0.397,-0.399 0.384,-0.399C0.373,-0.399 0.363,-0.402 0.356,-0.408C0.348,-0.415 0.344,-0.424 0.344,-0.435C0.344,-0.446 0.346,-0.455 0.35,-0.464C0.354,-0.472 0.359,-0.479 0.366,-0.485C0.373,-0.491 0.38,-0.496 0.389,-0.499C0.388,-0.5 0.386,-0.501 0.385,-0.502C0.383,-0.503 0.381,-0.503 0.378,-0.503Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
<g transform="matrix(144,0,0,144,525.958,316.687)">
<path d="M0.369,-0.085C0.364,-0.07 0.363,-0.056 0.364,-0.043C0.365,-0.029 0.372,-0.023 0.387,-0.023C0.4,-0.023 0.413,-0.031 0.424,-0.046C0.435,-0.061 0.447,-0.087 0.46,-0.125L0.472,-0.162L0.491,-0.162L0.468,-0.089C0.46,-0.062 0.449,-0.042 0.436,-0.027C0.423,-0.012 0.409,-0.001 0.394,0.005C0.379,0.011 0.365,0.014 0.352,0.014C0.312,0.014 0.291,-0.005 0.289,-0.043C0.288,-0.054 0.289,-0.066 0.292,-0.08C0.294,-0.094 0.297,-0.109 0.302,-0.126L0.446,-0.667C0.452,-0.69 0.451,-0.706 0.443,-0.717C0.435,-0.728 0.415,-0.733 0.382,-0.733L0.388,-0.754C0.425,-0.755 0.457,-0.758 0.485,-0.765C0.513,-0.773 0.54,-0.782 0.565,-0.795L0.369,-0.085ZM0.145,-0.018C0.162,-0.018 0.181,-0.028 0.202,-0.048C0.223,-0.067 0.244,-0.094 0.266,-0.128C0.287,-0.161 0.307,-0.2 0.326,-0.243C0.344,-0.285 0.358,-0.33 0.369,-0.376L0.354,-0.268C0.328,-0.199 0.302,-0.144 0.277,-0.103C0.251,-0.062 0.225,-0.032 0.199,-0.014C0.172,0.005 0.145,0.014 0.116,0.014C0.095,0.014 0.077,0.009 0.062,-0.001C0.046,-0.01 0.034,-0.025 0.025,-0.044C0.016,-0.063 0.012,-0.088 0.012,-0.118C0.012,-0.15 0.017,-0.185 0.028,-0.222C0.038,-0.259 0.053,-0.295 0.072,-0.331C0.091,-0.367 0.115,-0.4 0.141,-0.43C0.169,-0.459 0.198,-0.483 0.231,-0.501C0.264,-0.519 0.298,-0.528 0.335,-0.528C0.35,-0.528 0.365,-0.522 0.378,-0.51C0.391,-0.499 0.399,-0.481 0.4,-0.458L0.392,-0.438C0.389,-0.462 0.383,-0.479 0.372,-0.49C0.361,-0.5 0.349,-0.505 0.336,-0.505C0.311,-0.505 0.286,-0.496 0.263,-0.479C0.239,-0.462 0.217,-0.439 0.198,-0.41C0.179,-0.381 0.162,-0.349 0.147,-0.315C0.132,-0.28 0.121,-0.244 0.113,-0.207C0.105,-0.171 0.101,-0.137 0.101,-0.105C0.101,-0.076 0.105,-0.054 0.112,-0.04C0.119,-0.025 0.13,-0.018 0.145,-0.018Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
<g transform="matrix(144,0,0,144,604.006,316.687)">
<path d="M0.132,-0.018C0.148,-0.018 0.166,-0.028 0.187,-0.049C0.208,-0.069 0.229,-0.096 0.25,-0.131C0.271,-0.166 0.291,-0.205 0.309,-0.249C0.327,-0.293 0.341,-0.339 0.352,-0.386L0.335,-0.278C0.31,-0.207 0.284,-0.151 0.259,-0.108C0.234,-0.065 0.208,-0.034 0.182,-0.015C0.156,0.004 0.13,0.014 0.103,0.014C0.072,0.014 0.048,0.003 0.033,-0.02C0.017,-0.043 0.009,-0.072 0.009,-0.107C0.009,-0.139 0.014,-0.174 0.025,-0.212C0.036,-0.249 0.051,-0.287 0.07,-0.324C0.089,-0.361 0.11,-0.395 0.135,-0.426C0.16,-0.457 0.187,-0.481 0.216,-0.5C0.245,-0.519 0.274,-0.528 0.304,-0.528C0.327,-0.528 0.345,-0.517 0.358,-0.494C0.37,-0.47 0.372,-0.438 0.365,-0.397L0.354,-0.391C0.359,-0.426 0.356,-0.455 0.347,-0.476C0.338,-0.498 0.322,-0.509 0.301,-0.509C0.284,-0.509 0.266,-0.5 0.247,-0.484C0.228,-0.467 0.209,-0.444 0.192,-0.414C0.174,-0.386 0.158,-0.353 0.143,-0.317C0.129,-0.281 0.118,-0.244 0.11,-0.205C0.101,-0.167 0.097,-0.13 0.097,-0.095C0.097,-0.066 0.1,-0.046 0.107,-0.035C0.113,-0.024 0.121,-0.018 0.132,-0.018ZM0.384,-0.514C0.4,-0.515 0.416,-0.516 0.432,-0.518C0.448,-0.52 0.463,-0.523 0.476,-0.528L0.351,-0.086C0.35,-0.08 0.348,-0.072 0.345,-0.063C0.343,-0.053 0.343,-0.044 0.345,-0.036C0.348,-0.028 0.355,-0.024 0.366,-0.024C0.379,-0.024 0.392,-0.031 0.405,-0.046C0.418,-0.061 0.43,-0.087 0.443,-0.126L0.455,-0.163L0.474,-0.163L0.449,-0.09C0.44,-0.063 0.429,-0.043 0.416,-0.028C0.403,-0.013 0.389,-0.002 0.375,0.004C0.361,0.011 0.347,0.014 0.334,0.014C0.308,0.014 0.29,0.005 0.279,-0.012C0.27,-0.027 0.268,-0.045 0.272,-0.066C0.276,-0.086 0.281,-0.106 0.286,-0.127L0.384,-0.514Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
<g transform="matrix(144,0,0,144,679.318,316.687)">
<path d="M0.333,-0.496C0.316,-0.496 0.296,-0.484 0.275,-0.46C0.253,-0.435 0.231,-0.402 0.209,-0.361C0.186,-0.319 0.165,-0.272 0.146,-0.22C0.126,-0.168 0.109,-0.114 0.096,-0.058L0.113,-0.166C0.142,-0.253 0.17,-0.324 0.197,-0.377C0.224,-0.43 0.251,-0.468 0.278,-0.492C0.305,-0.516 0.333,-0.528 0.362,-0.528C0.393,-0.528 0.419,-0.516 0.438,-0.493C0.457,-0.47 0.466,-0.434 0.466,-0.387C0.466,-0.357 0.462,-0.324 0.454,-0.288C0.445,-0.252 0.433,-0.216 0.417,-0.181C0.4,-0.146 0.38,-0.113 0.357,-0.084C0.333,-0.054 0.306,-0.03 0.275,-0.013C0.244,0.005 0.21,0.014 0.173,0.014C0.153,0.014 0.135,0.008 0.119,-0.004C0.104,-0.016 0.093,-0.033 0.088,-0.056L0.096,-0.076C0.105,-0.051 0.116,-0.034 0.129,-0.024C0.141,-0.014 0.155,-0.009 0.172,-0.009C0.195,-0.009 0.216,-0.018 0.237,-0.035C0.258,-0.053 0.277,-0.077 0.294,-0.106C0.311,-0.135 0.327,-0.168 0.34,-0.203C0.353,-0.239 0.363,-0.275 0.37,-0.311C0.377,-0.346 0.38,-0.379 0.38,-0.409C0.38,-0.438 0.376,-0.46 0.368,-0.474C0.359,-0.489 0.348,-0.496 0.333,-0.496ZM0.1,-0.062C0.084,-0.049 0.068,-0.037 0.052,-0.024C0.036,-0.011 0.02,0.003 0.004,0.016L-0.011,0.009C-0.006,-0 -0.002,-0.01 0.001,-0.02C0.004,-0.029 0.006,-0.039 0.008,-0.049L0.183,-0.667C0.188,-0.69 0.187,-0.706 0.18,-0.717C0.173,-0.728 0.153,-0.733 0.12,-0.733L0.125,-0.754C0.162,-0.755 0.194,-0.758 0.222,-0.765C0.25,-0.773 0.276,-0.782 0.301,-0.795L0.1,-0.062Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
<g transform="matrix(144,0,0,144,751.894,316.687)">
<path d="M0.102,-0.085C0.097,-0.066 0.095,-0.051 0.097,-0.04C0.099,-0.029 0.106,-0.023 0.119,-0.023C0.132,-0.023 0.145,-0.031 0.157,-0.046C0.168,-0.061 0.181,-0.087 0.194,-0.125L0.207,-0.162L0.226,-0.162L0.201,-0.089C0.192,-0.064 0.182,-0.043 0.17,-0.029C0.157,-0.014 0.144,-0.003 0.129,0.004C0.114,0.011 0.098,0.014 0.081,0.014C0.059,0.014 0.043,0.01 0.033,0.001C0.022,-0.007 0.016,-0.018 0.014,-0.032C0.011,-0.046 0.012,-0.061 0.015,-0.078C0.018,-0.094 0.021,-0.11 0.026,-0.126L0.189,-0.667C0.196,-0.69 0.195,-0.706 0.187,-0.717C0.179,-0.728 0.159,-0.733 0.126,-0.733L0.133,-0.754C0.17,-0.755 0.202,-0.758 0.23,-0.765C0.258,-0.773 0.285,-0.782 0.311,-0.795L0.102,-0.085Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
<g transform="matrix(144,0,0,144,791.782,316.687)">
<path d="M0.084,-0.227C0.121,-0.24 0.155,-0.252 0.186,-0.265C0.216,-0.277 0.24,-0.29 0.258,-0.304C0.282,-0.323 0.301,-0.347 0.315,-0.374C0.329,-0.401 0.336,-0.431 0.336,-0.464C0.336,-0.483 0.335,-0.496 0.332,-0.501C0.329,-0.506 0.325,-0.509 0.32,-0.509C0.303,-0.509 0.285,-0.502 0.266,-0.487C0.247,-0.472 0.228,-0.452 0.209,-0.427C0.19,-0.401 0.173,-0.372 0.158,-0.339C0.142,-0.306 0.129,-0.272 0.12,-0.234C0.111,-0.198 0.106,-0.161 0.106,-0.124C0.106,-0.09 0.112,-0.066 0.125,-0.051C0.138,-0.035 0.154,-0.028 0.175,-0.028C0.199,-0.028 0.224,-0.035 0.251,-0.05C0.278,-0.065 0.304,-0.091 0.329,-0.128L0.345,-0.12C0.332,-0.098 0.316,-0.077 0.295,-0.056C0.274,-0.035 0.251,-0.019 0.226,-0.006C0.2,0.007 0.173,0.014 0.144,0.014C0.117,0.014 0.094,0.009 0.074,-0.002C0.054,-0.013 0.039,-0.029 0.028,-0.05C0.017,-0.07 0.012,-0.096 0.012,-0.127C0.012,-0.156 0.017,-0.188 0.028,-0.224C0.039,-0.259 0.054,-0.295 0.074,-0.331C0.093,-0.366 0.117,-0.399 0.144,-0.429C0.171,-0.459 0.202,-0.483 0.235,-0.501C0.268,-0.519 0.304,-0.528 0.342,-0.528C0.363,-0.528 0.38,-0.523 0.395,-0.511C0.409,-0.5 0.416,-0.484 0.416,-0.462C0.416,-0.435 0.408,-0.41 0.393,-0.388C0.377,-0.365 0.356,-0.344 0.331,-0.325C0.305,-0.306 0.277,-0.289 0.247,-0.274C0.217,-0.259 0.188,-0.247 0.159,-0.236C0.13,-0.225 0.105,-0.217 0.083,-0.21L0.084,-0.227Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
<g transform="matrix(144,0,0,144,853.558,316.687)">
<path d="M0.535,-0.21C0.531,-0.199 0.527,-0.187 0.523,-0.173C0.519,-0.159 0.515,-0.144 0.51,-0.128C0.507,-0.115 0.502,-0.097 0.497,-0.074C0.492,-0.05 0.487,-0.025 0.483,-0C0.449,-0.001 0.411,-0.002 0.368,-0.003C0.325,-0.003 0.287,-0.003 0.254,-0.003L0.198,-0.003C0.174,-0.003 0.15,-0.003 0.123,-0.003C0.096,-0.002 0.069,-0.002 0.042,-0.002C0.015,-0.001 -0.011,-0.001 -0.035,-0L-0.03,-0.02C-0.007,-0.021 0.01,-0.024 0.023,-0.028C0.036,-0.032 0.046,-0.04 0.053,-0.052C0.059,-0.064 0.066,-0.082 0.073,-0.106L0.206,-0.602C0.213,-0.627 0.216,-0.645 0.215,-0.657C0.214,-0.668 0.208,-0.676 0.198,-0.681C0.187,-0.685 0.171,-0.687 0.148,-0.688L0.153,-0.708C0.167,-0.707 0.185,-0.707 0.208,-0.706C0.231,-0.705 0.255,-0.705 0.281,-0.705C0.304,-0.705 0.328,-0.705 0.35,-0.706C0.374,-0.707 0.393,-0.707 0.408,-0.708L0.403,-0.688C0.38,-0.687 0.363,-0.685 0.35,-0.681C0.337,-0.676 0.327,-0.668 0.32,-0.657C0.313,-0.645 0.306,-0.627 0.299,-0.602L0.166,-0.106C0.159,-0.082 0.157,-0.064 0.158,-0.052C0.159,-0.04 0.164,-0.032 0.175,-0.029C0.186,-0.025 0.202,-0.023 0.225,-0.023L0.298,-0.023C0.34,-0.023 0.374,-0.029 0.399,-0.041C0.424,-0.053 0.445,-0.073 0.462,-0.1C0.478,-0.127 0.495,-0.164 0.512,-0.21L0.535,-0.21Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
<g transform="matrix(144,0,0,144,937.942,316.687)">
<path d="M0.397,-0.346C0.373,-0.279 0.35,-0.223 0.328,-0.177C0.306,-0.131 0.284,-0.094 0.263,-0.066C0.241,-0.038 0.219,-0.018 0.197,-0.005C0.174,0.008 0.151,0.014 0.127,0.014C0.098,0.014 0.076,0.007 0.063,-0.006C0.05,-0.019 0.043,-0.037 0.043,-0.06C0.043,-0.083 0.048,-0.108 0.057,-0.137L0.154,-0.429C0.161,-0.449 0.163,-0.464 0.161,-0.475C0.159,-0.486 0.151,-0.491 0.138,-0.491C0.125,-0.491 0.113,-0.484 0.101,-0.47C0.088,-0.456 0.075,-0.429 0.061,-0.389L0.048,-0.352L0.029,-0.352L0.054,-0.425C0.064,-0.453 0.076,-0.474 0.09,-0.489C0.103,-0.504 0.117,-0.514 0.133,-0.52C0.148,-0.525 0.162,-0.528 0.175,-0.528C0.204,-0.528 0.224,-0.521 0.234,-0.507C0.243,-0.494 0.247,-0.476 0.245,-0.455C0.242,-0.434 0.237,-0.411 0.229,-0.388L0.134,-0.102C0.115,-0.046 0.123,-0.018 0.156,-0.018C0.172,-0.018 0.189,-0.025 0.207,-0.04C0.225,-0.054 0.243,-0.075 0.262,-0.102C0.281,-0.129 0.299,-0.161 0.318,-0.199C0.336,-0.236 0.354,-0.278 0.371,-0.325C0.388,-0.371 0.403,-0.421 0.417,-0.474L0.397,-0.346ZM0.394,-0.085C0.389,-0.067 0.387,-0.052 0.388,-0.041C0.388,-0.029 0.395,-0.023 0.408,-0.023C0.423,-0.023 0.436,-0.031 0.449,-0.047C0.461,-0.062 0.473,-0.088 0.486,-0.125L0.499,-0.162L0.518,-0.162L0.493,-0.089C0.484,-0.061 0.472,-0.04 0.459,-0.025C0.445,-0.01 0.431,-0 0.416,0.005C0.401,0.011 0.386,0.014 0.372,0.014C0.361,0.014 0.351,0.012 0.342,0.007C0.333,0.002 0.326,-0.004 0.321,-0.013C0.316,-0.024 0.314,-0.039 0.316,-0.056C0.317,-0.073 0.322,-0.097 0.329,-0.126L0.427,-0.514C0.444,-0.515 0.46,-0.516 0.475,-0.518C0.491,-0.52 0.505,-0.523 0.518,-0.528L0.394,-0.085Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
<g transform="matrix(144,0,0,144,1019.59,316.687)">
<path d="M0.322,-0.078C0.325,-0.061 0.329,-0.049 0.335,-0.042C0.34,-0.035 0.347,-0.032 0.356,-0.032C0.366,-0.032 0.376,-0.038 0.387,-0.05C0.398,-0.061 0.41,-0.086 0.423,-0.124L0.436,-0.161L0.455,-0.161L0.43,-0.088C0.421,-0.061 0.41,-0.041 0.398,-0.026C0.385,-0.011 0.372,-0.001 0.359,0.005C0.345,0.011 0.331,0.014 0.316,0.014C0.295,0.014 0.277,0.007 0.262,-0.006C0.247,-0.019 0.237,-0.043 0.233,-0.078L0.193,-0.436C0.19,-0.453 0.186,-0.465 0.181,-0.472C0.175,-0.479 0.168,-0.482 0.159,-0.482C0.152,-0.482 0.146,-0.48 0.139,-0.475C0.132,-0.47 0.124,-0.461 0.117,-0.448C0.11,-0.435 0.101,-0.415 0.092,-0.39L0.079,-0.353L0.06,-0.353L0.085,-0.426C0.095,-0.453 0.106,-0.473 0.118,-0.488C0.13,-0.503 0.143,-0.513 0.157,-0.519C0.171,-0.525 0.185,-0.528 0.199,-0.528C0.222,-0.528 0.241,-0.522 0.255,-0.508C0.269,-0.496 0.278,-0.471 0.282,-0.436L0.322,-0.078ZM0.406,-0.467C0.385,-0.448 0.367,-0.427 0.352,-0.402C0.337,-0.377 0.324,-0.353 0.313,-0.328C0.302,-0.303 0.293,-0.28 0.286,-0.259L0.266,-0.26C0.271,-0.273 0.276,-0.288 0.282,-0.305C0.288,-0.321 0.295,-0.338 0.304,-0.356C0.313,-0.374 0.323,-0.393 0.336,-0.411C0.348,-0.431 0.362,-0.449 0.378,-0.467C0.397,-0.489 0.415,-0.505 0.43,-0.514C0.445,-0.523 0.461,-0.528 0.478,-0.528C0.491,-0.528 0.501,-0.525 0.509,-0.518C0.518,-0.511 0.522,-0.502 0.522,-0.491C0.522,-0.478 0.517,-0.467 0.507,-0.458C0.498,-0.448 0.485,-0.443 0.469,-0.443C0.454,-0.443 0.442,-0.446 0.431,-0.452C0.42,-0.457 0.412,-0.462 0.406,-0.467ZM0.081,-0.047C0.112,-0.076 0.14,-0.109 0.164,-0.148C0.188,-0.187 0.206,-0.222 0.219,-0.255L0.236,-0.251C0.229,-0.233 0.221,-0.213 0.211,-0.191C0.2,-0.169 0.187,-0.146 0.171,-0.122C0.155,-0.098 0.135,-0.073 0.112,-0.048C0.092,-0.027 0.074,-0.012 0.058,-0.002C0.042,0.009 0.026,0.014 0.011,0.014C-0.004,0.014 -0.015,0.011 -0.022,0.004C-0.03,-0.003 -0.034,-0.012 -0.034,-0.023C-0.034,-0.036 -0.029,-0.047 -0.019,-0.057C-0.009,-0.066 0.003,-0.071 0.018,-0.071C0.033,-0.071 0.046,-0.068 0.056,-0.063C0.066,-0.058 0.074,-0.052 0.081,-0.047Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
<g transform="matrix(144,0,0,144,1095.33,316.687)">
<path d="M0.397,-0.346C0.373,-0.279 0.35,-0.223 0.328,-0.177C0.306,-0.131 0.284,-0.094 0.263,-0.066C0.241,-0.038 0.219,-0.018 0.197,-0.005C0.174,0.008 0.151,0.014 0.127,0.014C0.098,0.014 0.076,0.007 0.063,-0.006C0.05,-0.019 0.043,-0.037 0.043,-0.06C0.043,-0.083 0.048,-0.108 0.057,-0.137L0.154,-0.429C0.161,-0.449 0.163,-0.464 0.161,-0.475C0.159,-0.486 0.151,-0.491 0.138,-0.491C0.125,-0.491 0.113,-0.484 0.101,-0.47C0.088,-0.456 0.075,-0.429 0.061,-0.389L0.048,-0.352L0.029,-0.352L0.054,-0.425C0.064,-0.453 0.076,-0.474 0.09,-0.489C0.103,-0.504 0.117,-0.514 0.133,-0.52C0.148,-0.525 0.162,-0.528 0.175,-0.528C0.204,-0.528 0.224,-0.521 0.234,-0.507C0.243,-0.494 0.247,-0.476 0.245,-0.455C0.242,-0.434 0.237,-0.411 0.229,-0.388L0.134,-0.102C0.115,-0.046 0.123,-0.018 0.156,-0.018C0.172,-0.018 0.189,-0.025 0.207,-0.04C0.225,-0.054 0.243,-0.075 0.262,-0.102C0.281,-0.129 0.299,-0.161 0.318,-0.199C0.336,-0.236 0.354,-0.278 0.371,-0.325C0.388,-0.371 0.403,-0.421 0.417,-0.474L0.397,-0.346ZM0.394,-0.085C0.389,-0.067 0.387,-0.052 0.388,-0.041C0.388,-0.029 0.395,-0.023 0.408,-0.023C0.423,-0.023 0.436,-0.031 0.449,-0.047C0.461,-0.062 0.473,-0.088 0.486,-0.125L0.499,-0.162L0.518,-0.162L0.493,-0.089C0.484,-0.061 0.472,-0.04 0.459,-0.025C0.445,-0.01 0.431,-0 0.416,0.005C0.401,0.011 0.386,0.014 0.372,0.014C0.361,0.014 0.351,0.012 0.342,0.007C0.333,0.002 0.326,-0.004 0.321,-0.013C0.316,-0.024 0.314,-0.039 0.316,-0.056C0.317,-0.073 0.322,-0.097 0.329,-0.126L0.427,-0.514C0.444,-0.515 0.46,-0.516 0.475,-0.518C0.491,-0.52 0.505,-0.523 0.518,-0.528L0.394,-0.085Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
<g transform="matrix(144,0,0,144,1176.98,316.687)">
<path d="M0.121,-0L0.034,-0L0.154,-0.429C0.161,-0.452 0.163,-0.468 0.161,-0.477C0.158,-0.486 0.151,-0.491 0.14,-0.491C0.125,-0.491 0.112,-0.483 0.1,-0.468C0.088,-0.453 0.075,-0.426 0.062,-0.389L0.049,-0.352L0.03,-0.352L0.055,-0.425C0.065,-0.453 0.077,-0.474 0.091,-0.489C0.104,-0.504 0.118,-0.514 0.134,-0.52C0.149,-0.525 0.163,-0.528 0.176,-0.528C0.196,-0.528 0.21,-0.524 0.219,-0.515C0.227,-0.506 0.232,-0.495 0.233,-0.481C0.234,-0.467 0.233,-0.452 0.23,-0.436C0.227,-0.419 0.223,-0.403 0.219,-0.388L0.121,-0ZM0.378,-0.503C0.363,-0.503 0.347,-0.496 0.331,-0.482C0.314,-0.467 0.298,-0.447 0.281,-0.42C0.264,-0.393 0.247,-0.36 0.23,-0.323C0.213,-0.285 0.196,-0.243 0.18,-0.197C0.163,-0.151 0.147,-0.101 0.132,-0.048L0.157,-0.176C0.179,-0.241 0.2,-0.296 0.219,-0.341C0.237,-0.386 0.256,-0.422 0.275,-0.45C0.294,-0.477 0.313,-0.497 0.333,-0.509C0.352,-0.522 0.373,-0.528 0.395,-0.528C0.414,-0.528 0.428,-0.523 0.439,-0.512C0.449,-0.501 0.454,-0.488 0.454,-0.471C0.454,-0.458 0.451,-0.446 0.444,-0.435C0.437,-0.424 0.429,-0.415 0.419,-0.408C0.408,-0.402 0.397,-0.399 0.384,-0.399C0.373,-0.399 0.363,-0.402 0.356,-0.408C0.348,-0.415 0.344,-0.424 0.344,-0.435C0.344,-0.446 0.346,-0.455 0.35,-0.464C0.354,-0.472 0.359,-0.479 0.366,-0.485C0.373,-0.491 0.38,-0.496 0.389,-0.499C0.388,-0.5 0.386,-0.501 0.385,-0.502C0.383,-0.503 0.381,-0.503 0.378,-0.503Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
<g transform="matrix(144,0,0,144,1238.33,316.687)">
<path d="M0.283,-0.04L0.216,0.033L0.14,-0.427C0.137,-0.448 0.133,-0.462 0.128,-0.47C0.123,-0.478 0.117,-0.482 0.108,-0.482C0.101,-0.482 0.092,-0.476 0.083,-0.465C0.074,-0.453 0.062,-0.428 0.049,-0.39L0.036,-0.353L0.017,-0.353L0.042,-0.426C0.056,-0.467 0.073,-0.494 0.094,-0.507C0.115,-0.521 0.136,-0.528 0.157,-0.528C0.178,-0.528 0.194,-0.522 0.205,-0.508C0.216,-0.496 0.224,-0.471 0.229,-0.436L0.283,-0.04ZM0.064,0.141C0.093,0.126 0.123,0.105 0.156,0.078C0.188,0.052 0.221,0.017 0.256,-0.028C0.295,-0.078 0.331,-0.134 0.364,-0.197C0.396,-0.259 0.418,-0.322 0.431,-0.385C0.42,-0.391 0.409,-0.399 0.397,-0.407C0.384,-0.417 0.374,-0.427 0.366,-0.44C0.358,-0.452 0.354,-0.466 0.355,-0.481C0.356,-0.496 0.362,-0.508 0.371,-0.516C0.38,-0.524 0.392,-0.528 0.406,-0.528C0.424,-0.528 0.437,-0.521 0.446,-0.507C0.454,-0.494 0.458,-0.474 0.458,-0.447C0.458,-0.413 0.452,-0.377 0.441,-0.338C0.43,-0.299 0.414,-0.259 0.396,-0.219C0.377,-0.179 0.355,-0.141 0.332,-0.103C0.309,-0.067 0.285,-0.033 0.261,-0.003C0.25,0.01 0.236,0.027 0.217,0.047C0.198,0.067 0.176,0.087 0.151,0.108C0.125,0.129 0.096,0.148 0.064,0.163C0.044,0.172 0.027,0.179 0.013,0.182C-0.002,0.186 -0.014,0.188 -0.023,0.188C-0.036,0.188 -0.048,0.184 -0.058,0.177C-0.068,0.17 -0.073,0.16 -0.073,0.147C-0.073,0.132 -0.067,0.121 -0.056,0.113C-0.045,0.106 -0.033,0.102 -0.019,0.102C-0.004,0.102 0.011,0.106 0.025,0.114C0.038,0.122 0.051,0.131 0.064,0.141Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
<g transform="matrix(144,0,0,144,1307.59,316.687)">
<path d="M0.412,-0.707C0.475,-0.707 0.523,-0.695 0.554,-0.672C0.585,-0.649 0.6,-0.618 0.6,-0.579C0.6,-0.545 0.59,-0.515 0.57,-0.488C0.55,-0.461 0.524,-0.438 0.493,-0.419C0.462,-0.4 0.429,-0.385 0.395,-0.374C0.456,-0.364 0.499,-0.344 0.523,-0.315C0.547,-0.285 0.559,-0.25 0.559,-0.211C0.559,-0.175 0.55,-0.144 0.533,-0.117C0.516,-0.091 0.493,-0.069 0.464,-0.052C0.435,-0.035 0.403,-0.022 0.368,-0.013C0.333,-0.004 0.297,-0 0.261,-0C0.236,-0 0.209,-0.001 0.182,-0.002C0.155,-0.003 0.124,-0.003 0.089,-0.003C0.074,-0.003 0.058,-0.003 0.043,-0.003C0.028,-0.002 0.014,-0.002 0.001,-0.002C-0.012,-0.001 -0.024,-0.001 -0.033,-0L-0.029,-0.02C-0.006,-0.021 0.011,-0.024 0.024,-0.028C0.037,-0.032 0.047,-0.04 0.054,-0.052C0.061,-0.064 0.068,-0.082 0.074,-0.106L0.206,-0.602C0.211,-0.622 0.213,-0.638 0.214,-0.651C0.215,-0.663 0.21,-0.672 0.201,-0.679C0.191,-0.685 0.173,-0.688 0.147,-0.688L0.152,-0.708C0.161,-0.707 0.172,-0.707 0.185,-0.707C0.198,-0.706 0.212,-0.706 0.227,-0.706C0.242,-0.705 0.256,-0.705 0.271,-0.705C0.294,-0.705 0.318,-0.705 0.341,-0.706C0.364,-0.707 0.387,-0.707 0.412,-0.707ZM0.222,-0.359L0.226,-0.376L0.304,-0.376C0.345,-0.376 0.38,-0.385 0.409,-0.404C0.438,-0.422 0.461,-0.446 0.477,-0.476C0.493,-0.506 0.501,-0.538 0.501,-0.572C0.501,-0.611 0.493,-0.641 0.475,-0.66C0.459,-0.679 0.431,-0.688 0.393,-0.688C0.364,-0.688 0.343,-0.684 0.331,-0.675C0.319,-0.666 0.309,-0.646 0.302,-0.617L0.167,-0.106C0.162,-0.086 0.159,-0.07 0.159,-0.058C0.158,-0.045 0.162,-0.036 0.171,-0.031C0.18,-0.026 0.195,-0.023 0.218,-0.023C0.277,-0.023 0.324,-0.031 0.359,-0.047C0.394,-0.063 0.419,-0.086 0.435,-0.117C0.451,-0.147 0.459,-0.183 0.459,-0.226C0.459,-0.254 0.454,-0.278 0.444,-0.298C0.434,-0.317 0.419,-0.332 0.398,-0.343C0.377,-0.354 0.349,-0.359 0.316,-0.359L0.222,-0.359Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
<g transform="matrix(144,0,0,144,1398.6,316.687)">
<path d="M0.132,-0.018C0.148,-0.018 0.166,-0.028 0.187,-0.049C0.208,-0.069 0.229,-0.096 0.25,-0.131C0.271,-0.166 0.291,-0.205 0.309,-0.249C0.327,-0.293 0.341,-0.339 0.352,-0.386L0.335,-0.278C0.31,-0.207 0.284,-0.151 0.259,-0.108C0.234,-0.065 0.208,-0.034 0.182,-0.015C0.156,0.004 0.13,0.014 0.103,0.014C0.072,0.014 0.048,0.003 0.033,-0.02C0.017,-0.043 0.009,-0.072 0.009,-0.107C0.009,-0.139 0.014,-0.174 0.025,-0.212C0.036,-0.249 0.051,-0.287 0.07,-0.324C0.089,-0.361 0.11,-0.395 0.135,-0.426C0.16,-0.457 0.187,-0.481 0.216,-0.5C0.245,-0.519 0.274,-0.528 0.304,-0.528C0.327,-0.528 0.345,-0.517 0.358,-0.494C0.37,-0.47 0.372,-0.438 0.365,-0.397L0.354,-0.391C0.359,-0.426 0.356,-0.455 0.347,-0.476C0.338,-0.498 0.322,-0.509 0.301,-0.509C0.284,-0.509 0.266,-0.5 0.247,-0.484C0.228,-0.467 0.209,-0.444 0.192,-0.414C0.174,-0.386 0.158,-0.353 0.143,-0.317C0.129,-0.281 0.118,-0.244 0.11,-0.205C0.101,-0.167 0.097,-0.13 0.097,-0.095C0.097,-0.066 0.1,-0.046 0.107,-0.035C0.113,-0.024 0.121,-0.018 0.132,-0.018ZM0.384,-0.514C0.4,-0.515 0.416,-0.516 0.432,-0.518C0.448,-0.52 0.463,-0.523 0.476,-0.528L0.351,-0.086C0.35,-0.08 0.348,-0.072 0.345,-0.063C0.343,-0.053 0.343,-0.044 0.345,-0.036C0.348,-0.028 0.355,-0.024 0.366,-0.024C0.379,-0.024 0.392,-0.031 0.405,-0.046C0.418,-0.061 0.43,-0.087 0.443,-0.126L0.455,-0.163L0.474,-0.163L0.449,-0.09C0.44,-0.063 0.429,-0.043 0.416,-0.028C0.403,-0.013 0.389,-0.002 0.375,0.004C0.361,0.011 0.347,0.014 0.334,0.014C0.308,0.014 0.29,0.005 0.279,-0.012C0.27,-0.027 0.268,-0.045 0.272,-0.066C0.276,-0.086 0.281,-0.106 0.286,-0.127L0.384,-0.514Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
<g transform="matrix(144,0,0,144,1473.91,316.687)">
<path d="M0.216,-0.225L0.241,-0.224C0.217,-0.211 0.195,-0.199 0.174,-0.188C0.154,-0.177 0.138,-0.166 0.125,-0.157C0.112,-0.148 0.106,-0.139 0.106,-0.13C0.106,-0.123 0.111,-0.117 0.12,-0.112C0.129,-0.106 0.145,-0.1 0.166,-0.095L0.239,-0.076C0.26,-0.071 0.28,-0.065 0.297,-0.058C0.314,-0.051 0.327,-0.042 0.337,-0.031C0.347,-0.02 0.352,-0.006 0.352,0.011C0.352,0.028 0.346,0.046 0.336,0.067C0.325,0.088 0.308,0.109 0.284,0.128C0.262,0.147 0.232,0.163 0.195,0.176C0.158,0.189 0.114,0.195 0.062,0.195C0.027,0.195 -0.002,0.192 -0.025,0.185C-0.049,0.179 -0.067,0.17 -0.078,0.159C-0.09,0.148 -0.096,0.135 -0.096,0.12C-0.096,0.109 -0.093,0.098 -0.087,0.086C-0.081,0.075 -0.072,0.063 -0.06,0.052C-0.049,0.041 -0.034,0.031 -0.016,0.021C0.001,0.012 0.022,0.004 0.046,-0.003L0.053,0.012C0.028,0.025 0.011,0.039 0.002,0.055C-0.007,0.071 -0.012,0.087 -0.012,0.103C-0.012,0.13 -0.003,0.149 0.016,0.16C0.035,0.172 0.058,0.178 0.085,0.178C0.107,0.178 0.13,0.174 0.153,0.167C0.176,0.16 0.198,0.151 0.218,0.139C0.238,0.128 0.254,0.114 0.266,0.099C0.278,0.084 0.284,0.068 0.284,0.051C0.284,0.041 0.281,0.034 0.275,0.031C0.268,0.028 0.258,0.024 0.243,0.021L0.09,-0.018C0.074,-0.022 0.061,-0.029 0.051,-0.039C0.041,-0.048 0.036,-0.061 0.036,-0.078C0.036,-0.091 0.041,-0.105 0.05,-0.119C0.059,-0.133 0.077,-0.149 0.103,-0.166C0.129,-0.183 0.167,-0.202 0.216,-0.225ZM0.267,-0.51C0.246,-0.51 0.228,-0.504 0.213,-0.492C0.198,-0.479 0.186,-0.464 0.177,-0.445C0.167,-0.426 0.16,-0.406 0.155,-0.385C0.15,-0.364 0.146,-0.345 0.144,-0.329C0.142,-0.312 0.141,-0.299 0.141,-0.291C0.141,-0.27 0.146,-0.254 0.156,-0.245C0.165,-0.236 0.178,-0.231 0.194,-0.231C0.219,-0.231 0.24,-0.239 0.256,-0.254C0.271,-0.269 0.283,-0.288 0.292,-0.311C0.301,-0.334 0.307,-0.356 0.31,-0.379C0.313,-0.402 0.314,-0.421 0.314,-0.436C0.314,-0.459 0.311,-0.477 0.305,-0.49C0.299,-0.503 0.286,-0.51 0.267,-0.51ZM0.271,-0.528C0.31,-0.528 0.342,-0.519 0.367,-0.501C0.391,-0.484 0.403,-0.455 0.403,-0.416C0.403,-0.384 0.394,-0.352 0.376,-0.321C0.358,-0.29 0.333,-0.264 0.3,-0.244C0.267,-0.223 0.229,-0.213 0.184,-0.213C0.147,-0.213 0.117,-0.222 0.092,-0.239C0.067,-0.257 0.054,-0.285 0.054,-0.322C0.054,-0.34 0.058,-0.361 0.066,-0.385C0.073,-0.408 0.085,-0.431 0.102,-0.453C0.119,-0.474 0.141,-0.492 0.169,-0.506C0.196,-0.521 0.23,-0.528 0.271,-0.528ZM0.342,-0.476L0.324,-0.483C0.333,-0.506 0.349,-0.526 0.372,-0.543C0.395,-0.56 0.418,-0.569 0.443,-0.569C0.46,-0.569 0.474,-0.564 0.485,-0.555C0.496,-0.545 0.501,-0.53 0.501,-0.509C0.501,-0.49 0.496,-0.477 0.487,-0.468C0.478,-0.459 0.468,-0.455 0.457,-0.455C0.446,-0.455 0.436,-0.459 0.427,-0.466C0.417,-0.472 0.411,-0.484 0.409,-0.499C0.407,-0.514 0.411,-0.534 0.422,-0.558L0.435,-0.555C0.407,-0.544 0.387,-0.533 0.375,-0.522C0.363,-0.51 0.352,-0.495 0.342,-0.476Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
<g transform="matrix(144,0,0,144,1538.57,316.687)">
<path d="M0.059,-0.015C0.064,-0.012 0.07,-0.01 0.077,-0.009C0.083,-0.007 0.092,-0.006 0.105,-0.006C0.134,-0.006 0.159,-0.015 0.178,-0.033C0.197,-0.05 0.206,-0.076 0.206,-0.109C0.206,-0.13 0.202,-0.15 0.195,-0.171C0.187,-0.191 0.173,-0.214 0.154,-0.241C0.139,-0.262 0.124,-0.284 0.11,-0.307C0.096,-0.329 0.089,-0.355 0.089,-0.386C0.089,-0.415 0.096,-0.44 0.11,-0.461C0.124,-0.482 0.143,-0.498 0.167,-0.51C0.19,-0.522 0.216,-0.528 0.244,-0.528C0.263,-0.528 0.282,-0.526 0.301,-0.521C0.32,-0.516 0.335,-0.508 0.347,-0.496C0.36,-0.483 0.366,-0.465 0.366,-0.441C0.366,-0.435 0.365,-0.428 0.362,-0.42C0.359,-0.411 0.354,-0.404 0.347,-0.398C0.34,-0.392 0.331,-0.389 0.32,-0.389C0.309,-0.389 0.3,-0.393 0.292,-0.401C0.284,-0.408 0.28,-0.418 0.28,-0.431C0.28,-0.443 0.282,-0.455 0.288,-0.466C0.293,-0.476 0.299,-0.487 0.308,-0.498C0.295,-0.506 0.279,-0.51 0.258,-0.51C0.233,-0.51 0.213,-0.502 0.196,-0.485C0.179,-0.468 0.171,-0.445 0.171,-0.415C0.171,-0.4 0.173,-0.386 0.178,-0.375C0.183,-0.363 0.19,-0.351 0.199,-0.338C0.207,-0.325 0.218,-0.309 0.231,-0.29C0.248,-0.265 0.262,-0.24 0.273,-0.217C0.284,-0.194 0.29,-0.169 0.29,-0.143C0.29,-0.112 0.282,-0.085 0.267,-0.062C0.251,-0.038 0.23,-0.019 0.204,-0.006C0.178,0.007 0.149,0.014 0.118,0.014C0.095,0.014 0.074,0.011 0.053,0.004C0.032,-0.003 0.016,-0.013 0.003,-0.028C-0.01,-0.042 -0.017,-0.061 -0.017,-0.085C-0.017,-0.094 -0.014,-0.104 -0.008,-0.115C-0.003,-0.125 0.007,-0.13 0.022,-0.13C0.038,-0.13 0.049,-0.124 0.056,-0.111C0.063,-0.098 0.066,-0.083 0.066,-0.067C0.066,-0.056 0.065,-0.047 0.064,-0.039C0.062,-0.03 0.06,-0.022 0.059,-0.015Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 34 KiB

9
frontend/public/aluxb.svg Executable file
View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 169 228" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g transform="matrix(1,0,0,1,-46.879,-1954.91)">
<g transform="matrix(0.427298,0,0,0.427298,-18.3682,1949.16)">
<path d="M546,380.24L518.559,236.32C530.879,226.801 537.598,210.558 534.239,194.32L524.719,146.16C519.68,120.961 497.278,102.48 471.52,102.48L428.399,102.484L428.399,91.843C428.399,48.722 393.118,13.445 350.001,13.445C306.881,13.445 271.603,48.726 271.603,91.843L271.603,102.484L229.044,102.484C203.282,102.484 180.884,120.964 175.845,146.164L166.326,194.324C162.967,210.562 169.685,226.246 182.006,235.765L154.002,380.245C150.08,399.284 155.123,418.886 167.443,434.007C179.763,449.128 198.244,457.527 217.841,457.527L277.763,457.527L341.603,541.527C343.841,544.328 346.642,546.007 350.564,546.007C353.923,546.007 357.283,544.328 359.525,541.527L423.365,457.527L483.287,457.527C502.889,457.527 520.807,449.129 533.127,434.007C544.881,418.886 549.924,399.288 546.002,380.245L546,380.24ZM293.44,92.4C293.44,61.041 318.639,35.841 349.999,35.841C381.359,35.841 406.558,61.04 406.558,92.4L406.558,103.041L293.438,103.041L293.44,92.4ZM187.6,199.36L197.119,151.2C199.92,136.079 213.357,124.88 229.041,124.88L471.521,124.88C487.201,124.88 500.08,136.079 503.443,151.2L512.963,199.36C515.201,209.438 509.041,219.52 499.522,222.88C454.721,236.88 403.202,244.72 350.562,244.72C297.922,244.72 246.402,237.439 201.602,222.88C190.961,219.521 185.36,209.442 187.602,199.36L187.6,199.36ZM403.2,391.44L445.2,391.44L376.88,481.6L403.2,391.44ZM350.001,495.6L319.763,391.44L380.243,391.44L350.001,495.6ZM402.079,369.6L386.958,334.881L423.919,334.881L446.88,369.6L402.079,369.6ZM362.88,334.877L378.001,369.6L322.001,369.6L337.122,334.881L362.88,334.877ZM297.923,369.6L253.122,369.6L276.083,334.881L313.044,334.881L297.923,369.6ZM296.802,391.44L323.122,481.6L254.802,391.44L296.802,391.44ZM515.202,419.999C506.803,430.077 495.042,435.679 482.163,435.679L439.042,435.679L476.003,386.96C478.804,383.038 478.804,377.999 476.561,374.081L439.041,317.522C436.803,314.721 433.44,312.483 430.081,312.483L270.481,312.479C266.559,312.479 263.199,314.159 261.52,317.518L224,374.077C221.199,377.999 221.761,383.038 224.558,386.956L261.519,435.675L218.398,435.675C205.519,435.675 193.199,430.073 184.796,419.995C176.398,409.917 173.034,397.034 175.835,384.155L202.155,245.275C246.956,258.716 297.917,265.994 349.995,265.994C402.073,265.994 453.035,258.713 497.835,245.275L524.155,384.155C526.96,397.038 523.601,409.921 515.198,419.999L515.202,419.999Z" style="fill:rgb(156,131,33);fill-rule:nonzero;"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

1
frontend/public/aluxw.svg Executable file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -10,6 +10,7 @@ import Success from './pages/Success.jsx';
import Cancel from './pages/Cancel.jsx'; import Cancel from './pages/Cancel.jsx';
import './App.css'; import './App.css';
import logo from '/affordableluxurywatches-logo.svg'; import logo from '/affordableluxurywatches-logo.svg';
import logoALUXB from '/affordableluxurybags-logo.svg';
// PayPal configuration // PayPal configuration
const paypalOptions = { const paypalOptions = {
@@ -38,12 +39,18 @@ function App() {
p={4} p={4}
gap={4} gap={4}
> >
<Image width="550px" src={logo} className="logo react" alt="React logo" /> <Image
<Center> width="550px"
<Button variant="outline" onClick={toggleColorMode} > src={import.meta.env.VITE_REACT_APP_WOOCOMMERCE_URL === "https://affordableluxurybags.is" ?
{colorMode === "light" ? <><LuSun /> Toggle Light mode</> : <><LuMoon /> Toogle Dark mode</>} logoALUXB : logo}
</Button> className="logo react"
</Center> alt="React logo"
/>
{/*<Center>*/}
{/* <Button variant="outline" onClick={toggleColorMode} >*/}
{/* {colorMode === "light" ? <><LuSun /> Toggle Light mode</> : <><LuMoon /> Toogle Dark mode</>}*/}
{/* </Button>*/}
{/*</Center>*/}
</Grid> </Grid>
<Flex direction="row" gap="4" justify="space-between" align="center" mb="10"> <Flex direction="row" gap="4" justify="space-between" align="center" mb="10">

View File

@@ -34,13 +34,25 @@ const OrderSummary = ({ orderData, loading, order }) => {
<DataList.ItemValue>{orderData.wc_order_id}</DataList.ItemValue> <DataList.ItemValue>{orderData.wc_order_id}</DataList.ItemValue>
</DataList.Item> </DataList.Item>
{ order.billing !== undefined && <> { order.billing !== undefined && <>
{/*<DataList.Item pt="4">*/}
{/* <DataList.ItemLabel>First Name</DataList.ItemLabel>*/}
{/* <DataList.ItemValue>{order.billing.first_name}</DataList.ItemValue>*/}
{/*</DataList.Item>*/}
{/*<DataList.Item pt="4">*/}
{/* <DataList.ItemLabel>Last Name</DataList.ItemLabel>*/}
{/* <DataList.ItemValue>{order.billing.last_name}</DataList.ItemValue>*/}
{/*</DataList.Item>*/}
<DataList.Item pt="4"> <DataList.Item pt="4">
<DataList.ItemLabel>First Name</DataList.ItemLabel> <DataList.ItemLabel>Shipping details</DataList.ItemLabel>
<DataList.ItemValue>{order.billing.first_name}</DataList.ItemValue> <DataList.ItemValue>
</DataList.Item> {order.shipping.first_name} {order.shipping.last_name}<br />
<DataList.Item pt="4"> {order.shipping.address_1}
<DataList.ItemLabel>Last Name</DataList.ItemLabel> {order.shipping.address_2 && `, ${order.shipping.address_2}`}
<DataList.ItemValue>{order.billing.last_name}</DataList.ItemValue> {`, ${order.shipping.city}`}
{`, ${order.shipping.postcode}`}
{order.shipping.state && `, ${order.shipping.state}`}
{`, ${order.shipping.country}`}
</DataList.ItemValue>
</DataList.Item> </DataList.Item>
<DataList.Item pt="4"> <DataList.Item pt="4">
<DataList.ItemLabel>E-mail</DataList.ItemLabel> <DataList.ItemLabel>E-mail</DataList.ItemLabel>
@@ -53,6 +65,7 @@ const OrderSummary = ({ orderData, loading, order }) => {
<DataList.ItemValue>{orderData.customer_email}</DataList.ItemValue> <DataList.ItemValue>{orderData.customer_email}</DataList.ItemValue>
</DataList.Item> </DataList.Item>
)}*/} )}*/}
{order.shipping.method &&
<DataList.Item pt="4"> <DataList.Item pt="4">
<DataList.ItemLabel> <DataList.ItemLabel>
<Badge colorPalette="teal" variant="solid"> <Badge colorPalette="teal" variant="solid">
@@ -60,7 +73,7 @@ const OrderSummary = ({ orderData, loading, order }) => {
</Badge> </Badge>
</DataList.ItemLabel> </DataList.ItemLabel>
<DataList.ItemValue>{formatCurrency(order.shipping.total, orderData.currency)}</DataList.ItemValue> <DataList.ItemValue>{formatCurrency(order.shipping.total, orderData.currency)}</DataList.ItemValue>
</DataList.Item> </DataList.Item> }
</> } </> }
<DataList.Item pt="4" textStyle="xl"> <DataList.Item pt="4" textStyle="xl">
<DataList.ItemLabel><strong>Total Amount:</strong></DataList.ItemLabel> <DataList.ItemLabel><strong>Total Amount:</strong></DataList.ItemLabel>

View File

@@ -1,13 +1,18 @@
import { Provider } from "@/components/ui/provider" import { Provider } from "@/components/ui/provider"
import { StrictMode } from 'react' import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client' import { createRoot } from 'react-dom/client'
import { ChakraProvider } from "@chakra-ui/react";
import { system } from "./theme";
import './index.css' import './index.css'
import App from './App.jsx' import App from './App.jsx'
import {ThemeProvider} from "next-themes";
createRoot(document.getElementById('root')).render( createRoot(document.getElementById('root')).render(
<StrictMode> <StrictMode>
<Provider> <ChakraProvider value={system}>
<App /> <ThemeProvider attribute="class" defaultTheme="light" enableSystem={false}>
</Provider> <App />
</ThemeProvider>
</ChakraProvider>
</StrictMode>, </StrictMode>,
) )

View File

@@ -16,20 +16,40 @@ const Cancel = () => {
const [searchParams] = useSearchParams(); const [searchParams] = useSearchParams();
const error = searchParams.get('error'); const error = searchParams.get('error');
const orderId = searchParams.get('order_id'); const orderId = searchParams.get('order_id') || searchParams.get('wc_order_id');
const paypalToken = searchParams.get('token'); const paypalToken = searchParams.get('token');
const orderTotal = searchParams.get('total');
const currency = searchParams.get('currency') || 'USD';
const description = searchParams.get('description');
const customerEmail = searchParams.get('customer_email');
const cancelUrl = searchParams.get('cancel_url'); const cancelUrl = searchParams.get('cancel_url');
const returnUrl = searchParams.get('return_url');
const formatCurrency = (amount, curr = 'USD') => {
return new Intl.NumberFormat('en-US', {
style: 'currency',
currency: curr,
}).format(parseFloat(amount));
};
const getErrorMessage = () => {
if (error) {
return decodeURIComponent(error);
}
return 'Your payment was cancelled. You can try again or choose a different payment method.';
};
const handleRetryPayment = () => { const handleRetryPayment = () => {
// Build the payment URL with original parameters
const paymentUrl = new URL('/payment', window.location.origin); const paymentUrl = new URL('/payment', window.location.origin);
if (orderId) { // Preserve all original order parameters
paymentUrl.searchParams.set('wc_order_id', orderId); if (orderId) paymentUrl.searchParams.set('wc_order_id', orderId);
// You might want to fetch original order details here if (orderTotal) paymentUrl.searchParams.set('total', orderTotal);
paymentUrl.searchParams.set('total', '25.99'); // This should come from order data if (currency) paymentUrl.searchParams.set('currency', currency);
} if (description) paymentUrl.searchParams.set('description', description);
if (customerEmail) paymentUrl.searchParams.set('customer_email', customerEmail);
if (returnUrl) paymentUrl.searchParams.set('return_url', returnUrl);
if (cancelUrl) paymentUrl.searchParams.set('cancel_url', cancelUrl);
window.location.href = paymentUrl.toString(); window.location.href = paymentUrl.toString();
}; };
@@ -41,7 +61,7 @@ const Cancel = () => {
<Alert.Content> <Alert.Content>
<Alert.Title>Payment Cancelled</Alert.Title> <Alert.Title>Payment Cancelled</Alert.Title>
<Alert.Description> <Alert.Description>
<Text>Your payment was cancelled. You can try again or choose a different payment method.</Text> <Text>{getErrorMessage()}</Text>
</Alert.Description> </Alert.Description>
</Alert.Content> </Alert.Content>
</Alert.Root> </Alert.Root>
@@ -63,6 +83,13 @@ const Cancel = () => {
<strong>Order ID:</strong> <strong>Order ID:</strong>
<span className="badge bg-secondary ms-2">{orderId}</span> <span className="badge bg-secondary ms-2">{orderId}</span>
<br/> <br/>
{orderTotal && (
<>
<strong>Order Total:</strong>
<span className="ms-2">{formatCurrency(orderTotal, currency)}</span>
<br/>
</>
)}
<small className="mt-2 d-block"> <small className="mt-2 d-block">
Your order is still pending. You can complete the payment to process your order. Your order is still pending. You can complete the payment to process your order.
</small> </small>
@@ -121,7 +148,7 @@ const Cancel = () => {
<Accordion.ItemIndicator/> <Accordion.ItemIndicator/>
</Accordion.ItemTrigger> </Accordion.ItemTrigger>
<Accordion.ItemContent> <Accordion.ItemContent>
<Accordion.ItemBody>Text</Accordion.ItemBody> <Accordion.ItemBody>Contact Support: Reach us anytime at {import.meta.env.VITE_REACT_APP_SUPPORT_EMAIL} or through live chat.</Accordion.ItemBody>
</Accordion.ItemContent> </Accordion.ItemContent>
</Accordion.Item> </Accordion.Item>
</Accordion.Root> </Accordion.Root>

View File

@@ -170,7 +170,7 @@ const Payment = () => {
return ( return (
<div> <div>
<Heading as="h1" fontSize="2xl" textAlign="center" mb="10">Secure Payment with PayPal</Heading> <Heading as="h1" fontSize="2xl" textAlign="center" mb="10">Secure Payment with PayPal or Credit/Debit Card</Heading>
{order.length === 0 ? {order.length === 0 ?
<Center> <Center>
<EmptyState.Root> <EmptyState.Root>
@@ -190,7 +190,7 @@ const Payment = () => {
<Grid <Grid
templateColumns={{ base: "1fr", md: "repeat(3, 1fr)" }} templateColumns={{ base: "1fr", md: "repeat(3, 1fr)" }}
templateRows="repeat(1, 1fr)" templateRows="repeat(1, 1fr)"
gap="6" // gap="6"
> >
<GridItem colSpan={2}> <GridItem colSpan={2}>
<Center> <Center>
@@ -248,8 +248,7 @@ const Payment = () => {
<Timeline.Title textStyle="sm">Estimated Delivery Date</Timeline.Title> <Timeline.Title textStyle="sm">Estimated Delivery Date</Timeline.Title>
<Timeline.Description>{getDateAfterDays(10)}</Timeline.Description> <Timeline.Description>{getDateAfterDays(10)}</Timeline.Description>
<Text textStyle="sm"> <Text textStyle="sm">
We will shipp your product via <strong>FedEx</strong> and it should We will ship our products via <strong>FedEx</strong> or any other <strong>Express Courier</strong> and it should arrive within 7-10 business days.
arrive within 7-10 business days.
</Text> </Text>
</Timeline.Content> </Timeline.Content>
</Timeline.Item> </Timeline.Item>

8
frontend/src/theme.js Normal file
View File

@@ -0,0 +1,8 @@
import { createSystem, defaultConfig, defineConfig } from "@chakra-ui/react";
const config = defineConfig({
// put tokens/recipes if you need; not required just to force light mode
theme: {},
});
export const system = createSystem(defaultConfig, config);