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

@@ -1,7 +1,8 @@
# frozen_string_literal: true
class WebhooksController < ApplicationController
skip_forgery_protection only: :receive
skip_forgery_protection only: [:receive, :authorize_net]
rescue_with Stripe::SignatureVerificationError, status: 400
rescue_with DiscordSlashCommand::WebhookVerificationError, status: 401
@@ -17,4 +18,9 @@ class WebhooksController < ApplicationController
head 400
end
end
def authorize_net
PaymentTransaction::AuthorizeNet.receive_webhook(request)
head 200
end
end