Added sandbox to settings

This commit is contained in:
2025-07-08 21:01:48 -04:00
parent eba3f529f8
commit 55d00f9005
4 changed files with 12 additions and 3 deletions

View File

@@ -72,6 +72,10 @@ module QuickbooksOauth
oauth_consumer_key = Setting.plugin_redmine_qbo['settingsOAuthConsumerKey']
oauth_consumer_secret = Setting.plugin_redmine_qbo['settingsOAuthConsumerSecret']
# Are we are playing in the sandbox?
Quickbooks.sandbox_mode = Setting.plugin_redmine_qbo['sandbox'] ? true : false
logger.info "Sandbox mode: #{Quickbooks.sandbox_mode}"
options = {
site: "https://appcenter.intuit.com/connect/oauth2",
authorize_url: "https://appcenter.intuit.com/connect/oauth2",

View File

@@ -57,6 +57,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
</td>
</tr>
<tr>
<th><%=t(:label_sandbox)%></th>
<td>
<%= check_box_tag 'settings[sandbox]', @settings['sandbox'], @settings['sandbox'] %>
</td>
</tr>
<tr>
<th><%=t(:label_oauth_expires)%></th>
<td><%= if Qbo.exists? then Qbo.first.oauth2_access_token_expires_at end %>