Is it illegal for a store employee to do this with payment?
It depends on employer's consent. The reason here is not fiduciary duty, but the principle of [employer's] freedom of contract. I assume the employer's policy of cash refusal is lawful and I will not address that item.
Fiduciary duty is not at stake here, since it is not clear that the arrangements you describe harm the employer's interests. Quite the contrary, a priori these agreements between employee and customer advance the employer's interests to the extent that customers' inability or refusal to pay in cash might dissuade them from buying at that store. As long as the employer obtains the compensation he required in the price tag, his interests are fully met.
These agreements between employee and customer are tantamount to reselling, which is not illegal in Canada except for some goods the Consumer Product Safety Act categorizes as dangerous. Likewise, resales of some goods might be subject to other restrictions. Example: Resale of tickets additionally requires the secondary seller (here the employee) to show the purchaser its origins and face value price, a condition which your description satisfies beforehand.
Instead, it is within employer's freedom of contract to refuse to enter contracts (i.e., to transact) with its employee(s). Using the employee's credit card evidences that the transaction is between employer and employee regardless of whether the employee uses or transfers the item(s) to a third party.
The employer might have valid reasons for refusing to enter these contracts with its employees. For instance, a customer might not fully understand the legal implications of transacting with a reseller, who happens to be an employee, when it comes to refunds insofar as the invoice reflects the reseller's credit card. The customer's misunderstanding and subsequent frustration --especially if the reseller/employee is uncooperative-- could lead the customer to conflate roles and ultimately have an unfairly negative opinion of the employer.
It is noteworthy that the refund scenario with uncooperative reseller is not actionable under a theory of fiduciary duty. It is not even actionable by the employer. It might be actionable --and under other legal theories-- only by the customer, toward whom the reseller/employee owes no fiduciary duty.
employees are at liberty to give 20% off discounts. What if the discount was applied, after the customer had been told the price and paid in cash?
In this scenario the employer has a lower incentive to consent to the arrangements, besides the fact that here the element of employee's discretion can have implications on his fiduciary duty toward the employer.
The employee's intent to maximize his personal profit tends to deter him from giving discounts to others (i.e., not to himself as reseller). The detriment to employer's interests is twofold. First, because the omission of discounts reduces customers' purchasing power which they might otherwise use for acquiring more products from the store.
And second, because a customer's awareness that others get a discount at the store --or lower prices elsewhere-- tends to dissuade that customer (and likely his acquaintances) from ever buying there again.
Although discounts are at employee's discretion, clearly the employer's reason for discounts is to attract customers. Therefore, it is in this hypothetical scenario of discretion-about-discount where the employee has a conflict of interest.