Exemplo n.º 1
0
 $foretag->setPayerCo($req->co);
 $foretag->setPayerZipCode($req->zip);
 $foretag->setPayerCity($req->city);
 $foretag->setPayerEmail($req->email);
 $foretag->setPayerPhone($req->phone);
 $foretag->setPayerMobile($req->phone);
 $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;