upgrades: add authorize.net integration.

Add integration for accepting payments with Authorize.net.

https://developer.authorize.net/hello_world.html
This commit is contained in:
evazion
2022-05-15 00:39:31 -05:00
parent 4b65e96abc
commit 1eb15da7c5
11 changed files with 340 additions and 17 deletions

View File

@@ -402,6 +402,26 @@ module Danbooru
def stripe_promotion_discount_id
end
# The login ID for Authorize.net. Used for accepting payments for user upgrades.
# Signup for a test account at https://developer.authorize.net/hello_world/sandbox.html.
def authorize_net_login_id
end
# The transaction key for Authorize.net. This is the API secret for API calls.
def authorize_net_transaction_key
end
# The signature key for Authorize.net. Used for verifying webhooks sent by Authorize.net.
# Generate at Account > Settings > Security Settings > General Security Settings > API Credentials and Keys
def authorize_net_signature_key
end
# Whether to use the test environment or the live environment for Authorize.net. The test environment
# allows testing payments without using real credit cards.
def authorize_net_test_mode
true
end
def twitter_api_key
end

View File

@@ -283,6 +283,7 @@ Rails.application.routes.draw do
resources :user_name_change_requests, only: [:new, :create, :show, :index]
resources :webhooks do
post :receive, on: :collection
post :authorize_net, on: :collection
end
resources :wiki_pages, id: /.+?(?=\.json|\.xml|\.html)|.+/ do
put :revert, on: :member