Exemple #1
0
                 $file_path = $stamped_file_url;
                 $eStore_debug_manager->downloads('File stamped successfully. Stamped file URL: ' . $file_path, ESTORE_LEVEL_SUCCESS);
             } else {
                 $stamping_error = "Failed to retrieve customer data for the given transaction ID! Make sure you made a live transaction before exercising the download option with PDF stamping. PDF file stamping does not work unless real customer details is present from the gateway transaction.";
                 $eStore_debug_manager->downloads($stamping_error, ESTORE_LEVEL_FAILURE);
                 eStore_dlvs::error($stamping_error);
                 exit;
             }
         } else {
             $eStore_debug_manager->downloads("Failed to retrieve download link details for the given file key!", ESTORE_LEVEL_FAILURE);
         }
     }
 }
 // Attempt to convert $file_path from a URL into a relative or absolute file path.
 $eStore_debug_manager->downloads("Unresolved DL file path = {$file_path}", ESTORE_LEVEL_STATUS);
 $file_path = eStore_dlfilepath::url_to_path_converter($file_path);
 $eStore_debug_manager->downloads("Resolved DL file path = {$file_path}", ESTORE_LEVEL_STATUS);
 // Issue a debugger warning, if PHP Safe Mode is on...
 if (ini_get('safe_mode') == '1') {
     $eStore_debug_manager->downloads('PHP safe mode ON.', ESTORE_LEVEL_WARNING);
 }
 if (preg_match("/^http/i", $file_path) == 1) {
     // Sigh, we are still "stuck" with a URL...
     $eStore_debug_manager->downloads('No DL file path conversion performed on URL.', ESTORE_LEVEL_ADVISORY);
     if (ini_get('allow_url_fopen') != '1') {
         // Grrr, URL aware fopen are disabled...
         $eStore_debug_manager->downloads('URL aware fropen() disabled, forcing cURL...', ESTORE_LEVEL_ADVISORY);
         $retVal = download_dispatch($file_path, $file_name, 7);
         // Force use of cURL method.
     } else {
         // Use configured download method on a URL...