}
         }
         //PROCESS REQUEST
         $class_plog = new payone_logger();
         $process_time = date('Y-m-d H-i:s');
         $fconnect = new financegateConnect();
         $fconnect->setApiUrl(PAYONE_API_URL);
         $response = $fconnect->processByArray($request);
         $result = $order_id;
         if (!is_array($response)) {
             $result .= ',0';
             //$result = "<b>Error in Connection</b>";
         } else {
             if ($response['status'] == 'APPROVED') {
                 $result .= ',1';
                 $payi->markSubmitted($response);
                 if ($response['userid'] != '') {
                     tep_db_query("UPDATE jng_sp_customers SET payone_userid = " . tep_db_prepare_input($response['userid']));
                 }
             } else {
                 $result .= ',0';
                 //$result = "<b>Error in Submission</b>";
             }
             //$result  = "<b>Response:<br /></b>";
             //foreach($response as $key => $val) $result .= $key."=".$val."<br />";
             //$result .= "<br />";
         }
         $class_plog->add('S', $process_time, $process_method, $request, $response);
     }
 }
 echo utf8_encode($result);