$amount = StripeGate\Utils::CleanPublicAmount($amount, $row['amountformat'], $symbol);
    } else {
        $amount = NULL;
    }
    $cvc = NULL;
    $month = NULL;
    $number = NULL;
    $payfor = !empty($params['payer']) ? $params['payer'] : NULL;
    $paywhat = !empty($params['payfor']) ? $params['payfor'] : NULL;
    $year = NULL;
}
$baseurl = $this->GetModuleURLPath();
$tplvars = array();
if ($row['stylesfile']) {
    //using custom css for checkout display
    $u = StripeGate\Utils::GetUploadsUrl($this) . '/' . str_replace('\\', '/', $row['stylesfile']);
} else {
    $u = $baseurl . '/css/payplus.css';
}
//replace href attribute in existing stylesheet link, or append styles link
$tplvars['cssscript'] = <<<EOS
<script type="text/javascript">
//<![CDATA[
var styler = document.getElementById('stripestyles');
if (styler != null) {
 styler.setAttribute('href',"{$u}");
} else {
 var linkadd = '<link rel="stylesheet" type="text/css" href="{$u}" />',
  \$head = \$('head'),
  \$linklast = \$head.find("link[rel='stylesheet']:last");
 if (\$linklast.length) {
 /**
 Export:
 @mod: reference to current StripeGate module object
 @account_id: optional account id, or array of such id's, default FALSE
 @record_id: optional record_id, or array of such id's, default FALSE
 @sep: optional field-separator for exported content, default ','
 At least one of @account_id or @record_id must be provided.
 Returns: TRUE on success, or lang key for error message upon failure
 */
 public function Export(&$mod, $account_id = FALSE, $record_id = FALSE, $sep = ',')
 {
     if (!($account_id || $record_id)) {
         return 'err_parameter';
     }
     $fname = self::ExportName($mod, $account_id, $record_id);
     if ($mod->GetPreference('export_file', FALSE)) {
         $updir = StripeGate\Utils::GetUploadsPath($mod);
         if ($updir) {
             $filepath = $updir . DIRECTORY_SEPARATOR . $fname;
             $fp = fopen($filepath, 'w');
             if ($fp) {
                 $success = self::CSV($mod, $account_id, $record_id, $fp, $sep);
                 fclose($fp);
                 if ($success) {
                     $url = StripeGate\Utils::GetUploadsUrl($mod) . '/' . $fname;
                     @ob_clean();
                     @ob_clean();
                     header('Location: ' . $url);
                     return TRUE;
                 }
             }
         }
     } else {
         $csv = self::CSV($mod, $account_id, $record_id, FALSE, $sep);
         if ($csv) {
             $config = cmsms()->GetConfig();
             if (!empty($config['default_encoding'])) {
                 $defchars = trim($config['default_encoding']);
             } else {
                 $defchars = 'UTF-8';
             }
             if (ini_get('mbstring.internal_encoding') !== FALSE) {
                 //conversion is possible
                 $expchars = $mod->GetPreference('export_file_encoding', 'ISO-8859-1');
                 $convert = strcasecmp($expchars, $defchars) != 0;
             } else {
                 $expchars = $defchars;
                 $convert = FALSE;
             }
             @ob_clean();
             @ob_clean();
             header('Pragma: public');
             header('Expires: 0');
             header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
             header('Cache-Control: private', FALSE);
             header('Content-Description: File Transfer');
             //note: some older HTTP/1.0 clients did not deal properly with an explicit charset parameter
             header('Content-Type: text/csv; charset=' . $expchars);
             header('Content-Length: ' . strlen($csv));
             header('Content-Disposition: attachment; filename=' . $fname);
             if ($convert) {
                 echo mb_convert_encoding($csv, $expchars, $defchars);
             } else {
                 echo $csv;
             }
             return TRUE;
         }
     }
     return 'err_export';
 }