Signal-iOS/SignalMessaging/Subscriptions
Evan Hahn f5556d1857
Use durable job for sending badge gifts
Previously, sending a gift badge was not a durable operation, which
meant that crashes/failures could cause users to have their payment
methods charged without actually sending the badge.

Now, the flow is split up into two steps: non-durable parts before the
charge is attempted, and durable parts afterward.

The high-level flow is:

1. Prepare the payment, which involves a couple of repeatable network
   requests.
2. Enqueue a job with the prepared payment, that:
   1. Charges the payment method (idempotently)
   2. Requests a receipt credential (idempotently)
   3. Enqueues a gift message, and optionally a text message
3. When the job completes, open the conversation in the UI.
2022-07-01 17:10:31 -05:00
..
DonationUtilities.swift Use durable job for sending badge gifts 2022-07-01 17:10:31 -05:00
Stripe.swift Use durable job for sending badge gifts 2022-07-01 17:10:31 -05:00
SubscriptionManager.swift Add support for redeeming gift badges 2022-07-01 14:07:24 -07:00
SubscriptionReceiptCredentialRedemptionJob.swift Basic support for sending gift badges 2022-06-22 15:50:51 +00:00