made logic for receipt redirect after purchase in the js