diff options
author | Teddy Wing | 2018-11-19 19:12:52 +0100 |
---|---|---|
committer | Teddy Wing | 2018-11-19 19:58:42 +0100 |
commit | 027fe4276a79a453f27ed9048bb32cc928f3e29b (patch) | |
tree | a2bbc9c48e866d1e89262b3c87ca4feb2c3824d1 /license-generator/src/errors.rs | |
parent | 0bc161c20f283d641919d8f369d309d1fc9081b6 (diff) | |
download | dome-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/errors.rs')
-rw-r--r-- | license-generator/src/errors.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/license-generator/src/errors.rs b/license-generator/src/errors.rs index 2d1182b..79bc49b 100644 --- a/license-generator/src/errors.rs +++ b/license-generator/src/errors.rs @@ -2,6 +2,7 @@ use aquatic_prime; use log; use mysql; use paddle; +use url; use zip_lib; error_chain! { @@ -12,6 +13,7 @@ error_chain! { Log(log::SetLoggerError); MySql(mysql::error::Error); + UrlParse(url::ParseError); Zip(zip_lib::result::ZipError); AquaticPrime(aquatic_prime::errors::Error); |