Closed talktohenryj closed 2 years ago
Hi @talktohenryj
This is not a app package issue, so I'm going to close this but please move this question over to the discussion tab.
If you wanted that code to run on every order, you'd need to hook into the order webhook, or create your own job that gets the orders every X mins/hours/days etc. There's a lot of ways to achieve it.
I am looking to create usage charges based on order amounts.
I have read the Usage Charge information in the wiki but I am still a bit confused.
How do I set a variable for the usage charge amount?
Below is the code I use to define the variable in one of my countrollers but where would I put it so Shopify charges the merchants this on every order?