-
Notifications
You must be signed in to change notification settings - Fork 76
Switch to Trolley for Modrinth Payments #727
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just minor nitpicks about names/organization largely.
if &*request_signature == v1 { | ||
let webhook = serde_json::from_slice::<TrolleyWebhook>(&payload)?; | ||
|
||
if webhook.model == "recipient" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The inside of this if statement and the next one would make great separate methods (trolley_recipient_webhook
and trolley_payment_webhook
or something).
These several hundred line methods are not ideal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once that's done, that also opens the door to doing some more focused tests where we supply it with a TrolleyWebhook with data we formed to be like what we would actually get from Trolley and make sure we update the database correctly in response. This lets us test parts of this flow easily without actually integrating with Trolley.
Co-authored-by: Jackson Kruger <[email protected]>
Co-authored-by: Jackson Kruger <[email protected]>
* most of trolley * Switch to trolley for payments * run prepare * fix clippy * fix more * Fix most tests + bitflags * Update src/auth/flows.rs Co-authored-by: Jackson Kruger <[email protected]> * Finish trolley * run prep for merge * Update src/queue/payouts.rs Co-authored-by: Jackson Kruger <[email protected]> --------- Co-authored-by: Jackson Kruger <[email protected]>
Switches to trolley as our payout provider.
Fixes MOD-530