App reviews, troubleshooting, and recommendations
I'm working on a Shopify Function that can apply discounts via line item property/attribute data that can be added via our app.
The point of using 'crypto' would be to ensure that bad actors couldn't tamper with the line item properties and receive discounts they didn't earn.
I've been playing around with the idea of hashing the line item property data and generating an HMAC to do this.
However, I cannot figure out how to import the "crypto" library into the Function environment.
A basic import like:
import crypto from 'crypto';
Results in the following error:
ERROR: Could not resolve "crypto"
What am I missing here?
I've seen this thread which seems related, but it also seems to relate directly to Remix.
Any ideas?
Thanks for any help / answers you can provide.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024