Bitcoin donations
This commit is contained in:
parent
45e4817a58
commit
7086055f4e
6 changed files with 48 additions and 12 deletions
|
|
@ -1,4 +1,6 @@
|
||||||
%form{:action => "https://www.paypal.com/cgi-bin/webscr", :method => "post"}
|
- if AppConfig.settings.paypal_hosted_button_id.present?
|
||||||
|
PayPal:
|
||||||
|
%form{:action => "https://www.paypal.com/cgi-bin/webscr", :method => "post"}
|
||||||
%input{:name => "cmd", :type => "hidden", :value => "_s-xclick"}
|
%input{:name => "cmd", :type => "hidden", :value => "_s-xclick"}
|
||||||
%input{:name => "hosted_button_id", :type => "hidden", :value => AppConfig.settings.paypal_hosted_button_id}
|
%input{:name => "hosted_button_id", :type => "hidden", :value => AppConfig.settings.paypal_hosted_button_id}
|
||||||
%input{:name => "on0", :type => "hidden", :value => "Type"}
|
%input{:name => "on0", :type => "hidden", :value => "Type"}
|
||||||
|
|
@ -9,3 +11,7 @@
|
||||||
%option{:value => "Box o' Joe"} Box o' Joe : $20.00USD
|
%option{:value => "Box o' Joe"} Box o' Joe : $20.00USD
|
||||||
%input{:name => "currency_code", :type => "hidden", :value => "USD"}
|
%input{:name => "currency_code", :type => "hidden", :value => "USD"}
|
||||||
%input{:name => "submit", :type => "submit", :value => t('aspects.index.donate')}
|
%input{:name => "submit", :type => "submit", :value => t('aspects.index.donate')}
|
||||||
|
- if AppConfig.settings.bitcoin_wallet_id.present?
|
||||||
|
Bitcoin:
|
||||||
|
%input{:type => "text", :id => "bitcoin_address", :value => AppConfig.settings.bitcoin_wallet_id, :readonly => true}
|
||||||
|
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
.content
|
.content
|
||||||
!= t('bookmarklet.explanation', :link => link_to(t('bookmarklet.post_something'), magic_bookmarklet_link))
|
!= t('bookmarklet.explanation', :link => link_to(t('bookmarklet.post_something'), magic_bookmarklet_link))
|
||||||
|
|
||||||
- if AppConfig.settings.paypal_hosted_button_id.present?
|
- if AppConfig.settings.paypal_hosted_button_id.present? || AppConfig.settings.bitcoin_wallet_id.present?
|
||||||
.section
|
.section
|
||||||
.title
|
.title
|
||||||
.icons-coffee
|
.icons-coffee
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ defaults:
|
||||||
open: true
|
open: true
|
||||||
count: 25
|
count: 25
|
||||||
paypal_hosted_button_id:
|
paypal_hosted_button_id:
|
||||||
|
bitcoin_wallet_id:
|
||||||
community_spotlight:
|
community_spotlight:
|
||||||
enable: false
|
enable: false
|
||||||
suggest_email:
|
suggest_email:
|
||||||
|
|
|
||||||
|
|
@ -233,6 +233,11 @@ configuration: ## Section
|
||||||
## we kindly ask your users to donate to the Diaspora Foundation :)
|
## we kindly ask your users to donate to the Diaspora Foundation :)
|
||||||
#paypal_hosted_button_id: ""
|
#paypal_hosted_button_id: ""
|
||||||
|
|
||||||
|
## Bitcoin donations
|
||||||
|
## You can provide the bitcoin address here to kindly ask
|
||||||
|
## your users for donations to run their pod.
|
||||||
|
#bitcoin_wallet_id: ""
|
||||||
|
|
||||||
## Community Spotlight
|
## Community Spotlight
|
||||||
## The community spotlight gives new users a starting point on who
|
## The community spotlight gives new users a starting point on who
|
||||||
## could be interesting Diasporas community. To add a person
|
## could be interesting Diasporas community. To add a person
|
||||||
|
|
|
||||||
16
features/donations.feature
Normal file
16
features/donations.feature
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
@javascript
|
||||||
|
Feature: donations
|
||||||
|
In order to accept donation
|
||||||
|
As a podmin
|
||||||
|
I want a donation box shown on the stream page
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given following user exists:
|
||||||
|
| username | email |
|
||||||
|
| Alice | alice@alice.alice |
|
||||||
|
And I sign in as "alice@alice.alice"
|
||||||
|
|
||||||
|
Scenario: Bitcoin donations
|
||||||
|
Given I have configured a Bitcoin wallet
|
||||||
|
And I am on the home page
|
||||||
|
Then I should see the Bitcoin wallet ID
|
||||||
|
|
@ -308,3 +308,11 @@ end
|
||||||
When /^I focus the "([^"]+)" field$/ do |field|
|
When /^I focus the "([^"]+)" field$/ do |field|
|
||||||
find_field(field).click
|
find_field(field).click
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Given /^I have configured a Bitcoin wallet$/ do
|
||||||
|
AppConfig.settings.bitcoin_wallet_id = "AAAAAA"
|
||||||
|
end
|
||||||
|
|
||||||
|
Then /^I should see the Bitcoin wallet ID$/ do
|
||||||
|
find("#bitcoin_address")['value'].should == "AAAAAA"
|
||||||
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue