Add PayPal WPS payment payload information to Commerce admin e-mail
You can extract those array and add them data object. After adding them to the token replace function you can use that to create custom tokens which will help you to get the tokens.
That custom tokens can now be used to get the buyer's email address

// Write a code for porting data to token_replace()
$data = new val();
$data-&gt;mc_gross = variable_get('mc_gross', '');
$data-&gt;invoice = variable_get('invoice', '');
$data-&gt;protection_eligibility = variable_get('protection_eligibility', '');
$data-&gt;invoice = variable_get('payer_email', '');
token_replace(['payload']', (array) $data);


--------write this in  module_name.tokens.inc file------------------------------------------

 function hook_token_info() {
      $info = array();

      // Add any new tokens.
      $info['tokens']['payload']['mc_gross'] = t('Gross');
      $info['tokens']['payload']['invoice'] = t('Invoice');
      $info['tokens']['payload']['protection_eligibility'] = t('Protection Eligibility');
      $info['tokens']['payload']['payer_email'] = t('Email');
      // Return them.
      return $info;
    }


    function hook_tokens($type, $tokens, array $data = array(), array $options = array()) {
     $replacements = array();


    if ($type == 'payload') {
    foreach ($tokens as $name =&gt; $original) {
          switch ($name) {
            case 'mc_gross':
              $replacements[$original] = $data['mc_gross'] ;
              break;
            case 'invoice':
              $replacements[$original] = $data['invoice'];
              break;
            case 'protection_eligibility':
              $replacements[$original] =  $data['protection_eligibility'];
              break;
            case 'payer_email':
              $replacements[$original] = $data['payer_email'];
              break;
          }
        }
      }

      return $replacements;
    }