I trying to do something for every purchase of corresponding product in easy digital download. Let say i need to add the auto random discount code for every purchase made in easy digital download. I tried with different hooks. But still i didn't get the correct callback on success process of paypal. Let i make it alert on success callback of paypal.
what i am trying is something like this
But i am not sure how to do this. I have the product which name as gift card let say $5. If the user purchased this gift card then he/she get the random code of discount for purchasing some other product in future. Can anyone tell me which hook is achieving the above criteria ?
Any Suggestion would be great thanks