Hi
i am receiving duplicate payments on checkout !!can anyone help ??
Not sure if this is the reason, I could be way off here, or it could be a more complex issue.
Certain JS actions in OpenCart allow multi-fire. Click things like "Add to cart" and "Checkout Confirmation" and you will see the action is sent multiple times. We noticed a few duplicate charges on orders in the past because of this. People on slow net dont see the "loading" icon and click it again, resulting in running the payment through again.
Luckily, there is a dirty little CSS hack for the checkout confirmation button that prevents multifire by turning the "attention" loading icon into a full screen overlay. Since its an overlay, they cannot click the button again until the loading icon goes away, or until they are redirected to the order complete areas.
Here is the code, should work in any stylesheet you desire
Hope thats the reason you're seeing duplicates and that its not something more serious.
Certain JS actions in OpenCart allow multi-fire. Click things like "Add to cart" and "Checkout Confirmation" and you will see the action is sent multiple times. We noticed a few duplicate charges on orders in the past because of this. People on slow net dont see the "loading" icon and click it again, resulting in running the payment through again.
Luckily, there is a dirty little CSS hack for the checkout confirmation button that prevents multifire by turning the "attention" loading icon into a full screen overlay. Since its an overlay, they cannot click the button again until the loading icon goes away, or until they are redirected to the order complete areas.
Here is the code, should work in any stylesheet you desire
Code: Select all
.checkout .checkout-content .payment .attention {
position: fixed;
z-index: 9999;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.60);
border: none;
}
.checkout .checkout-content .payment .attention * {
position: fixed;
z-index: 9999;
top: 50%;
left: 50%;
}
https://creadev.org | support@creadev.org - Opencart Extensions, Integrations, & Development. Made in the USA.
Who is online
Users browsing this forum: No registered users and 107 guests