Patch few Stripe related issues (#1156)
This commit is contained in:
commit
8101fe1495
3 changed files with 11 additions and 2 deletions
|
@ -16,7 +16,11 @@ import 'package:photos/services/user_service.dart';
|
|||
import 'package:photos/ui/common/web_page.dart';
|
||||
import 'package:photos/utils/dialog_util.dart';
|
||||
|
||||
const kWebPaymentRedirectUrl = "https://payments.ente.io/frameRedirect";
|
||||
const kWebPaymentRedirectUrl = String.fromEnvironment(
|
||||
"web-payment-redirect",
|
||||
defaultValue: "https://payments.ente.io/frameRedirect",
|
||||
);
|
||||
|
||||
const kWebPaymentBaseEndpoint = String.fromEnvironment(
|
||||
"web-payment",
|
||||
defaultValue: "https://payments.ente.io",
|
||||
|
|
|
@ -331,6 +331,7 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {
|
|||
await _dialog.show();
|
||||
try {
|
||||
final String url = await _billingService.getStripeCustomerPortalUrl();
|
||||
await _dialog.hide();
|
||||
await Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (BuildContext context) {
|
||||
|
@ -342,7 +343,6 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {
|
|||
await _dialog.hide();
|
||||
await showGenericErrorDialog(context: context, error: e);
|
||||
}
|
||||
await _dialog.hide();
|
||||
}
|
||||
|
||||
Widget _stripeRenewOrCancelButton() {
|
||||
|
|
|
@ -296,6 +296,11 @@ func (c *StripeController) handleCustomerSubscriptionDeleted(event stripe.Event)
|
|||
return ente.StripeEventLog{}, stacktrace.Propagate(err, "")
|
||||
}
|
||||
|
||||
err = c.BillingRepo.UpdateSubscriptionCancellationStatus(userID, true)
|
||||
if err != nil {
|
||||
return ente.StripeEventLog{}, stacktrace.Propagate(err, "")
|
||||
}
|
||||
|
||||
skipMail := stripeSubscription.Metadata[SkipMailKey]
|
||||
// Send a cancellation notification email for folks who are either on
|
||||
// individual plan or admin of a family plan.
|
||||
|
|
Loading…
Add table
Reference in a new issue