<commit_before><?php
use PayPal\Ipn\Listener;
use PayPal\Ipn\Message;
use PayPal\Ipn\Verifier\CurlVerifier;

class DonationController extends \BaseController {

  public function DonationAction() {

  }

  public function IPNAction() {
    $listener = new Listener;
    $verifier = new CurlVerifier;
    $ipnMessage = Message::createFromGlobals(); // uses php://input

    $verifier->setIpnMessage($ipnMessage);
    $verifier->setEnvironment('sandbox'); // can either be sandbox or production

    $listener->setVerifier($verifier);

    $listener->listen(function() use ($listener) {
        // on verified IPN (everything is good!)
      $resp = $listener->getVerifier()->getVerificationResponse();
      var_dump(true,$resp,$ipnMessage);
      Log::info($resp);
      dd();
    }, function() use ($listener) {
        // on invalid IPN (somethings not right!)
      $report = $listener->getReport();
      $resp = $listener->getVerifier()->getVerificationResponse();
      var_dump(false,$resp);
      dd();
    });
  }

}<commit_msg>im so bad at this<commit_after><?php
use PayPal\Ipn\Listener;
use PayPal\Ipn\Message;
use PayPal\Ipn\Verifier\CurlVerifier;

class DonationController extends \BaseController {

  public function DonationAction() {

  }

  public function IPNAction() {
    $listener = new Listener;
    $verifier = new CurlVerifier;
    $ipnMessage = Message::createFromGlobals(); // uses php://input

    $verifier->setIpnMessage($ipnMessage);
    $verifier->setEnvironment('sandbox'); // can either be sandbox or production

    $listener->setVerifier($verifier);

    $listener->listen(function() use ($listener) {
        // on verified IPN (everything is good!)
      $resp = $listener->getVerifier()->getVerificationResponse();
      Log::info('stuff123', $resp);
      dd();
    }, function() use ($listener) {
        // on invalid IPN (somethings not right!)
      $report = $listener->getReport();
      $resp = $listener->getVerifier()->getVerificationResponse();
      Log::info('stuff', (array) $resp);
      dd();
    });
  }

}
{'fraction_non_alphanumeric': 0.1513094083414161, 'fraction_numerical': 0.001454898157129001, 'mean_word_length': 3.534065934065934, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2873223', 'n_tokens_mistral': 643, 'n_tokens_neox': 611, 'n_words': 136}