Esempio n. 1
0
 $foretag->setPayerCountry($req->country);
 $foretag->setReciverCompanyName($req->delCompany);
 $foretag->setReciverName($req->delFname . " " . $req->delLname);
 $req->delStreet = $req->delStreet1;
 !empty($req->delStreet2) ? $req->delStreet = $req->delStreet . ' ;; ' . $req->delStreet2 : null;
 !empty($req->delStreet3) ? $req->delStreet = $req->delStreet . ' ;; ' . $req->delStreet3 : null;
 $foretag->setReciverAddress($req->delStreet);
 $foretag->setReciverCo($req->delCo);
 $foretag->setReciverZipCode($req->delZip);
 $foretag->setReciverCity($req->delCity);
 $foretag->setReciverEmail($req->delEmail);
 $foretag->setReciverPhone($req->delPhone);
 $foretag->setReciverMobile($req->delPhone);
 $foretag->setReciverCountry($req->delCountry);
 $foretag->setCompanyName($req->company);
 $foretag->setCreatedDate();
 $foretag->setVeckor($req->veckor);
 $foretag->commit();
 $token = null;
 if ($req->paytype == 'Direktbetalning') {
     //do a payson connection
     $nbrpers = $req->RE03 + $req->RE04;
     $paysonMsg = "Motiomera, {$nbrpers} deltagare, {$req->RE03} stegräknare";
     if ($req->email == '*****@*****.**' or strpos($req->email, '@erendi.se') > 0) {
         $sumToPay = 1;
         //for testing only pay 1 kr and allways kristian@erendi.se, don't forget to return the money in payson
         $req->email = '*****@*****.**';
         $req->fname = 'kristian';
         $req->ename = 'erendi';
         $paysonMsg = $req->incmoms . ' ' . $paysonMsg;
     } else {