3 ms·
I was looking for something like this recently to try to do some server-side validation of discount codes to automatically add things to a customer's cart if th
by amk_ 11y ago
I was looking for something like this recently to try to do some server-side validation of discount codes to automatically add things to a customer's cart if they have the right code on an ecommerce site. Typically ecommerce stores validate discount codes and payment info behind a secure layer on a different domain, so it's difficult to create any interactivity around your vouchers without pinging a secured server, unless you risk exposing your vouchers by embedding in the client side code. This would be really useful if it could be used to at least create codes on platforms like Shopify, so that you don't have to create them once on your site and once on Shopify.
Also... I hope you have a rate limiter.