Skip to content

Commit

Permalink
Quickbooks: Moved oauth consumer key and secret to config.yml.copy
Browse files Browse the repository at this point in the history
  • Loading branch information
tabish-saleem-nxb committed Apr 16, 2018
1 parent 075e83f commit de6dfa0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
8 changes: 7 additions & 1 deletion config/config.yml.copy
Expand Up @@ -21,6 +21,9 @@ development:
user_name: 'YOUR_EMAIL_HERE'
password: 'YOUR_PASSWORD_HERE'

oauth_consumer_key: 'YOUR_QUICKBOOKS_APP_CLIENT_ID'
oauth_consumer_secret: 'YOUR_QUICKBOOKS_APP_CLIENT_SECRET'


encryption_key: ENTER-YOUR-ENCRYPTED-KEY-HERE

Expand Down Expand Up @@ -48,5 +51,8 @@ production:
user_name: 'YOUR_EMAIL_HERE'
password: 'YOUR_PASSWORD_HERE'

oauth_consumer_key: 'YOUR_QUICKBOOKS_APP_CLIENT_ID'
oauth_consumer_secret: 'YOUR_QUICKBOOKS_APP_CLIENT_SECRET'


encryption_key: ENTER-YOUR-ENCRYPTED-KEY-HERE
encryption_key: ENTER-YOUR-ENCRYPTED-KEY-HERE
3 changes: 3 additions & 0 deletions config/initializers/config.rb
Expand Up @@ -16,6 +16,9 @@ module CONFIG
WKHTMTTOPDF_PATH ||= APP_CONFIG[:wkhtmltopdf_path]

SMTP_SETTING ||= APP_CONFIG[:smtp_setting]
OAUTH_CONSUMER_KEY ||= APP_CONFIG[:oauth_consumer_key]
OAUTH_CONSUMER_SECRET ||= APP_CONFIG[:oauth_consumer_secret]


ENCRYPTION_KEY ||= APP_CONFIG[:encryption_key]

Expand Down
19 changes: 5 additions & 14 deletions config/initializers/quickbooks.rb
@@ -1,16 +1,7 @@
#Developemnt
OAUTH_CONSUMER_KEY = "Q0pXk97gDUL216bKrXxkpvwtQRcHiziESQnX2UPa8DPYEgqVWT" #new sandbox a/c for tabish.saleem@nxb.com
OAUTH_CONSUMER_SECRET = "mN2DSkq4HZeq3CnmzmtE1veDRfj3HhhYCOJXWTno" #new sandbox a/c for tabish.saleem@nxb.com

#Production
# OAUTH_CONSUMER_KEY = "Q0MKd1gPqFPsQuNK4BqqLzUtnJAeNqggYzHOO0avNaoVsxHXu6" #new LIVE APP a/c for tabish.saleem@nxb.com
# OAUTH_CONSUMER_SECRET = "FUO3GbohDyti4Ec9CP22TftwJNSDI56TZCgQrSO8" #new LIVE APP a/c for tabish.saleem@nxb.com

oauth_params = {
:site => "https://appcenter.intuit.com/connect/oauth2",
:authorize_url => "https://appcenter.intuit.com/connect/oauth2",
:token_url => "https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer"
}

::QB_OAUTH2_CONSUMER = OAuth2::Client.new(OAUTH_CONSUMER_KEY, OAUTH_CONSUMER_SECRET, oauth_params)
site: 'https://appcenter.intuit.com/connect/oauth2',
authorize_url: 'https://appcenter.intuit.com/connect/oauth2',
token_url: 'https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer'
}
::QB_OAUTH2_CONSUMER = OAuth2::Client.new(OSB::CONFIG::OAUTH_CONSUMER_KEY, OSB::CONFIG::OAUTH_CONSUMER_SECRET, oauth_params)
Quickbooks.sandbox_mode = true

0 comments on commit de6dfa0

Please sign in to comment.