How can I send an email if it fails and another one if the payment is correct?