/**
  * If debugging is enabled on the gateway, this will log API requests/responses.
  *
  * @param  array  $args     Arguments passed to API
  * @param  mixed  $response Response from API.
  *
  * @return void
  */
 private function log($args, $response)
 {
     if ($this->setting->get('debugging')) {
         add_filter('wpsc_logging_post_type_args', 'WPSC_Logging::force_ui');
         add_filter('wpsc_logging_taxonomy_args ', 'WPSC_Logging::force_ui');
         $log_data = array('post_title' => 'Amazon API Operation Failure', 'post_content' => 'There was an error processing the payment. Find details in the log entry meta fields.' . var_export($response, true), 'log_type' => 'error');
         $log_meta = $args;
         WPSC_Logging::insert_log($log_data, $log_meta);
     }
 }
 /**
  * Log an error message
  *
  * @param PHP_Merchant_Paypal_Express_Checkout_Response $response
  * @return void
  *
  * @since 3.9
  */
 public function log_error($response)
 {
     if ($this->setting->get('debugging')) {
         add_filter('wpsc_logging_post_type_args', 'WPSC_Logging::force_ui');
         add_filter('wpsc_logging_taxonomy_args ', 'WPSC_Logging::force_ui');
         $log_data = array('post_title' => 'PayPal ExpressCheckout Operation Failure', 'post_content' => 'There was an error processing the payment. Find details in the log entry meta fields.', 'log_type' => 'error');
         $log_meta = array('correlation_id' => $response->get('correlation_id'), 'time' => $response->get('datetime'), 'errors' => $response->get_errors());
         $log_entry = WPSC_Logging::insert_log($log_data, $log_meta);
     }
 }
 /**
  * Log an error message
  *
  * @param PHP_Merchant_Paypal_Pro_Response $response
  * @return void
  *
  * @since 3.9
  */
 public function log_error($response)
 {
     if ($this->setting->get('debugging')) {
         $log_data = array('post_title' => 'PayPal Pro Operation Failure', 'post_content' => 'There was an error processing the payment. Find details in the log entry meta fields.', 'log_type' => 'error');
         $log_meta = array('correlation_id' => $response->get('correlation_id'), 'time' => $response->get('datetime'), 'errors' => $response->get_errors());
         $log_entry = WPSC_Logging::insert_log($log_data, $log_meta);
     }
 }