I'm able to generate a product key for a single product using the php code below (replacing the X's and Y's with actual Version IDs) but when I attempt to move the SendPKeys function inside the while loop (before $ylCart->MoveNext();) in order to generate a key for more than one product (makes sense in my head), I encounter the following error: Fatal error: Cannot redeclare class LimeLM in /hermes/bosweb25c/b1408/ipg.youthlightcom/ssl/LimeLM.php on line 3. Can you specify what I will need to change in order to allow my customer to generate product keys for two or more separate products? I appreciate your help!
if ($WAGatewayResponse) { $ylCart->redirStr = "checkout_success.php"; if($downloads > 0){ require('PaymentSettings.php'); $custEmail = $_POST["email"]; $firstName = $_POST["firstname"]; $lastName = $_POST["lastname"]; while ( !$ylCart->EOF() ) { $itemID = "".$ylCart->DisplayInfo("ID") .""; if($itemID == 3075){ $LimeLM_VersionID = 'XXXX'; $quantity = "".$ylCart->DisplayInfo("Quantity") .""; $AppName = "".$ylCart->DisplayInfo("Name") .""; $AppPrice = "".$ylCart->DisplayInfo("Price") .""; } elseif($itemID == 3076){ $LimeLM_VersionID = 'YYYY'; $quantity = "".$ylCart->DisplayInfo("Quantity") .""; $AppName = "".$ylCart->DisplayInfo("Name") .""; $AppPrice = "".$ylCart->DisplayInfo("Price") .""; } $ylCart->MoveNext(); } SendPKeys($quantity, $custEmail, $firstName, $lastName, $AppName); $ylCart->MoveFirst(); } }