Open Ayo-Awe opened 2 years ago
@uchibeke I'd like to work on this
@uchibeke So, I'm having challenges getting the email of a discord user, I have one of the two options now
For the Oauth2 method, I'd have to setup a server to receive the Oauth payload. This is asides the server hosting the bot
Yes. Currently email, Twitter or phoneNumber is required to initiate a Payout
But it might be best to keep things simple and not require any action from the user because the Bot will be used by Discord users that don't understand the details of Chimoney
Consider:
@send_chimoney send $10 to @user
. Please handle different instruction types or do it the discord way if Discord bots works differentlyturnOffNotification
to the body of the payout. This ensures you do not get an emailAlso pass discordReciever
and discordSender
into the chimoney.meta
for your own purposes. You can pass any object into chimoney.meta
body {turnOffNotification, chimneys: [{meta: {discordUserName}}]}
discordSender
the Payment Link which prompts them to pay from their Chimoney walletAfter you finish the above, ping me here to review and we can move the steps below and discuss how the Webhook works
discordReciever
and discordSender
. At this point, you don't know what is happening except you use our webhook and monitor for the chimoney.paid
event. When you receive this event, you can then check the Chimoney by getting the transaction details and then sending the discord notifications to the Sender and the ReceiverHope this is helpful, @Ayo-Awe ?
@uchibeke I've setup the command. It sends a payment link to the command initiator. See pull request #67
Follow up
Great.
Please set up Webhook in the Developer page and subscribe to the
chimoney.payment.completed
eventYou can use https://webhook.site/ to see if you get the event after you make the payment from your wallet
If you're getting the message from the webhook, implement your own endpoint that receives the webhook message and data
- Verify that is coming from Chimoney
- Use the issueID to get the transaction
- Confirm it is
paid
on the Chimoney side- Check chimoney.meta and then get and notify
chimoney.meta.discordReciever
andchimoney.meta.discordSender
on Discord. Sample message to to the receiver is similar to what you get in your DM on twitter with the redeem linkHope this helps? And please let me know if you have any questions
@Ayo-Awe
https://github.com/Chimoney/chimoney-community-projects/pull/67#issuecomment-1288172563
Thanks, I’ll set it up and get back to you
Hey @uchibeke , the frontend is currently having issues with payment links
Hey @uchibeke , the frontend is currently having issues with payment links
At what point do you get this error?
This doesn’t seem to happen with other links. Could you initiate a Chimoney with email or twitter included and try again? Also investigating
Hey @uchibeke , the frontend is currently having issues with payment links
At what point do you get this error?
This doesn’t seem to happen with other links. Could you initiate a Chimoney with email or twitter included and try again? Also investigating
This happens when I click any payment link and try to login
Could you send the Payment link, please? @Ayo-Awe
The moment I try to login, I get an error
@Ayo-Awe could you confirm if this is still the case? So we can finish this task
@uchibeke this is still the case, I only get two events
@uchibeke I've found a way around it though at least for the meantime. I can just initiate the payment from the bot then login to my dashboard and complete the payment there without using the link.
@Ayo-Awe this won’t work for external users. You see it in your dashboard because your app initiated it.
could you list out all the webhook you events you’d like to receive, please?
@uchibeke This is the only event I'd like to receive
@Ayo-Awe this won’t work for external users. You see it in your dashboard because your app initiated it.
could you list out all the webhook you events you’d like to receive, please?
ok I get
@uchibeke This is the only event I'd like to receive
- chimoney.payment.completed
Ok. Give me the next 3 hours to test this
so this is the event that you get after you make a payment with the link, correct? AKA after status changes from unpaid to paid?
Exactly, no problem
@Ayo-Awe added chimoney.payment.completed
. Please let me know if you get it after payment
Also, could you confirm if you're able to go from
@uchibeke Great, I'm getting the webhook hook message after payment.
As for the link, the flow breaks when I try to sign.
I've setup the webhook, expect new commits soon
Hi, is this available to me to work on? Or is it done
HR, Event organizers, community managers and anyone in a Discord server should be able to send Chimoney to other users within Discord
Build a bot that rewards Discord users with Chimoney
Bot can be mentioned in a server or issue and instructed to send $N to a @user using Chimoney. Bot initiates a Chimoney payout to the email of the Discord user that is mentioned (get Slack profile by username) and sends the initiate chimoney payout with email: email_from_discord Bot sends a DM to the Discord user that initiated the Payout with a payment link to pay for the transaction on Chimoney. This link is returned from the /initiate-chimoney endpoint. Payer sees a Table on Discord build with Discord UI components with a summary of the Payout The Payer user clicks the link and is taken to the chimoney Payment page and they can pay from their Chimoney wallet Chimoney automatically sends an Email to the user that was rewarded. Optionally, reply to the original Discord comment or send a DM to the Discord User that received the Payment with the Redeem instructions that was also sent by Chimoney via email They can then redeem their reward to any of the options at dash.chimoney.io/redeem