Changeset 3287
- Timestamp:
- 06/01/2016 07:25:41 PM (9 years ago)
- Location:
- sites/trunk/wordcamp.org/public_html/wp-content/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/sponsor-invoices-dashboard.php
r3120 r3287 2 2 3 3 namespace WordCamp\Budgets_Dashboard\Sponsor_Invoices; 4 use \WordCamp\Logger; 4 5 5 6 defined( 'WPINC' ) or die(); … … 218 219 219 220 $quickbooks_result = \WordCamp_QBO_Client::send_invoice_to_quickbooks( $invoice_id ); 221 Logger\log( 'send_invoice', compact( 'invoice_id', 'quickbooks_result' ) ); 220 222 221 223 if ( is_int( $quickbooks_result ) ) { … … 333 335 $status_message = "has been sent to $sponsor_name via $sponsor_email. You will receive another notification when they have paid the invoice."; 334 336 $invoice_filename = \WordCamp_QBO_Client::get_invoice_filename( $qbo_invoice_id ); 337 338 Logger\log( 'get_invoice_filename', compact( 'qbo_invoice_id', 'invoice_filename' ) ); 335 339 336 340 if ( ! is_wp_error( $invoice_filename ) ) { -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-qbo-client/wordcamp-qbo-client.php
r3119 r3287 3 3 * Plugin Name: WordCamp.org QBO Client 4 4 */ 5 6 use WordCamp\Logger; 5 7 6 8 class WordCamp_QBO_Client { … … 92 94 93 95 $request_url = esc_url_raw( self::$api_base . '/classes/' ); 94 $re sponse = wp_remote_get( $request_url,array(96 $request_args = array( 95 97 'headers' => array( 96 98 'Content-Type' => 'application/json', 97 99 'Authorization' => self::_get_auth_header( 'get', $request_url ), 98 100 ), 99 ) ); 101 ); 102 $response = wp_remote_get( $request_url, $request_args ); 103 104 Logger\log( 'remote_request', compact( 'request_url', 'request_args', 'response' ) ); 100 105 101 106 $classes = array(); … … 236 241 $body = json_encode( $body ); 237 242 $request_url = esc_url_raw( self::$api_base . '/expense/' ); 238 $re sponse = wp_remote_post( $request_url,array(243 $request_args = array( 239 244 'body' => $body, 240 245 'headers' => array( … … 242 247 'Authorization' => self::_get_auth_header( 'post', $request_url, $body ), 243 248 ), 244 ) ); 249 ); 250 $response = wp_remote_post( $request_url, $request_args ); 251 252 Logger\log( 'remote_request', compact( 'request_url', 'request_args', 'response' ) ); 245 253 246 254 if ( is_wp_error( $response ) ) { … … 280 288 $response = wp_remote_post( $request['url'], $request['args'] ); 281 289 290 Logger\log( 'remote_request', compact( 'request', 'response' ) ); 291 282 292 if ( is_wp_error( $response ) ) { 283 293 $sent = $response->get_error_message(); … … 390 400 $response = wp_remote_get( $request['url'], $request['args'] ); 391 401 402 Logger\log( 'remote_request', compact( 'request', 'response' ) ); 403 392 404 if ( ! is_wp_error( $response ) ) { 393 405 $body = json_decode( wp_remote_retrieve_body( $response ) ); … … 444 456 $response = wp_remote_get( $request['url'], $request['args'] ); 445 457 458 Logger\log( 'remote_request', compact( 'request', 'response' ) ); 459 446 460 if ( is_wp_error( $response ) ) { 447 461 $result = $response;
Note: See TracChangeset
for help on using the changeset viewer.