bountysource/core

Add "Send via Paypal" button to admin/cash_outs/pending

rappo opened this issue ยท 35 comments

rappo commented

If cash out method is Paypal, add a button to that specific cash out request that sends the payment via Paypal API. This probably should be batched as Paypal's Synchronous mode will be deprecated.

  • Payment must sent as USD (no conversions)
  • Successful transaction should trigger the "Mark as Sent" action in the Admin
  • (bonus) Add transaction ID/details to the "Mark as Sent" email

@rappo where can i find some seed data to test with?

@rappo also, should this button send the payment immediately or should it flag the cash out to be sent via paypal when all the cash outs are processed?

@alphashuro

None available afaik. If it's to make some cash out requests then you can gift a user money through the admin section - on the 'financial' tab of people in 'admin/people' table.

Rappo mentioned this in another issue but I can't find the thread to link to.

@mitnuh

after running the app locally, it doesn't seem to be able to fetch any data at all from the api.

what did he say when he mentioned it?

what is the process for updating the wiki? i added an entry there for solving a problem i struggled with, but i'm not sure if there is a process to follow for updating it

Found it, it was discussion about how tricky it is to get a working local install.

#1082

It's messy getting the local install working - that thread and the docker setup guide were useful.

There's a list of env vars in one of the guides, the api problem might be related to one of them - these are mine.

export RAILS_ENV="development"
export DATABASE_URL="postgresql://user/pwd/etc"
export COOKIE_SECRET_KEY_BASE="secretkey"
export COOKIE_SECRET_TOKEN="secrettoken"
export BOUNTYSOURCE_SALT_URL="http://salt.bsource:3000/"
export BOUNTYSOURCE_SHORT_URL="http://bsrc.co:3000/"
export BOUNTYSOURCE_WWW_URL="http://www.bsource:3000/"
export BOUNTYSOURCE_API_URL="http://api.bsource:3000/"
export COOKIE_NAME_ACCESS_TOKEN="access_tok"
export COOKIE_NAME_SHOPPING_CART="shop_tok"
export MIXPANEL_TOKEN="mixpanel_tok"
export BOUNTYSOURCE_ACCESS_TOKEN_SECRET="twitter_tok"

Sorry don't know about the wiki process.

๐Ÿค” so you had to set those hostnames in your local hosts file to get them working?

i've written some code but i'm struggling to get some test data for this, @mitnuh @rappo can one of you guys please use my branch to test the code i've added so far? or give me an sql dump of data you are currently using?

Can't test tonight, here's my pg_dump hope it help https://drive.google.com/file/d/0B1db69pypuhHb2hTLWVERnhTbkk/view

There's two users with some cash and basically nothing else, login emails are test@gmail.com & testme@gmail.com, both using password abcd1234

You might not need it - if your install is working well enough to register new user & login then you can make that user an admin by setting admin flag on people table then gift yourself cash.

rappo commented

@alphashuro

should this button send the payment immediately or should it flag the cash out to be sent via paypal when all the cash outs are processed?

Thinking on it again, I think there should be a single "Process Payments" button that batches the payments (see my synchronous mode comment in OP). So perhaps each cash out request should have an "Approve" button. The approve button changes state when approved and can be unapproved.

Sorry, I'm not available to help out right now -- perhaps @mitnuh can help later.

And thank you for taking on this task ๐Ÿ‘

@rappo thank you that makes a lot more sence when factoring in the request to do batch processing

@rappo @mitnuh i'll do the same for the coinbase payments as well

@mitnuh how did you configure your api vs www hostnames?

Here's the hosts file, nginx config and a shell script I use to start server/console.

https://gist.github.com/mitnuh/6d71d046ec0013c72dc509ffd54fcd1c

do you guys mind if i add a package dotenv-rails for local development?

thank you @mitnuh i finally managed to get it working with your help

@rappo have you had a chance to look at the PR?

rappo commented

@alphashuro sorry for the delay. I need @wkonkel to review this PR, but he's busy this weekend. I'll try to bug him to set aside time after this weekend. And thank you for your contribution!

Thank you! I'll be waiting for your feedback then

I've worked on #1080 as well but it's branch is based on this one so I'll wait for this to be merged before submitting the PR for that

rappo commented

hey @alphashuro just checking to make sure you saw the feedback / requested changes on your PR.

yes i did thank you, i was planning to make the changes tomorrow and notify you

@rappo I updated the pull request

rappo commented

great! pinging @wkonkel to take a look at it this week. thanks for your contribution and patience ๐Ÿ‘

@rappo I am still awaiting your and @wkonkel's review

rappo commented

@alphashuro sorry for the delay... @wkonkel has been too busy lately to review and I'm not suited to review the code. I'm not sure when we can get your code reviewed and merged, but I hope it's soon (I really want to see this feature!).

Couple questions about some edge cases:

  • What happens if the Paypal email is incorrect or the account is disabled (or otherwise unable to receive funds)?
  • Are we making sure the funds are sent only as USD?

unrelated, are you interested in being more active with Bountysource development? As you can tell by the delay in getting your PR reviewed, we need more core contributors: https://salt.bountysource.com/teams/bountysource/updates/5-bountysource-is-searching-for-developers-to-join-our-core-team

  1. if the transaction fails the PayPal batch id is cleared on the cashout and it goes back to its initial state (i.e. as if the transaction was never attempted)
  2. yes we are making sure the funds are sent only as USD

I am interested in becoming part of your core team, I've filled in the form and submitted it, is there anything else i need to do?

rappo commented

@alphashuro - I've added you to the our slack. Feel free to join and start chatting with everyone when you can. There's no formal process to being a core contributor (yet), I'm just seeing how it all shakes out when everyone who is interested starts interacting.

I got money sent in Euros, my default PayPal currency, although my PP account is configured to accept both Euros and USD. No idea who did the conversion, but sure as hell it was costly :-(

rappo commented

@jorgk3 conversions are done by Paypal automatically, using their exchange rate. Because this is automatic, If you wish to receive USD you need to set that as your default currency. This is outside of the scope of Bountysource, unfortunately.

That's really weird since the PayPal transaction shows absolutely no trace of any currency conversion. It looks like the funds arrived in Euros:
2017-11-03 23_32_23-transaktionsdetails - paypal

was this issue solved?

@rappo same question here, was this ever solved? Would like to try it out, thanks