23 lines
483 B
Ruby
23 lines
483 B
Ruby
#
|
|
# API Docs: https://docs.btcpayserver.org/API/Greenfield/v1/
|
|
#
|
|
class BtcpayManagerService < RestApiService
|
|
private
|
|
|
|
def base_url
|
|
@base_url ||= "#{Setting.btcpay_api_url}/stores/#{Setting.btcpay_store_id}"
|
|
end
|
|
|
|
def auth_token
|
|
@auth_token ||= Setting.btcpay_auth_token
|
|
end
|
|
|
|
def headers
|
|
{
|
|
"Content-Type" => "application/json",
|
|
"Accept" => "application/json",
|
|
"Authorization" => "token #{auth_token}"
|
|
}
|
|
end
|
|
end
|