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

Make it possible to donate to plugin creators from within piwik #8561

Merged
merged 4 commits into from Aug 26, 2015

Conversation

Projects
None yet
5 participants
@sgiehl
Member

sgiehl commented Aug 12, 2015

As discussed at the meetup in Berlin we should make it possible to donate to plugin creators directly from within Piwik.

I've updated the list of plugins (within the piwik admin) to show an additional text if there are donation possibilities available:

image

Clicking on the link opens a small popover, showing all available possibilities.

image

Any suggestions / thoughts for improvements?
Guess the displayed text could be improved, maybe someone has a good suggestion for a better wording?!

@tsteur

This comment has been minimized.

Show comment
Hide comment
@tsteur

tsteur Aug 13, 2015

Member

I haven't tested it, only had a quick look at the code and looks good. Also like the idea of displaying it in the app

Member

tsteur commented Aug 13, 2015

I haven't tested it, only had a quick look at the code and looks good. Also like the idea of displaying it in the app

@mattab

This comment has been minimized.

Show comment
Hide comment
@mattab

mattab Aug 13, 2015

Member

Great idea @sgiehl - I put couple comments, otherwise good to merge

Member

mattab commented Aug 13, 2015

Great idea @sgiehl - I put couple comments, otherwise good to merge

@mattab

This comment has been minimized.

Show comment
Hide comment
@mattab

mattab Aug 14, 2015

Member

Re; bitcoin, alternatively you could just show the bitcoin address and users could copy paste it to send money to?

Member

mattab commented Aug 14, 2015

Re; bitcoin, alternatively you could just show the bitcoin address and users could copy paste it to send money to?

@sgiehl

This comment has been minimized.

Show comment
Hide comment
@sgiehl

sgiehl Aug 15, 2015

Member

@mattab I've changed the bitcoin stuff. I've updated the screenshot in the PR description above.
Do you have suggestions to improve the text? Otherwise guess we could merge!

Member

sgiehl commented Aug 15, 2015

@mattab I've changed the bitcoin stuff. I've updated the screenshot in the PR description above.
Do you have suggestions to improve the text? Otherwise guess we could merge!

@MagicFab

This comment has been minimized.

Show comment
Hide comment
@MagicFab

MagicFab Aug 16, 2015

Bitcoin could be specified in one of two ways:

It is against best practices to reuse a single address but possible (and may be used for any of many valid reasons). Bitcoin payment processors take care of generating a new address, forwarding/converting payments, etc.

When clicking a Bitcoin URI it will open the local Bitcoin app for payment if one is installed (for example Electrum).

I can test this if/when implemented.

MagicFab commented Aug 16, 2015

Bitcoin could be specified in one of two ways:

It is against best practices to reuse a single address but possible (and may be used for any of many valid reasons). Bitcoin payment processors take care of generating a new address, forwarding/converting payments, etc.

When clicking a Bitcoin URI it will open the local Bitcoin app for payment if one is installed (for example Electrum).

I can test this if/when implemented.

@sgiehl

This comment has been minimized.

Show comment
Hide comment
@sgiehl

sgiehl Aug 16, 2015

Member

@MagicFab Plugin developers can set exactly one bitcoin address per plugin, so we need to use that one.
I don't have an account at bitpay.com, but I guess it's mostly like coinbase.com. Problem with that is, we do not want to include external javascripts. So I guess using the bitcoin uri might be the best solution for now.

Member

sgiehl commented Aug 16, 2015

@MagicFab Plugin developers can set exactly one bitcoin address per plugin, so we need to use that one.
I don't have an account at bitpay.com, but I guess it's mostly like coinbase.com. Problem with that is, we do not want to include external javascripts. So I guess using the bitcoin uri might be the best solution for now.

@MagicFab

This comment has been minimized.

Show comment
Hide comment
@MagicFab

MagicFab Aug 17, 2015

@sgiehl ok, using a single Bitcoin address is fine.

Adding the possibility to have a direct URL link to self-shoted pages or to service like Bitpay does not require Javascript, however. It's a direct link, just like the current Paypal / Flatter links.

MagicFab commented Aug 17, 2015

@sgiehl ok, using a single Bitcoin address is fine.

Adding the possibility to have a direct URL link to self-shoted pages or to service like Bitpay does not require Javascript, however. It's a direct link, just like the current Paypal / Flatter links.

@mnapoli mnapoli added this to the 2.15.0 milestone Aug 19, 2015

@sgiehl

This comment has been minimized.

Show comment
Hide comment
@sgiehl

sgiehl Aug 20, 2015

Member

@MagicFab not sure if I got you wrong, that would require to let the user define the full URL to their bitcoin donation page. Guess it should be possible to check if the value is a full url or a bitcoin address and handle the link according to that.

@mattab what do you think about that?

Member

sgiehl commented Aug 20, 2015

@MagicFab not sure if I got you wrong, that would require to let the user define the full URL to their bitcoin donation page. Guess it should be possible to check if the value is a full url or a bitcoin address and handle the link according to that.

@mattab what do you think about that?

@mattab

This comment has been minimized.

Show comment
Hide comment
@mattab

mattab Aug 20, 2015

Member

@sgiehl sounds good to me if bitcoin can be either a bitcoin address, or a URL to a custom bitcoin donate page. btw let's also mention this possibility in the dev guide in http://developer.piwik.org/guides/distributing-your-plugin#prepare-your-plugin

Member

mattab commented Aug 20, 2015

@sgiehl sounds good to me if bitcoin can be either a bitcoin address, or a URL to a custom bitcoin donate page. btw let's also mention this possibility in the dev guide in http://developer.piwik.org/guides/distributing-your-plugin#prepare-your-plugin

@sgiehl

This comment has been minimized.

Show comment
Hide comment
@sgiehl

sgiehl Aug 20, 2015

Member

@mattab ok. do we have any validation checks on the marketplace for the value of the donation fields?

Member

sgiehl commented Aug 20, 2015

@mattab ok. do we have any validation checks on the marketplace for the value of the donation fields?

@mattab

This comment has been minimized.

Show comment
Hide comment
@mattab

mattab Aug 20, 2015

Member

Good point! I just found this code:

            if (empty($donate['bitcoin'])
                || !ctype_xdigit($donate['bitcoin'])
                || strlen($donate['bitcoin']) < 10
                || strlen($donate['bitcoin']) > 100) {
                $donate['bitcoin'] = null;
            }

so URLs will not work in the bitcoin field!

Could you get in touch with Thomas to discuss/have this changed?

Member

mattab commented Aug 20, 2015

Good point! I just found this code:

            if (empty($donate['bitcoin'])
                || !ctype_xdigit($donate['bitcoin'])
                || strlen($donate['bitcoin']) < 10
                || strlen($donate['bitcoin']) > 100) {
                $donate['bitcoin'] = null;
            }

so URLs will not work in the bitcoin field!

Could you get in touch with Thomas to discuss/have this changed?

@sgiehl

This comment has been minimized.

Show comment
Hide comment
@sgiehl

sgiehl Aug 20, 2015

Member

Hm... on the other hand I'm not sure if it would really be good to link to a custom URL. That would allow users to inject "bad" links in piwik and the marketplace. Maybe it would be better to whitelist some urls (domains), but I don't know which services might be good to whitelist

Member

sgiehl commented Aug 20, 2015

Hm... on the other hand I'm not sure if it would really be good to link to a custom URL. That would allow users to inject "bad" links in piwik and the marketplace. Maybe it would be better to whitelist some urls (domains), but I don't know which services might be good to whitelist

@sgiehl

This comment has been minimized.

Show comment
Hide comment
@sgiehl

sgiehl Aug 23, 2015

Member

@mattab: I'd suggest to leave it as it is for now. Maintaining kind of a whitelist for serious bitcoin donation service does not really seem to be a good option.. So guess we can merge, if the wording is fine for you.

Member

sgiehl commented Aug 23, 2015

@mattab: I'd suggest to leave it as it is for now. Maintaining kind of a whitelist for serious bitcoin donation service does not really seem to be a good option.. So guess we can merge, if the wording is fine for you.

@mattab

This comment has been minimized.

Show comment
Hide comment
@mattab

mattab Aug 26, 2015

Member

Nice change!

Member

mattab commented Aug 26, 2015

Nice change!

mattab pushed a commit that referenced this pull request Aug 26, 2015

Matthieu Aubry
Merge pull request #8561 from piwik/plugin_donation
Make it possible to donate to plugin creators from within piwik

@mattab mattab merged commit fdf3561 into master Aug 26, 2015

1 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/travis-ci/push The Travis CI build failed
Details
Scrutinizer No new issues
Details

@sgiehl sgiehl deleted the plugin_donation branch Sep 16, 2015

@mattab mattab added the Enhancement label Oct 13, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment