Credits are calculated on the discounted item price, not the original price. If a discount code is applied to the product, the credit amount is reduced based on that lower price.
Shipping and taxes are excluded from the amount used to determine how many credits are earned.