/**
  * Gets the actual payment status in the database (useful for verifying a payment has actually been updated)
  * @global WPDB $wpdb
  * @param EE_Payment $payment
  * @return string
  */
 protected function _get_payment_status_in_db(EE_Payment $payment)
 {
     global $wpdb;
     $esp_payment = $payment->get_model()->table();
     return $wpdb->get_var($wpdb->prepare("SELECT STS_ID FROM {$esp_payment} WHERE PAY_ID = %d", $payment->ID()));
 }