-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In app fiat donation / subscription (apple pay) #1422
Comments
Recommended immediately post, or alongside nostrdb update @jb55 |
@jb55 advised preference is to stick with sats, and not take fiat. |
On Tue, Nov 21, 2023 at 10:14:27AM -0800, alltheseas wrote:
@jb55 advised preference is to stick with sats, and not take fiat.
this is not true
|
damus is not only for bitcoiners |
Ok. I must have misunderstood. |
prompt #1756 |
I started working on this feature! I will start with the overall screens and other items of the acceptance criteria, study Apple's in-app mechanism, and then integrate the payment mechanism at the end. |
On Fri, Dec 01, 2023 at 03:40:33PM -0800, Daniel D’Aquino wrote:
I started working on this feature! I will start with the overall
screens and other items of the acceptance criteria, study Apple's
in-app mechanism, and then integrate the payment mechanism at the end.
There's already a branch for this! Lemme revive it and see if there's
anything worth salvaging
|
On Fri, Dec 01, 2023 at 03:53:59PM -0800, William Casarin wrote:
On Fri, Dec 01, 2023 at 03:40:33PM -0800, Daniel D’Aquino wrote:
>I started working on this feature! I will start with the overall
>screens and other items of the acceptance criteria, study Apple's
>in-app mechanism, and then integrate the payment mechanism at the end.
There's already a branch for this! Lemme revive it and see if there's
anything worth salvaging
pushed to the purple branch
|
Thank you @jb55, this was definitely very helpful! I am building this feature on top of @jb55's previous work on this, and I have done the following changes so far:
Here is how it currently looks like: @jb55, @robagreda, @alltheseas, please feel free to provide any suggestions on the design if it can be improved! I updated the acceptance criteria on the top to mark things I believe are ready. On top of that, a few other thoughts of things we might want to address (on this or on a separate ticket):
|
@danieldaquino mention that first 1,000 annual subscribers will receive a #1, #2 subscriber number |
@alltheseas, from today's standup, can I go ahead and make the following modifications to the acceptance criteria?
|
Yes to 2. I apologize for missing this - can you remind me why are we removing 1.? |
I think it is because anyone can technically "hack" this and add a star to their profile? Perhaps I misunderstood. @jb55, can you please clarify what the expectation is regarding the ⭐️ on users' profiles? |
I think @jb55 mentioned that the reason why we need server registration, is precisely for this reason - that anyone technical enough can add a ⭐, whereas a registration on a server specifically checks if the user has paid for Damus, and grants ⭐ as a reward. |
That makes sense. @jb55, in order to check whether or not users have the star icon, do you prefer to:
I imagine (2) is better, but I would like to double-check if that's what you are looking for. |
On Mon, Dec 04, 2023 at 10:55:40AM -0800, alltheseas wrote:
> can you please clarify what the expectation is regarding the ⭐️ on users' profiles?
I think @jb55 mentioned that the reason why we need server
registration, is precisely for this reason - that anyone technical
enough can add a ⭐, whereas a registration on a server specifically
checks if the user has paid for Damus, and grants ⭐ as a reward.
Correct. We are keeping the star but we're just making it more secure.
Damus needs to call out to the API with a list of npubs to check
registration statuses.
|
On Mon, Dec 04, 2023 at 11:07:33AM -0800, Daniel D’Aquino wrote:
> I think @jb55 mentioned that the reason why we need server
> registration, is precisely for this reason - that anyone technical
> enough can add a ⭐, whereas a registration on a server specifically
> checks if the user has paid for Damus, and grants ⭐ as a reward.
That makes sense. @jb55, in order to check whether or not users have the star icon, do you prefer to:
1. consult directly with the Damus server, or
2. have the Damus server issue the "⭐" using [NIP-58](https://github.com/nostr-protocol/nips/blob/master/58.md) badges?
I imagine (2) is better, but I would like to double-check if that's
what you are looking for.
Badges aren't the right approach here, since they don't expire. I also
want our stars to be much smarter over time. It's not a static one time
thing. We can customize the look of profiles and stars based on
registration status and maybe even how long they have been a continuous
subscriber, like streak rewards.
|
Sounds good, I will make the app consult with the server through the REST API as it is simple and reliable (at least until or if we find a better approach later on) |
Created a welcome screen to be displayed when the user successfully purchases the subscription: Screen.Recording.2023-12-04.at.17.35.58.movI tried to compose the view and the animation in a way that plays with purple and Damus colors, stars (since that's the badge symbol they get on their profile) and a bit of suspense-building by delaying the rest of the content. @jb55, @alltheseas, @robagreda please let me know if this looks good, or if you have any suggestions. I will keep working on the rest of the ticket in the meantime. Thanks! |
🤩 |
Just made one other quick improvement to the animation: Added a bit of an animation effect to the background stars for a more immersive feeling This is the latest: Screen.Recording.2023-12-04.at.18.12.37.mov |
On Mon, Dec 04, 2023 at 06:18:04PM -0800, Daniel D’Aquino wrote:
Just made one other quick improvement to the animation: Added a bit of
an animation effect to the background stars for a more immersive
feeling
This is the latest:
https://github.com/damus-io/damus/assets/24692108/9a031fcc-d7b1-4de0-bb52-6205f2c4fbc9
that looks awesome, what did you use for this?
|
Thanks! This is pure SwiftUI, using various animation modifiers for each item. The star background was made using Pixelmator Pro, and the mesh gradient background was pulled from Rob's Figma designs |
Updates on this project for today and Wednesday
What we have working so farOverall, this is the flow that we have working on a local test environment:
Code changes so far:
Next steps
I have updated the acceptance criteria. Some items that I have added could potentially be delegated to separate tickets. @jb55, @alltheseas, there are a lot of things going on in this ticket, but hopefully this message provides a good overview of where we are! Please let me know if there are any questions or suggestions regarding any of this. Thanks! |
Updated the acceptance criteria and delegated various items to separate smaller tickets and more narrowly-scoped tickets to help us better manage this feature: https://github.com/damus-io/damus/milestone/11 @jb55, @alltheseas, please feel free to add/edit/remove stuff from that milestone as needed! I will wrap up this ticket, send the patch very soon, and start working on other tickets in that milestone (Starting with #1809) |
This commit includes various code changes necessary to get a basic proof of concept of the feature working. This is NOT a full working feature yet, only a preliminary prototype/PoC. It includes: - [X] Basic Storekit configuration - [X] Basic purchase mechanism - [X] Basic layout and copywriting - [X] Basic design - [X] Manage button (To help user cancel their subscription) - [X] Thank you confirmation + special welcome view - [X] Star badge on profile (by checking the Damus Purple API) - [X] Connection to Damus purple API for fetching account info, registering for an account and sending over the App Store receipt data The feature sits behind a feature flag which is OFF by default (it can be turned ON via Settings --> Developer settings --> Enable experimental Purple API and restarting the app) Testing --------- PASS Device: iPhone 15 Pro simulator iOS: 17.0.1 Damus: This commit damus-api: 59ce44a92cff1c1aaed9886f9befbd5f1053821d Server: Ubuntu 22.04 (VM) Setup: 1. On the server, delete the `mdb` database files to start from scratch 2. In iOS, reinstall the app if necessary to make sure there are no in-app purchases 3. Enable subscriptions support via developer settings with localhost test mode and restart app 4. Start server with mock parameters (Run `npm run dev`) Steps: 1. Open top bar and click on "Purple" 2. Purple screen should appear and show both benefits and the purchase options. PASS 3. Click on "monthly". An Apple screen to confirm purchase should appear. PASS 4. Welcome screen with animation should appear. PASS 5. Click continue and restart app (Due to known issue tracked at damus-io#1814) 6. Post something 7. Gold star should appear beside your name 8. Look at the server logs. There should be some requests to create the account (POST), to send the receipt (POST), and to get account status Closes: damus-io#1422
This commit includes various code changes necessary to get a basic proof of concept of the feature working. This is NOT a full working feature yet, only a preliminary prototype/PoC. It includes: - [X] Basic Storekit configuration - [X] Basic purchase mechanism - [X] Basic layout and copywriting - [X] Basic design - [X] Manage button (To help user cancel their subscription) - [X] Thank you confirmation + special welcome view - [X] Star badge on profile (by checking the Damus Purple API) - [X] Connection to Damus purple API for fetching account info, registering for an account and sending over the App Store receipt data The feature sits behind a feature flag which is OFF by default (it can be turned ON via Settings --> Developer settings --> Enable experimental Purple API and restarting the app) Testing --------- PASS Device: iPhone 15 Pro simulator iOS: 17.0.1 Damus: This commit damus-api: 59ce44a92cff1c1aaed9886f9befbd5f1053821d Server: Ubuntu 22.04 (VM) Setup: 1. On the server, delete the `mdb` database files to start from scratch 2. In iOS, reinstall the app if necessary to make sure there are no in-app purchases 3. Enable subscriptions support via developer settings with localhost test mode and restart app 4. Start server with mock parameters (Run `npm run dev`) Steps: 1. Open top bar and click on "Purple" 2. Purple screen should appear and show both benefits and the purchase options. PASS 3. Click on "monthly". An Apple screen to confirm purchase should appear. PASS 4. Welcome screen with animation should appear. PASS 5. Click continue and restart app (Due to known issue tracked at damus-io#1814) 6. Post something 7. Gold star should appear beside your name 8. Look at the server logs. There should be some requests to create the account (POST), to send the receipt (POST), and to get account status 9. Go to purple view. There should be some information about the subscription, as well as a "manage" button. PASS 10. Click on "manage" button. An iOS sheet should appear allow the user to unsubscribe or manage their subscription to Damus Purple. Feature flag testing -------------------- PASS Preconditions: Continue from above test Steps: 1. Disable Damus Purple experiment support on developer settings. Restart the app. 2. Check your post. There should be no star beside your profile name. PASS 3. Check side menu. There should be no "Damus Purple" option. PASS 4. Check server logs. There should be no new requests being done to the server. PASS Closes: damus-io#1422
Sent patches! |
This commit includes various code changes necessary to get a basic proof of concept of the feature working. This is NOT a full working feature yet, only a preliminary prototype/PoC. It includes: - [X] Basic Storekit configuration - [X] Basic purchase mechanism - [X] Basic layout and copywriting - [X] Basic design - [X] Manage button (To help user cancel their subscription) - [X] Thank you confirmation + special welcome view - [X] Star badge on profile (by checking the Damus Purple API) - [X] Connection to Damus purple API for fetching account info, registering for an account and sending over the App Store receipt data The feature sits behind a feature flag which is OFF by default (it can be turned ON via Settings --> Developer settings --> Enable experimental Purple API and restarting the app) Testing --------- PASS Device: iPhone 15 Pro simulator iOS: 17.0.1 Damus: This commit damus-api: 59ce44a92cff1c1aaed9886f9befbd5f1053821d Server: Ubuntu 22.04 (VM) Setup: 1. On the server, delete the `mdb` database files to start from scratch 2. In iOS, reinstall the app if necessary to make sure there are no in-app purchases 3. Enable subscriptions support via developer settings with localhost test mode and restart app 4. Start server with mock parameters (Run `npm run dev`) Steps: 1. Open top bar and click on "Purple" 2. Purple screen should appear and show both benefits and the purchase options. PASS 3. Click on "monthly". An Apple screen to confirm purchase should appear. PASS 4. Welcome screen with animation should appear. PASS 5. Click continue and restart app (Due to known issue tracked at #1814) 6. Post something 7. Gold star should appear beside your name 8. Look at the server logs. There should be some requests to create the account (POST), to send the receipt (POST), and to get account status 9. Go to purple view. There should be some information about the subscription, as well as a "manage" button. PASS 10. Click on "manage" button. An iOS sheet should appear allow the user to unsubscribe or manage their subscription to Damus Purple. Feature flag testing -------------------- PASS Preconditions: Continue from above test Steps: 1. Disable Damus Purple experiment support on developer settings. Restart the app. 2. Check your post. There should be no star beside your profile name. PASS 3. Check side menu. There should be no "Damus Purple" option. PASS 4. Check server logs. There should be no new requests being done to the server. PASS Closes: #1422
user story
As a Damus user who appreciates the devs, I would like a way to donate to Damus in fiat, so that I can support the devs and help contribute to Damus maintenance & development costs.
acceptance criteria
Damus user can send a one time donation to Damus via fiat apple pay mechanismShow user that apple takes X%/Y$ of each in app apple pay donationDelegated to Polish Damus Purple support #181412. [x] Optimize views to look good on all devices/screensDelegated to #181413. [x] Mention that first 1,000 annual subscribers will receive "Nº 1", "Nº 2" subscriber numbers
14. [x] Implement restoring the purchase, and syncing on different devices under the same App Store account
15. [x] Polish subscription mechanism so that it registers with the server immediately after subscribing (without having to restart the app)
Implement secure receipt transmission with cryptographic signaturesImplement secure receipt verification with the Apple server (Daniel: I might get blocked on this, requires some kind of private key)Test flow on a sandbox (and do all necessary configs to make it happen)Test and address any missing details on other flows such as cancellation and refundshow might we/questions
commentary
At first Damus purple does not need to add additional features (see purple #659 ). Additional features can be added over time.
Subscribe with bitcoin #1755
related
Damus Purple #659
The text was updated successfully, but these errors were encountered: