| Age | Commit message (Collapse) | Author |
|
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.
|
|
Trying to add a little more entropy to the calculation.
Went with chrono instead of `std::time` because it gives me an `i64`
timestamp instead of a `Result`.
|
|
I had forgotten to commit the transaction, so the record I was trying to
insert wouldn't get persisted in the database.
|
|
Manually check that our purchaser creation and database persistence
works.
Make `purchaser` entities public in order to call them.
|
|
Realised that when we want a new purchaser, we always want to generate a
secret. This way we can call `new()` without having to call
`generate_secret()` at the call site.
|
|
Function to establish a database connection using a connection pool.
Update `Purchaser::insert()` to take a `PooledConn` instead of a simple
`Conn`.
|
|
Split up the code to get things a bit more organised. I want a function
to create a connection to the MySQL database and I don't want to lump it
in with the rest.
|