GoodDAPP
GoodDAPP copied to clipboard
Bounty: Wallet payment API
GoodDollar is a non-profit project, delivering digital basic income to tens of thousands of daily users in the form of the G$ token. This bounty is about improving the wallet (wallet.gooddollar.org), adding a simple serverless payment API capabilities with retailers.
Motivation
- User should be able to pay online with his G$ wallet
- Sellers should be able to request payment in G$ on their websites
Details
- contact us on discord/telegram for help setting up dev env for the wallet and walkthrough the bounty
- you can complete tasks separately for the specified bounty for each task
User Flow and wallet specificaitons
-
User scans QR or press on payment link
-
Link will contain extra information (see below
PaymentDetails
) -
[x] Task1 (1 hour = 30$) - parse the following data from payment link (
lib/share/index.js generateCode + readCode
)- [x] Callback url - notify seller backend once payment has been sent
- [x] Invoice # - seller identifier of tx
- [x] website - seller website
- [x] seller/store name
-
User then sees the payment request summary page
-
[x] Task2(8 hours = 240$) - In payment confirmation screen (
SendLinkSummary.js, SummaryGeneric.js
) also show :- [x] Callback url/website
- [x] Invoice #
- [x] Show notification that TX details + email + name will be sent back to website + seller
- [x] Editable field for email + name (so seller can contact you)
-
Once user confirms TX is created and details sent to seller and saved in feed
-
[x] Task 3 (4 hours = 120$) - support saving extra information and calling seller callback url
- [x] Add to feed item (
SendLinkSummary.js onTransactionHash
) the following data- senderEmail - email entered by user
- senderName - name entered by user
- invoiceId - invoice # from seller read from link/qr
- sellerWebsite - website from seller read from link/qr
- sellerName - seller/store name read from link/qr
- [x] When calling sendAmount (in
SendLinkSummary.js
) add parameter txIdentifier and pass invoice #- In GoodWallet sendAmount when invoice is not empty use transferAndCall with txIdentifier hash (sha3) as data
- [ ] Send in callback url via POST
- [ ] senderEmail
- [ ] senderName
- [x] Tx hash
- [x] Invoice #
- [x] Add to feed item (
-
Seller should see payment extra details on his G$ wallet. If you did task 3 correctly, the seller wallet should have those details once TX is received. the fields will be in feed item
item.data
-
[ ] Task 4 (4 hours = 120$) - show payment details in feed item and in feed item modal (
FeedListItem.js, FeedModalItem.js
)- [ ] In feed item show under name of sender: invoiceId + sellerWebsite
- [ ] In feed item modal show: senderEmail + invoiceId + sellerWebsite
Seller SDK
- Create a typescript npm module that works both on browser/node that implements the following methods
- [ ] Task 5 (16 hours = 480$)
- [ ]
generatePaymentLink(PaymentDetails):string
Similar to (lib/share/index.js generateCode + readCode
) Should include extra details from PaymentDetails - [ ]
generatePaymentQR(PaymentDetails):image
Same as above but create a QR containing above url - [ ]
validateTx(TxData):boolean
Reads fuse blockchain for txhash and check it has a Transfer log with theamount
+sha3(data | invoiceid)
paid torecipient
in event log data - [ ]
async onPayment(recipient,invoiceid):Promise
Listens to Transfer event with to=recipient and data=sha3(data | invoiceid) resolves promise once event detected
- [ ]
Types
PaymentDetails: {
recipient,
amount,
reason,
category,
invoiceId,
sellerName?,
sellerWebsite?,
callbackurl
}
TxData: {
txHash,
recipient,
amount
invoiceId
}
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
This issue now has a funding of 6000000.0 G$ (1200.0 USD @ $0.0/G$) attached to it as part of the GoodDollar fund.
- If you would like to work on this issue you can 'start work' on the Gitcoin Issue Details page.
- Want to chip in? Add your own contribution here.
- Questions? Checkout Gitcoin Help or the Gitcoin's Discord
- $1,659,100.34 more funded OSS Work available on the Gitcoin Issue Explorer
@bertux Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
- [x] reminder (3 days)
- [ ] escalation to mods (6 days)
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@bertux Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Hello, yes I still work on this issue and I will a WiP PR to track the progress. I am still waiting for environment configuration file from @sirpy but it's not blocking me yet to setup the development environment needed.
@bertux Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
- [x] reminder (3 days)
- [ ] escalation to mods (6 days)
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
@bertux due to inactivity, we have escalated this issue to Gitcoin's moderation team. Let us know if you believe this has been done in error!
- [x] reminder (3 days)
- [x] escalation to mods (6 days)
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
Hello, I've received the needed file for tests and I work to be able to test locally before doing any modification. I will submit changes in PR when I will have some.
@bertux Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
- [x] reminder (3 days)
- [ ] escalation to mods (6 days)
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
@bertux due to inactivity, we have escalated this issue to Gitcoin's moderation team. Let us know if you believe this has been done in error!
- [x] reminder (3 days)
- [x] escalation to mods (6 days)
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
I'm not working full time on it and there is no time constraints imposed, that explains why I'm not very active on it yet but I'm still contributing to GoodDollar projects.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work has been started.
These users each claimed they can complete the work by 265 years, 5 months from now. Please review their action plans below:
1) nicholascioli has started work.
Hello,
I like the purpose of this coin and would love to contribute.
Let me know what is left to do. -- Nick
Learn more on the Gitcoin Issue Details page.
Hey, you can read my my statement above. Can someone please create a repo under this org for the typescript sdk that I can push or update with PR in?
@sno2 https://github.com/GoodDollar/PaymentSDK
@sirpy Sorry, I can't work on the bounty. I couldn't figure out a way to asynchronously generate images as QR codes in Uint8Array
. All of the qr code npm packages I could find were using callbacks which I could of course promisifiy, but they injected the qr codes into an HTML canvas. However, you can't access the canvas any DOM elements in Node.js which blocked my entire work.
@sno2 lets skip the QR part for now, i'll research it. i'm not sure why you have an issue, you can use the same QR package we use on the wallet. but in the meantime generating payment link is enough
@sno2 this package seems to support async/await and nodejs https://www.npmjs.com/package/qrcode
this works perfectly fine in the above package, it returns an image in base64 that can be used directly in <img>
qr.toDataURL("https://xx.com").then(console.log)
@sno2 ??
@sno2 ??
Sorry I have exams this week. I had time to do it last week but not now. I already cancelled my offer.
- finish current PR (need design #3279)
- move 3.4.5. to the separate tasks
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
The funding of 6000000.0 G$ (1200.00 USD @ $0.0/G$) attached to this issue has been cancelled by the bounty submitter
- Questions? Checkout Gitcoin Help or the Gitcoin's Discord
- $7,212,930.01 more funded OSS Work available on the Gitcoin Issue Explorer
@sirpy @patpedrosa Does it still relevant or could be closed / moved to the IceBox ?