Beispiel #1
0
     $paymentDataVersion = $paymentOperationData !== null ? $paymentOperationData['version'] : 0;
     if ($paymentOperationData !== null && $paymentOperationData['data'] !== null) {
         $paymentData = $paymentOperationData['data']->getData();
     }
     include DIR_VIEWS . '/paygate.php';
 } else {
     if ($action == 'confirm_sms_input') {
         $paymentId = $_SESSION[SESSION_KEY];
         $employeeId = $_REQUEST['employee_id'];
         $smsData = $apiClient->beginConfirmation($paymentId, $employeeId);
         include DIR_VIEWS . '/confirm_sms_input.php';
     } else {
         if ($action == 'confirm_final') {
             $paymentId = $_SESSION[SESSION_KEY];
             $smsCode = $_REQUEST['sms_code'];
             $transactionData = $apiClient->completeConfirmation($paymentId, $smsCode);
             include DIR_VIEWS . '/confirm_final.php';
         } else {
             if ($action == 'add_employees') {
                 $paymentId = $_SESSION[SESSION_KEY];
                 $paymentData = unserialize(file_get_contents(DIR_REPOSITORY . '/' . $paymentId));
                 if (!empty($paymentData) && !empty($paymentData['data']) && !empty($paymentData['data']->getData()->getEmployees())) {
                     $availableEmployees = $paymentData['data']->getData()->getEmployees();
                 } else {
                     $availableEmployees = null;
                 }
                 include DIR_VIEWS . '/add_employees.php';
             } else {
                 if ($action == 'do_add_employees') {
                     $paymentId = $_SESSION[SESSION_KEY];
                     $employeeId = isset($_REQUEST['employee_id']) && !empty($_REQUEST['employee_id']) ? $_REQUEST['employee_id'] : null;