mirror of
https://github.com/neocities/neocities.git
synced 2025-07-25 11:58:28 +02:00
experimental support for site tipping integration via paypal or bitcoin
This commit is contained in:
parent
119381c222
commit
571e445dc3
10 changed files with 146 additions and 2 deletions
|
@ -910,6 +910,14 @@ class Site < Sequel::Model
|
|||
errors.add :email, 'A valid email address is required.'
|
||||
end
|
||||
|
||||
if !values[:tipping_paypal].blank? && (values[:tipping_paypal] =~ EMAIL_SANITY_REGEX).nil?
|
||||
errors.add :tipping_paypal, 'A valid PayPal tipping email address is required.'
|
||||
end
|
||||
|
||||
if !values[:tipping_bitcoin].blank? && !BitcoinValidator.valid_address?(values[:tipping_bitcoin])
|
||||
errors.add :tipping_bitcoin, 'Bitcoin tipping address is not valid.'
|
||||
end
|
||||
|
||||
# Check for existing user
|
||||
user = self.class.select(:id, :username).filter(username: values[:username]).first
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue