Skip to content

Commit

Permalink
QuickBooks: Add OAuth2 authentication flow (#285)
Browse files Browse the repository at this point in the history
Our current QuickBooks authentication uses OAuth 1.0, however Intuit is deprecating that method on December 17th in favor of OAuth 2.0. This adds tools to authenticate with OAuth 2.0, using Intuit's QuickBooks V3 PHP SDK. This will also set us up for using more of the SDK's functionality in the future for improvements to our payments and reporting.

Fixes #283
  • Loading branch information
coreymckrill authored Nov 20, 2019
1 parent 55064b0 commit 0383873
Show file tree
Hide file tree
Showing 9 changed files with 733 additions and 421 deletions.
15 changes: 10 additions & 5 deletions .docker/wp-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
define( 'CUSTOM_USER_TABLE', 'wc_users' );
define( 'CUSTOM_USER_META_TABLE', 'wc_usermeta' );

$table_prefix = 'wc_';
$table_prefix = 'wc_'; // phpcs:ignore WordPress.WP.GlobalVariablesOverride

/*
* Multisite
Expand All @@ -28,13 +28,13 @@
$wcorg_domain_current_site = 'wordcamp.test';
}

define( 'WP_ALLOW_MULTISITE', true ); // Temporary workaround for https://github.com/Automattic/wp-super-cache/issues/97
define( 'WP_ALLOW_MULTISITE', true ); // Temporary workaround for https://github.com/Automattic/wp-super-cache/issues/97.
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', true );
define( 'DOMAIN_CURRENT_SITE', $wcorg_domain_current_site );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 5 ); // central.wordcamp.test
define( 'BLOG_ID_CURRENT_SITE', 5 ); // central.wordcamp.test.
define( 'NOBLOGREDIRECT', 'https://central.wordcamp.test' );
define( 'SUNRISE', true );
define( 'CLI_HOSTNAME_OVERRIDE', 'wordcamp.test' );
Expand All @@ -48,7 +48,7 @@
define( 'WP_DEBUG_DISPLAY', true );
define( 'SAVEQUERIES', true );
define( 'DIEONDBERROR', false );
define( 'SCRIPT_DEBUG', false ); // Temporarily disabled because of https://github.com/WordPress/gutenberg/issues/7897 / https://github.com/WordPress/gutenberg/issues/11360
define( 'SCRIPT_DEBUG', false ); // Temporarily disabled because of https://github.com/WordPress/gutenberg/issues/7897 / https://github.com/WordPress/gutenberg/issues/11360.
define( 'JETPACK_DEV_DEBUG', true );


Expand Down Expand Up @@ -89,7 +89,7 @@
define( 'EMAIL_CENTRAL_SUPPORT', '[email protected]' );

$trusted_deputies = array(
3, // role-tester
3, // role-tester.
);


Expand All @@ -108,6 +108,11 @@
define( 'WORDCAMP_QBO_CONSUMER_SECRET', '' );
define( 'WORDCAMP_QBO_HMAC_KEY', '' );

define( 'WORDCAMP_SANDBOX_QBO_CLIENT_ID', '' );
define( 'WORDCAMP_SANDBOX_QBO_CLIENT_SECRET', '' );
define( 'WORDCAMP_PRODUCTION_QBO_CLIENT_ID', '' );
define( 'WORDCAMP_PRODUCTION_QBO_CLIENT_SECRET', '' );

define( 'REMOTE_CSS_GITHUB_ID', '' );
define( 'REMOTE_CSS_GITHUB_SECRET', '' );

Expand Down
3 changes: 0 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
},
"vendor-dir": "public_html/wp-content/mu-plugins/vendor"
},
"require": {
"league/oauth2-client": "2.4.1"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
"wp-coding-standards/wpcs": "2.*",
Expand Down
Loading

0 comments on commit 0383873

Please sign in to comment.