Tyler purchased something on account. I'm using the gross method of recording.
1) Purchases xx
 Accounts Payable xx
2) Return of merchandise w/in discount period
 
 Accounts Payable 500
 Purchases 500
3) Payment of remaining merchandise w/in discount period
 Accounts Payable xx
 Cash xx
 Purchase discounts xx
Merchandise that can be discounted but returned w/in the discount period should be recorded with its original value.