Donation error sheet wiring and UI.

This commit is contained in:
Alex Hart
2023-10-25 10:48:38 -04:00
committed by Cody Henthorne
parent e12d467627
commit 079400f89e
33 changed files with 1015 additions and 369 deletions

View File

@@ -285,20 +285,20 @@ message FiatValue {
uint64 timestamp = 3;
}
message PendingOneTimeDonation {
message Error {
enum Type {
PROCESSOR_CODE = 0; // Generic processor error (e.g. Stripe returned an error code)
DECLINE_CODE = 1; // Stripe or PayPal decline Code
FAILURE_CODE = 2; // Stripe bank transfer failure code
REDEMPTION = 3; // Generic redemption error (status is HTTP code)
PAYMENT = 4; // Generic payment error (status is HTTP code)
}
Type type = 1;
string code = 2;
message DonationErrorValue {
enum Type {
PROCESSOR_CODE = 0; // Generic processor error (e.g. Stripe returned an error code)
DECLINE_CODE = 1; // Stripe or PayPal decline Code
FAILURE_CODE = 2; // Stripe bank transfer failure code
REDEMPTION = 3; // Generic redemption error (status is HTTP code)
PAYMENT = 4; // Generic payment error (status is HTTP code)
}
Type type = 1;
string code = 2;
}
message PendingOneTimeDonation {
enum PaymentMethodType {
CARD = 0;
SEPA_DEBIT = 1;
@@ -306,20 +306,27 @@ message PendingOneTimeDonation {
IDEAL = 3;
}
PaymentMethodType paymentMethodType = 1;
FiatValue amount = 2;
BadgeList.Badge badge = 3;
int64 timestamp = 4;
optional Error error = 5;
PaymentMethodType paymentMethodType = 1;
FiatValue amount = 2;
BadgeList.Badge badge = 3;
int64 timestamp = 4;
optional DonationErrorValue error = 5;
}
message DonationCompletedQueue {
message DonationCompleted {
int64 level = 1;
bool isLongRunningPaymentMethod = 2;
/**
* Contains the data necessary to show the corresponding terminal sheet
* for a given donation. Note that the word "terminal" here is used in
* the same way that it is used in Rx, where we simply mean that, regardless
* of outcome, a donation has completed processing.
*/
message TerminalDonationQueue {
message TerminalDonation {
int64 level = 1;
bool isLongRunningPaymentMethod = 2;
optional DonationErrorValue error = 3;
}
repeated DonationCompleted donationsCompleted = 1;
repeated TerminalDonation terminalDonations = 1;
}
/**