aboutsummaryrefslogtreecommitdiffstats
path: root/license-generator/src/purchaser.rs
diff options
context:
space:
mode:
authorTeddy Wing2018-11-19 19:12:52 +0100
committerTeddy Wing2018-11-19 19:58:42 +0100
commit027fe4276a79a453f27ed9048bb32cc928f3e29b (patch)
treea2bbc9c48e866d1e89262b3c87ca4feb2c3824d1 /license-generator/src/purchaser.rs
parent0bc161c20f283d641919d8f369d309d1fc9081b6 (diff)
downloaddome-key-web-027fe4276a79a453f27ed9048bb32cc928f3e29b.tar.bz2
license-generator: Respond with text for fulfillment email
Paddle will take the text from the response of this endpoint and include it in the purchase fulfillment email to a customer. Include the URL for the purchaser to download their license. Use the 'url' crate's parser to build the URL in order to URL-escape special characters. Honestly I'd rather have had a system where the license file gets included in the receipt email. Unfortunately, with the Paddle fulfillment mechanism I'm using, we can only send text. I learned after building the download endpoint that I could manage fulfillment myself. This would require me to listen to an "alert"-type Paddle webhook, and send the email myself (which would include the license file). Since I already built the license download page, I decided to just use it instead of doing the emailing. Also, my web host limits my SMTP usage, so there could be issues there. I'd have to do the emailing in a separate batch process instead of in the webhook handler to ensure that no emails would get dropped.
Diffstat (limited to 'license-generator/src/purchaser.rs')
-rw-r--r--license-generator/src/purchaser.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/license-generator/src/purchaser.rs b/license-generator/src/purchaser.rs
index 60e389a..1fe1ec6 100644
--- a/license-generator/src/purchaser.rs
+++ b/license-generator/src/purchaser.rs
@@ -6,9 +6,9 @@ use sha1;
use errors::*;
pub struct Purchaser<'a> {
- name: &'a str,
- email: &'a str,
- secret: Option<String>,
+ pub name: &'a str,
+ pub email: &'a str,
+ pub secret: Option<String>,
}
impl<'a> Purchaser<'a> {