You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
text: `Hello,\n\nThank you for your recent purchase! Here is your brand new API key: ${key}\n\nPlease keep this key safe and secure. For security reasons, this key will only be displayed once.\n\nYou can find more details on how to use your API key in our documentation.\n\nIf you have any questions or require assistance, please don't hesitate to contact our support team.\n\nBest regards,\nThe Protoscan Vision Team`,
205
+
});
206
+
console.log(`API key successfully emailed to ${email} for user ${userId}`);
207
+
}
208
+
}catch(emailError){
209
+
console.error(`Failed to send API key email to ${email} for user ${userId}:`,emailError);
210
+
// Log the email sending failure. It's often best practice to still return a 200 OK
211
+
// to the webhook provider (Polar.sh) to prevent them from retrying the *purchase event*.
212
+
// A separate mechanism should be in place for handling failed email deliveries
0 commit comments