Commit graph

24760 commits

Author SHA1 Message Date
Vishnu Mohandas eef33e9c0c
[mobile][web] Redirect to payment portal if subscription is past due (#1222)
## Description

When a customer whose Stripe subscription is past due (within the 30 day
window after expiry time and has not been cancelled) clicks on the
subscription modal, take them to the payment portal to complete the
subscription.

## Tests

- [x] Tested web
- [x] Tested mobile
2024-03-27 16:29:58 +05:30
vishnukvmd ba307b0dcd [web] Fix check 2024-03-27 16:23:38 +05:30
vishnukvmd 44403c94c2 Cancel SEPA subscriptions when payments fail 2024-03-27 16:20:58 +05:30
vishnukvmd ba314eb647 [web] Handle past-due state on clicking "renew" 2024-03-27 16:17:23 +05:30
vishnukvmd 1020366c3a [mobile][web] Ignore cancelled subscriptions while computing past-due status 2024-03-27 16:11:03 +05:30
vishnukvmd a15e9b0c9a [web] Redirect to payment portal if subscription is past due 2024-03-27 15:57:00 +05:30
vishnukvmd a581e31ef9 [mobile] Redirect to payment portal if subscription is past due 2024-03-27 15:56:54 +05:30
Vishnu Mohandas 81a8cba4da
[mobile] New translations (#1140)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-app)
2024-03-27 14:44:29 +05:30
Vishnu Mohandas 0c400db649
[server] Fix Stripe related issues (#1152)
## Description

### Stripe
- Settings have been modified to "Cancel" the subscription if all
attempts to charge an invoice fails. The previous configuration was to
set the subscription to "Past Due".

### Museum
- Updated our Stripe workflow to use `PaymentBehaviorAllowIncomplete` in
case of SEPA payments
- Fixed the issue caused by us spawning unnecessary subscriptions when a
customer tried to renew their expired subscription
- Removed the email that was being sent out when a Stripe subscription
expired. We will have to run our own cron to send a notification and
perform necessary clean up. When payments fail, we will still send a
notification to intimate the customer that their account is on hold.

### Mobile
- Fixed the dialogs and error messages on the payment page

## Tests
The following cases were tested for SEPA, Credit Cards, and Credit Cards
with 3DS.
- [x] Purchase
  - [x] Success
  - [x] Failure
- [x] Renewal
  - [x] Success
  - [x] Failure
- [x] Upgrades
  - [x] Success
  - [x] Failure
- [x] Cancellation
- [x] Resumption post recovery

## Note

These changes are likely to break in the event of some corner cases we
haven't thought of. But this will land us in a state that is better than
where we are right now in terms of collecting payments for expired
subscriptions and those via SEPA.
2024-03-27 14:43:36 +05:30
vishnukvmd 25a054287a Prevent duplicate emails for SEPA 2024-03-27 14:22:30 +05:30
Manav Rathi 379a5f8e79
[server] Publish docker image - Part 2/2 (#1219)
Part 2 (and final part) of https://github.com/ente-io/ente/pull/1218.

Completes https://github.com/ente-io/ente/discussions/673. The images
are accessible at `ghcr.io/ente-io/server`, e.g.

```sh
docker pull ghcr.io/ente-io/server
```
2024-03-27 13:59:14 +05:30
Manav Rathi 62d95ad862
Mention pre-built binary in docs 2024-03-27 13:53:43 +05:30
Manav Rathi e803b7f053
Document in main README 2024-03-27 13:44:24 +05:30
Manav Rathi 741c968c8a
Fix typo 2024-03-27 13:10:05 +05:30
Manav Rathi 4a4a6ba44a
Give an example of the pull command 2024-03-27 13:04:28 +05:30
Manav Rathi 6588880b31
Use the correct commit, not the current one 2024-03-27 13:02:46 +05:30
Manav Rathi cb45a070be
Tweaks 2024-03-27 12:58:17 +05:30
Manav Rathi fc8e79fbe9
Remove double namespacing 2024-03-27 12:54:29 +05:30
Manav Rathi a8a2e7aee3
[server] Publish docker image - Part 1 (#1218)
- Outline the plan
- Add a first cut of the publish script

Merging this now so that I can test the workflow. Post a successful
publish, I'll open another PR with any fixes entailed, and will also
document this in the main server README.
2024-03-27 12:46:26 +05:30
Manav Rathi 4ba76e4aa2
Tweaks 2024-03-27 12:46:08 +05:30
Manav Rathi 7c0f41166c
Add a first cut of the publish script 2024-03-27 12:42:29 +05:30
Manav Rathi b31332ff30
Outline the plan 2024-03-27 12:42:26 +05:30
Manav Rathi 16c2706e48
[docs] Add images for continuous sync (#1217) 2024-03-27 11:55:10 +05:30
Manav Rathi 50431c6410
Update image 2024-03-27 11:53:15 +05:30
Manav Rathi b6b66684f3
Reindent 2024-03-27 11:46:37 +05:30
Jishnuraj9 0e04a0df04
add images for continuous sync 2024-03-27 11:43:58 +05:30
Vishnu Mohandas 0fc3773812
feat: rounded icons for auth desktop (#1215)
## Description

## Tests
2024-03-26 23:19:43 +05:30
Prateek Sunal 2cda8da3c5 fix: remove unused submodules 2024-03-26 23:13:54 +05:30
Prateek Sunal 652f6a92f5 feat: rounded icons for desktop 2024-03-26 23:12:38 +05:30
Manav Rathi a78e2892cd
[photos-desktop] Update to latest Electron (#1213)
- And update to latest everything else too
- Fix the duplication in preload
- ... and many more cleanup changes (see commit titles for details)

Should not have major functional impact, and whatever IPC actions got
broken by the switch to context-isolation will still not be working.
This is just an intermediate step, and more PRs will continue fixing the
IPC APIs.
2024-03-26 21:54:18 +05:30
Manav Rathi 48a726885f
Fix typo in comment 2024-03-26 21:45:21 +05:30
Manav Rathi 88e8e1a18d
Remove hacky splash window with a background color
...hacky because it was using a timer instead of the "ready-to-show" event
(which wasn't getting fired for some reason). It is recommended that we set a
background color anyway.
2024-03-26 21:45:21 +05:30
Manav Rathi ac97d65c12
Remove one copy of duplication from IPC types 2024-03-26 21:45:21 +05:30
Manav Rathi b0ca3a1a9f
Preload won't have logging 2024-03-26 21:45:21 +05:30
Manav Rathi c055cd9b4a
Remove the tscw 2024-03-26 21:45:21 +05:30
Manav Rathi 9e987f62f6
Fix paths of splash etc 2024-03-26 21:45:21 +05:30
Manav Rathi cb33b6df10
Refactor the init process 2024-03-26 21:45:20 +05:30
Manav Rathi c3dfa46514
Major version update of Electron
And other surrounding packages.
2024-03-26 21:42:48 +05:30
Manav Rathi 24176d8c40
Document a few more dependencies 2024-03-26 21:42:48 +05:30
Manav Rathi 6e737cdf9a
Mention package.json in the shx description 2024-03-26 21:42:48 +05:30
Manav Rathi 8f978a3d3d
Manually update the version info in package.json 2024-03-26 21:42:48 +05:30
Manav Rathi fe94a4cd77
yarn-upgrade interactive 2024-03-26 21:42:48 +05:30
Manav Rathi 140b65b69d
Use default import instead of star import
Refs:
https://stackoverflow.com/questions/31386631/difference-between-import-x-and-import-as-x-in-node-js-es6-babel
2024-03-26 21:42:48 +05:30
Manav Rathi db930feaf3
Stop source map generation
This isn't doing anything for us currently, and I suspect is also the source of
this error when trying to run a binary built using `yarn build:quick`

> DevTools failed to load source map: Could not load content for next://app/preload.js.map:
  Unexpected token '<', "<!DOCTYPE "... is not valid JSON

Note that the renderer process already has source maps.
2024-03-26 21:42:48 +05:30
Manav Rathi 2038b036c5
Remove baseUrl that didn't work
From what I've understood, there isn't a way for us to use the baseUrl for
absolute imports without also using a bundler. The baseUrl works for the
tsconfig, but not for the generated JS.

Since this setting was anyways not working, remove it. Tested by doing `yarn
dev`, `yarn build` and also doing a quick perusal in VSCode to see that it is
not reporting any errors.

Refs:

- https://stackoverflow.com/questions/50679031/why-are-these-tsconfig-paths-not-working
- https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/2737
- https://stackoverflow.com/questions/40407342/resolving-paths-in-typescript-outdir
- https://stackoverflow.com/questions/51683827/using-paths-in-typescript-in-a-nodejs-project
2024-03-26 21:42:48 +05:30
vishnukvmd c9618d8038 Update copy 2024-03-26 21:31:29 +05:30
vishnukvmd 888aca7e6c Extract common code 2024-03-26 21:11:57 +05:30
vishnukvmd 31d3319d20 Revert "Depend on subscription-past-due events to trigger the account-on-hold email"
This reverts commit a131c16f4e.
2024-03-26 20:59:02 +05:30
Vishnu Mohandas 2cadc0f0fc
Update otp.md 2024-03-26 20:45:46 +05:30
vishnukvmd a131c16f4e Depend on subscription-past-due events to trigger the account-on-hold email 2024-03-26 20:29:55 +05:30