original_string: public static function message_paypal_error_to_admin($subject, $data) {
          $admin = get_admin();
          $site = get_site();
  
          $message = "$site->fullname:  Transaction failed.\n\n$subject\n\n";
  
          foreach ($data as $key => $value) {
              $message .= "$key => $value\n";
          }
  
          $eventdata = new \core\message\message();
          $eventdata->courseid          = empty($data->courseid) ? SITEID : $data->courseid;
          $eventdata->modulename        = 'moodle';
          $eventdata->component         = 'enrol_paypal';
          $eventdata->name              = 'paypal_enrolment';
          $eventdata->userfrom          = $admin;
          $eventdata->userto            = $admin;
          $eventdata->subject           = "PAYPAL ERROR: ".$subject;
          $eventdata->fullmessage       = $message;
          $eventdata->fullmessageformat = FORMAT_PLAIN;
          $eventdata->fullmessagehtml   = '';
          $eventdata->smallmessage      = '';
          message_send($eventdata);
      }
code: public static function message_paypal_error_to_admin($subject, $data) {
          $admin = get_admin();
          $site = get_site();
  
          $message = "$site->fullname:  Transaction failed.\n\n$subject\n\n";
  
          foreach ($data as $key => $value) {
              $message .= "$key => $value\n";
          }
  
          $eventdata = new \core\message\message();
          $eventdata->courseid          = empty($data->courseid) ? SITEID : $data->courseid;
          $eventdata->modulename        = 'moodle';
          $eventdata->component         = 'enrol_paypal';
          $eventdata->name              = 'paypal_enrolment';
          $eventdata->userfrom          = $admin;
          $eventdata->userto            = $admin;
          $eventdata->subject           = "PAYPAL ERROR: ".$subject;
          $eventdata->fullmessage       = $message;
          $eventdata->fullmessageformat = FORMAT_PLAIN;
          $eventdata->fullmessagehtml   = '';
          $eventdata->smallmessage      = '';
          message_send($eventdata);
      }
code_tokens: public static function message_paypal_error_to_admin ( $ subject , $ data ) { $ admin = get_admin ( ) ; $ site = get_site ( ) ; $ message = "$site->fullname:  Transaction failed.\n\n$subject\n\n" ; foreach ( $ data as $ key => $ value ) { $ message .= "$key => $value\n" ; } $ eventdata = new \ core \ message \ message ( ) ; $ eventdata -> courseid = empty ( $ data -> courseid ) ? SITEID : $ data -> courseid ; $ eventdata -> modulename = 'moodle' ; $ eventdata -> component = 'enrol_paypal' ; $ eventdata -> name = 'paypal_enrolment' ; $ eventdata -> userfrom = $ admin ; $ eventdata -> userto = $ admin ; $ eventdata -> subject = "PAYPAL ERROR: " . $ subject ; $ eventdata -> fullmessage = $ message ; $ eventdata -> fullmessageformat = FORMAT_PLAIN ; $ eventdata -> fullmessagehtml = '' ; $ eventdata -> smallmessage = '' ; message_send ( $ eventdata ) ; }
docstring: Alerts site admin of potential problems.
  
  @param string   $subject email subject
  @param stdClass $data    PayPal IPN data
docstring_tokens: Alerts site admin of potential problems .