chore: initial commit — Jumio IDV demo app

This commit is contained in:
administrator 2026-07-09 08:02:27 +00:00
commit b77392b639
34 changed files with 1930 additions and 0 deletions

9
.gitignore vendored Normal file
View file

@ -0,0 +1,9 @@
# macOS artifacts
.DS_Store
# Debug logs (generated at runtime when DEBUG=true)
html/log/
# Nginx backup configs
nginx/*.bak
nginx/*_old.conf

48
AGENTS.md Normal file
View file

@ -0,0 +1,48 @@
# AGENTS.md
## Project identity
- **Name**: idv-demo — Jumio identity verification (KYC/KYB) demo app
- **Stack**: vanilla PHP (no framework, no Composer), nginx + PHP-FPM
- **Owner**: customer-engineering / Sechpoint
## Repo setup
- **Git remote**: `https://git.sechpoint.app/customer-engineering/idv-demo.git`
- **Credentials**: source `~/bin/.gitenv` for `GIT_USER_NAME`, `GIT_USER_EMAIL`, `GIT_TOKEN`
- **Default branch**: `main`
- **Commit prefix convention**: `chore:`
## Architecture (non-obvious)
```
html/ → web root (deploys as /var/www/html/public — see nginx config)
index.php → single entry point (front controller)
class/ → core: config.php, site.php (session init), functions.php
app/
controler/ → routing: start.php (GET pages), request.php (POST actions)
model/ → Jumio API calls: M01.php, M04.php, docv.php, retrival_1.php, retrival_2.php, success.php
view/ → .phtml templates (header, footer, pages 0004, loader, results)
cdn/ → static assets (JS includes iovation/IGLOO blackbox)
lng/ → language strings: en/ (default), de/
nginx/ → nginx site config (serves from /var/www/html/public, PHP-FPM via socket)
```
- **No build tools, no tests, no CI/CD, no package manager** — it's raw PHP.
- Routing: URL segments drive pages (`$PARAMS[1]` in start.php); POST/GET `do` parameter drives actions (request.php).
- Jumio workflow: M01 (ID verification) → docv (document verification) → retrival → results.
## Dev mode
- Hostname starting with `dev` sets `DEBUG = TRUE` (`html/class/config.php` line 28).
- When DEBUG is true, `debug_log()` writes to `html/log/YYYYMM.log`. The `log/` directory must exist and be writable.
## Secrets warning
- `html/class/config.php` contains hardcoded Jumio API credentials. **Do not commit to public repos.**
## Nginx
- Active config: `nginx/default.conf`
- PHP-FPM socket: `unix:/run/php-fpm.sock`
- Clean URLs via `try_files $uri $uri/ /index.php?$args`
- Stale backup files in `nginx/`: `default_old.conf`, `default.conf.bak`, `default.bak.3.conf`
## Gotchas
- Filename `retrival` is intentionally misspelled (not "retrieval") — used consistently in `retrival_1.php`, `retrival_2.php`, and session keys.
- `html/` contains `.DS_Store` (macOS artifact) — should be gitignored.

View file

@ -0,0 +1,61 @@
<?php
#####################################################################################
# MIT License - Copyright 2019 Claus Lohmar
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the
# Software without restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
# Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#####################################################################################
if (!empty($PARAMS['2'])) {
if (DEBUG) {
switch ($PARAMS['2']) {
//==========>>
case 'workbanch':
include(__ROOT__.'/app/model/workbanch.php');
break;
//==========>>
case 'test':
include(__ROOT__.'/app/view/test.html');
break;
//==========>>
case 'clear':
session_unset();
session_destroy();
$_SESSION = array();
echo 'session clear success!<hr>';echo json_encode($_SESSION, JSON_PRETTY_PRINT);
break;
//==========>>
default:
debug_log("URI WRONG",$_SERVER['REQUEST_URI']);
$error_msg=ERROR_404;
include(__ROOT__.'/app/view/_header.phtml');
include(__ROOT__.'/app/view/page_error.phtml');
include(__ROOT__.'/app/view/_footer.phtml');
}
} else {
$_SESSION=array();
include(__ROOT__.'/app/view/_header.phtml');
include(__ROOT__.'/app/view/page_home.phtml');
include(__ROOT__.'/app/view/_footer.phtml');
}
} else {
$_SESSION=array();
include(__ROOT__.'/app/view/_header.phtml');
include(__ROOT__.'/app/view/page_home.phtml');
include(__ROOT__.'/app/view/_footer.phtml');
}

View file

@ -0,0 +1,116 @@
<?php
#####################################################################################
# MIT License - Copyright 2019 Claus Lohmar
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the
# Software without restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
# Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#####################################################################################
// inciate Demo
// ONLY 'do' IS ACCEPTED
// any incoming POST or GET is processed and submittet to the controler
// no direct database access and cleensing of data to avoid SQL injection
if(!empty($HTML_REQUEST['do'])){
switch ($HTML_REQUEST['do']) {
case 'access':
$_SESSION['SITE']['apiToken']=$HTML_REQUEST['token'];
$_SESSION['SITE']['datacenter']=$HTML_REQUEST['dc'];
$_SESSION['SITE']['access']='true';
header("Location:".$url_basic."home");exit;
break;
case 'one':
$_SESSION['TRANSACTION']['MODEL']="M01";
$_SESSION['TRANSACTION']["FORM"]['firstName']= $HTML_REQUEST['first-name'];
$_SESSION['TRANSACTION']["FORM"]['lastName']= $HTML_REQUEST['last-name'];
$_SESSION['TRANSACTION']["FORM"]['dateOfBirth']= $HTML_REQUEST['date-of-birth'];
$_SESSION['TRANSACTION']["FORM"]['street']= $HTML_REQUEST['street'];
$_SESSION['TRANSACTION']["FORM"]['city']= $HTML_REQUEST['city'];
$_SESSION['TRANSACTION']["FORM"]['postcode']= $HTML_REQUEST['postcode'];
$_SESSION['TRANSACTION']["FORM"]['country']= $HTML_REQUEST['country'];
$_SESSION['TRANSACTION']["FORM"]['phone']= $HTML_REQUEST['phone'];
$_SESSION['TRANSACTION']["FORM"]['email']= $HTML_REQUEST['email'];
include(__ROOT__.'/app/model/M01.php');
exit;
break;
case 'four':
$_SESSION['TRANSACTION']['MODEL']="M04";
$_SESSION['TRANSACTION']["FORM"]['firstName']= $HTML_REQUEST['first-name'];
$_SESSION['TRANSACTION']["FORM"]['lastName']= $HTML_REQUEST['last-name'];
$_SESSION['TRANSACTION']["FORM"]['dateOfBirth']= $HTML_REQUEST['date-of-birth'];
$_SESSION['TRANSACTION']["FORM"]['street']= $HTML_REQUEST['street'];
$_SESSION['TRANSACTION']["FORM"]['city']= $HTML_REQUEST['city'];
$_SESSION['TRANSACTION']["FORM"]['postcode']= $HTML_REQUEST['postcode'];
$_SESSION['TRANSACTION']["FORM"]['country']= $HTML_REQUEST['country'];
$_SESSION['TRANSACTION']["FORM"]['phone']= $HTML_REQUEST['phone'];
$_SESSION['TRANSACTION']["FORM"]['email']= $HTML_REQUEST['email'];
include(__ROOT__.'/app/model/M04.php');
exit;
break;
case 'callback':
echo "callback";
#include(__ROOT__.'/app/model/callback.php');
#header("Location:".$redirect_url);
exit;
break;
case 'success':
$_SESSION['TRANSACTION']["RETURN_2"]['accountId']= $HTML_REQUEST['accountId'];
$_SESSION['TRANSACTION']["RETURN_2"]['acquisitionStatus']= $HTML_REQUEST['acquisitionStatus'];
$_SESSION['TRANSACTION']["RETURN_2"]['customerInternalReference']= $HTML_REQUEST['customerInternalReference'];
$_SESSION['TRANSACTION']["RETURN_2"]['workflowExecutionId']= $HTML_REQUEST['workflowExecutionId'];
include(__ROOT__.'/app/model/success.php');
exit;
break;
case 'error':
$_SESSION['TRANSACTION']["RETURN_2"]['accountId']= $HTML_REQUEST['accountId'];
$_SESSION['TRANSACTION']["RETURN_2"]['acquisitionStatus']= $HTML_REQUEST['acquisitionStatus'];
$_SESSION['TRANSACTION']["RETURN_2"]['customerInternalReference']= $HTML_REQUEST['customerInternalReference'];
$_SESSION['TRANSACTION']["RETURN_2"]['workflowExecutionId']= $HTML_REQUEST['workflowExecutionId'];
$_SESSION['TRANSACTION']["RETURN_2"]['errorCode']= $HTML_REQUEST['errorCode'];
debug_log("Jumio Request Error",$HTML_REQUEST);
$error_msg=ERROR_404;
include(__ROOT__.'/app/view/_header.phtml');
include(__ROOT__.'/app/view/page_error.phtml');
include(__ROOT__.'/app/view/_footer.phtml');
exit;
break;
//==========>>
default:
echo "oh shit";
#debug_log("Request Wrong",$HTML_REQUEST);
#session_unset();
#session_destroy();
#$_SESSION = array();
#header('Location: '.$url_basic);
exit;
}
} else {
debug_log("Request Error",$HTML_REQUEST);
session_unset();
session_destroy();
$_SESSION = array();
header('Location: '.$url_basic);
exit;
}
#echo '<hr>'.json_encode($_SESSION, JSON_PRETTY_PRINT).'<hr>';exit;
?>

View file

@ -0,0 +1,87 @@
<?php
if (!empty($PARAMS['1'])) {
switch ($PARAMS['1']) {
//==========>> MENUE OPTIONS
case 'home':
include(__ROOT__.'/app/view/_header.phtml');
include(__ROOT__.'/app/view/page_00.phtml');
include(__ROOT__.'/app/view/_footer.phtml');
break;
case 'one':
$_SESSION['TRANSACTION']=array();
$_SESSION['TRANSACTION']["RETURN_1"]=array();
$_SESSION['TRANSACTION']["RETURN_2"]=array();
$_SESSION['TRANSACTION']["RETRIVAL_1"]=array();
$_SESSION['TRANSACTION']["RETRIVAL_2"]=array();
include(__ROOT__.'/app/view/_header.phtml');
include(__ROOT__.'/app/view/page_01.phtml');
include(__ROOT__.'/app/view/_footer.phtml');
break;
case 'two':
$_SESSION['TRANSACTION']=array();
$_SESSION['TRANSACTION']['status']='';
$_SESSION['TRANSACTION']["RETURN_1"]=array();
$_SESSION['TRANSACTION']["RETURN_2"]=array();
$_SESSION['TRANSACTION']["RETRIVAL_1"]=array();
$_SESSION['TRANSACTION']["RETRIVAL_2"]=array();
include(__ROOT__.'/app/view/_header.phtml');
include(__ROOT__.'/app/view/page_02.phtml');
include(__ROOT__.'/app/view/_footer.phtml');
break;
case 'three':
$_SESSION['TRANSACTION']=array();
$_SESSION['TRANSACTION']['status']='';
$_SESSION['TRANSACTION']["RETURN_1"]=array();
$_SESSION['TRANSACTION']["RETURN_2"]=array();
$_SESSION['TRANSACTION']["RETRIVAL_1"]=array();
$_SESSION['TRANSACTION']["RETRIVAL_2"]=array();
include(__ROOT__.'/app/view/_header.phtml');
include(__ROOT__.'/app/view/page_03.phtml');
include(__ROOT__.'/app/view/_footer.phtml');
break;
case 'four':
$_SESSION['TRANSACTION']=array();
$_SESSION['TRANSACTION']['status']='';
$_SESSION['TRANSACTION']["RETURN_1"]=array();
$_SESSION['TRANSACTION']["RETURN_2"]=array();
$_SESSION['TRANSACTION']["RETRIVAL_1"]=array();
$_SESSION['TRANSACTION']["RETRIVAL_2"]=array();
include(__ROOT__.'/app/view/_header.phtml');
include(__ROOT__.'/app/view/page_04.phtml');
include(__ROOT__.'/app/view/_footer.phtml');
break;
case 'results':
include(__ROOT__.'/app/view/_header.phtml');
include(__ROOT__.'/app/view/results.phtml');
include(__ROOT__.'/app/view/_footer.phtml');
break;
//==========>> FUNCTIONAL OPTIONS
case 'dev':
include(__ROOT__.'/app/controler/development.php');
break;
case 'q5b35W4M3cWt':
include(__ROOT__.'/app/view/dev_demo.html');
break;
case 'clear':
$url_basic=$_SESSION['SITE']['site_url'];
$_SESSION=array();
header('Location: '.$url_basic);
break;
//==========>>
default:
debug_log("URI WRONG",$_SERVER['REQUEST_URI']);
$error_msg=ERROR_404;
include(__ROOT__.'/app/view/_header.phtml');
include(__ROOT__.'/app/view/page_error.phtml');
include(__ROOT__.'/app/view/_footer.phtml');
}
} else {
$_SESSION=array();
include(__ROOT__.'/app/view/_header.phtml');
include(__ROOT__.'/app/view/page_home.phtml');
include(__ROOT__.'/app/view/_footer.phtml');
}

120
html/app/model/M01.php Normal file
View file

@ -0,0 +1,120 @@
<?php
$guid = strtoupper(bin2hex(openssl_random_pseudo_bytes(16)));
// Format the time in the specified format
$now = new DateTime();
$time = $now->format('Y-m-d\TH:i:s');
$consentTimeNow = $time . '.000Z';
$access_token = oAuth();
# === iniciate the transaction
# -- prepare the API request
$request_body ='{
"workflowDefinition": {
"key": "32003"
},
"customerInternalReference": "'.$guid.'",
"userReference": "'.$guid.'",
"reportingCriteria":"Jumio Web App",
"callbackUrl": "'.$_SESSION['SITE']['site_url'].'?do=callback",
"tokenLifetime": "90m",
"web":{
"successUrl":"'.$_SESSION['SITE']['site_url'].'?do=success",
"errorUrl":"'.$_SESSION['SITE']['site_url'].'?do=error"
},
"userConsent": {
"userIp": "'.$_SERVER['REMOTE_ADDR'].'",
"userLocation": {
"country": "GBR",
"state": ""
},
"consent": {
"obtained": "yes",
"obtainedAt": "'.$consentTimeNow.'"
},
"privacyPolicy": {
"read": "yes",
"readAt": "'.$consentTimeNow.'"
}
}
}';
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://account.".$_SESSION['SITE']['datacenter']."/api/v1/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $request_body,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ". $access_token ,
"Content-Type: application/json",
"User-Agent: Jumio SE Testing"
],
]);
$response_json = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
$_SESSION['SITE']['ERROR']="cURL Error #:" . $err;
$_SESSION['SITE']['ERROR']['API']=array();
$_SESSION['SITE']['ERROR']['API']=$response_json;
debug_log("API ERROR",json_encode($_SESSION, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT ));
$error_msg=ERROR_501;
include(__ROOT__.'/app/view/_header.phtml');
include(__ROOT__.'/app/view/page_error.phtml');
include(__ROOT__.'/app/view/_footer.phtml');
} else {
$iniciate=array();
$iniciate=json_decode($response_json,TRUE);
}
$prepared_data_url = $iniciate["workflowExecution"]["credentials"]["3"]["api"]["parts"]["prepared_data"];
$redirect_url = $iniciate["web"]["href"];
# ==== Prepare data
$request_body ='{
"firstName": "'.$_SESSION['TRANSACTION']["FORM"]['firstName'].'",
"lastName": "'.$_SESSION['TRANSACTION']["FORM"]['lastName'].'",
"dateOfBirth":"'.$_SESSION['TRANSACTION']["FORM"]['dateOfBirth'].'",
"email": "'.$_SESSION['TRANSACTION']["FORM"]['email'].'",
"phoneNumber": "'.$_SESSION['TRANSACTION']["FORM"]['phone'].'",
"address": {
"line1": "'.$_SESSION['TRANSACTION']["FORM"]['street'].'",
"postalCode": "'.$_SESSION['TRANSACTION']["FORM"]['postcode'].'",
"city": "'.$_SESSION['TRANSACTION']["FORM"]['city'].'",
"country": "'.$_SESSION['TRANSACTION']["FORM"]['country'].'"
}
}';
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $prepared_data_url ,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $request_body,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ". $access_token ,
"Content-Type: application/json",
"User-Agent: Jumio SE Testing"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
header("Location:".$redirect_url);
//====================================================
#echo '<hr>'.json_encode($_SESSION, JSON_PRETTY_PRINT).'<hr>';
exit;

120
html/app/model/M04.php Normal file
View file

@ -0,0 +1,120 @@
<?php
$guid = strtoupper(bin2hex(openssl_random_pseudo_bytes(16)));
// Format the time in the specified format
$now = new DateTime();
$time = $now->format('Y-m-d\TH:i:s');
$consentTimeNow = $time . '.000Z';
$access_token = oAuth();
# === iniciate the transaction
# -- prepare the API request
$request_body ='{
"workflowDefinition": {
"key": "32003"
},
"customerInternalReference": "'.$guid.'",
"userReference": "'.$guid.'",
"reportingCriteria":"Jumio Web App",
"callbackUrl": "'.$_SESSION['SITE']['site_url'].'?do=callback",
"tokenLifetime": "90m",
"web":{
"successUrl":"'.$_SESSION['SITE']['site_url'].'?do=success",
"errorUrl":"'.$_SESSION['SITE']['site_url'].'?do=error"
},
"userConsent": {
"userIp": "'.$_SERVER['REMOTE_ADDR'].'",
"userLocation": {
"country": "GBR",
"state": ""
},
"consent": {
"obtained": "yes",
"obtainedAt": "'.$consentTimeNow.'"
},
"privacyPolicy": {
"read": "yes",
"readAt": "'.$consentTimeNow.'"
}
}
}';
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://account.".$_SESSION['SITE']['datacenter']."/api/v1/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $request_body,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ". $access_token ,
"Content-Type: application/json",
"User-Agent: Jumio SE Testing"
],
]);
$response_json = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
$_SESSION['SITE']['ERROR']="cURL Error #:" . $err;
$_SESSION['SITE']['ERROR']['API']=array();
$_SESSION['SITE']['ERROR']['API']=$response_json;
debug_log("API ERROR",json_encode($_SESSION, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT ));
$error_msg=ERROR_501;
include(__ROOT__.'/app/view/_header.phtml');
include(__ROOT__.'/app/view/page_error.phtml');
include(__ROOT__.'/app/view/_footer.phtml');
} else {
$iniciate=array();
$iniciate=json_decode($response_json,TRUE);
}
$prepared_data_url = $iniciate["workflowExecution"]["credentials"]["3"]["api"]["parts"]["prepared_data"];
$redirect_url = $iniciate["web"]["href"];
# ==== Prepare data
$request_body ='{
"firstName": "'.$_SESSION['TRANSACTION']["FORM"]['firstName'].'",
"lastName": "'.$_SESSION['TRANSACTION']["FORM"]['lastName'].'",
"dateOfBirth":"'.$_SESSION['TRANSACTION']["FORM"]['dateOfBirth'].'",
"email": "'.$_SESSION['TRANSACTION']["FORM"]['email'].'",
"phoneNumber": "'.$_SESSION['TRANSACTION']["FORM"]['phone'].'",
"address": {
"line1": "'.$_SESSION['TRANSACTION']["FORM"]['street'].'",
"postalCode": "'.$_SESSION['TRANSACTION']["FORM"]['postcode'].'",
"city": "'.$_SESSION['TRANSACTION']["FORM"]['city'].'",
"country": "'.$_SESSION['TRANSACTION']["FORM"]['country'].'"
}
}';
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $prepared_data_url ,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $request_body,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ". $access_token ,
"Content-Type: application/json",
"User-Agent: Jumio SE Testing"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
header("Location:".$redirect_url);
//====================================================
#echo '<hr>'.json_encode($_SESSION, JSON_PRETTY_PRINT).'<hr>';
exit;

90
html/app/model/docv.php Normal file
View file

@ -0,0 +1,90 @@
<?php
$_SESSION['TRANSACTION']['MODEL']='-M01';
$guid = strtoupper(bin2hex(openssl_random_pseudo_bytes(16)));
// Format the time in the specified format
$now = new DateTime();
$time = $now->format('Y-m-d\TH:i:s');
$consentTimeNow = $time . '.000Z';
$access_token = oAuth();
# === iniciate the transaction
# -- prepare the API request
$request_body ='{
"workflowDefinition": {
"key": "10055",
"credentials": [{
"category": "DOCUMENT",
"country": {
"predefinedType": "DEFINED",
"values": ["GBR"]
},
"type": {
"predefinedType": "DEFINED",
"values": ["UB"]
}
}]
},
"customerInternalReference": "'.$guid.'",
"userReference": "'.$guid.'",
"reportingCriteria":"Jumio Web App",
"callbackUrl": "'.$_SESSION['SITE']['site_url'].'?do=callback",
"tokenLifetime": "90m",
"web":{
"successUrl":"'.$_SESSION['SITE']['site_url'].'?do=success",
"errorUrl":"'.$_SESSION['SITE']['site_url'].'?do=error"
},
"userConsent": {
"userIp": "'.$_SERVER['REMOTE_ADDR'].'",
"userLocation": {
"country": "GBR",
"state": ""
},
"consent": {
"obtained": "yes",
"obtainedAt": "'.$consentTimeNow.'"
},
"privacyPolicy": {
"read": "yes",
"readAt": "'.$consentTimeNow.'"
}
}
}';
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://account.".$_SESSION['SITE']['datacenter']."/api/v1/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $request_body,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ". $access_token ,
"Content-Type: application/json",
"User-Agent: Jumio SE Testing"
],
]);
$response_json = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
echo $response_json;
if ($err) {
$_SESSION['SITE']['ERROR']="cURL Error #:" . $err;
$_SESSION['SITE']['ERROR']['API']=array();
$_SESSION['SITE']['ERROR']['API']=$response_json;
debug_log("API ERROR",json_encode($_SESSION, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT ));
$error_msg=ERROR_501;
include(__ROOT__.'/app/view/_header.phtml');
include(__ROOT__.'/app/view/page_error.phtml');
include(__ROOT__.'/app/view/_footer.phtml');
} else {
$iniciate=array();
$iniciate=json_decode($response_json,TRUE);
}
$redirect_url = $iniciate["web"]["href"];
header("Location:".$redirect_url);
//====================================================
#echo '<hr>'.json_encode($_SESSION, JSON_PRETTY_PRINT).'<hr>';
exit;

View file

@ -0,0 +1,46 @@
<?php
$access_token = oAuth();
$retrival_status=array();
$retrival_details=array();
$max_retries = 10;
$retry_count = 0;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://retrieval.".$_SESSION['SITE']['datacenter']."/api/v1/accounts/".$_SESSION['TRANSACTION']["RETURN"]['accountId']."/workflow-executions/".$_SESSION['TRANSACTION']["RETURN"]['workflowExecutionId']."/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ". $access_token ,
"Content-Type: application/json",
"User-Agent: Jumio SE Testing"
],
]);
while ($retry_count <= $max_retries) {
$response = curl_exec($curl);
$retrival_status=json_decode($response,TRUE);
if($retrival_status["workflowExecution"]["status"] === "PROCESSED"){break;}
time_sleep_until(time() + 5);
$retry_count++;
}
curl_setopt_array($curl, [
CURLOPT_URL => "https://retrieval.".$_SESSION['SITE']['datacenter']."/api/v1/accounts/".$_SESSION['TRANSACTION']["RETURN"]['accountId']."/workflow-executions/".$_SESSION['TRANSACTION']["RETURN"]['workflowExecutionId'],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ". $access_token ,
"Content-Type: application/json",
"User-Agent: Jumio SE Testing"
],
]);
$response = curl_exec($curl);
$_SESSION['TRANSACTION']["RETRIVAL_1"]=json_decode($response,TRUE);
//====================================================
#echo '<hr>'.json_encode($_SESSION, JSON_PRETTY_PRINT).'<hr>';exit;

View file

@ -0,0 +1,47 @@
<?php
$access_token = oAuth();
$retrival_status=array();
$retrival_details=array();
$max_retries = 10;
$retry_count = 0;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://retrieval.".$_SESSION['SITE']['datacenter']."/api/v1/accounts/".$_SESSION['TRANSACTION']["RETURN"]['accountId']."/workflow-executions/".$_SESSION['TRANSACTION']["RETURN"]['workflowExecutionId']."/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ". $access_token ,
"Content-Type: application/json",
"User-Agent: Jumio SE Testing"
],
]);
while ($retry_count <= $max_retries) {
$response = curl_exec($curl);
$retrival_status=json_decode($response,TRUE);
if($retrival_status["workflowExecution"]["status"] === "PROCESSED"){break;}
time_sleep_until(time() + 5);
$retry_count++;
}
curl_setopt_array($curl, [
CURLOPT_URL => "https://retrieval.".$_SESSION['SITE']['datacenter']."/api/v1/accounts/".$_SESSION['TRANSACTION']["RETURN"]['accountId']."/workflow-executions/".$_SESSION['TRANSACTION']["RETURN"]['workflowExecutionId'],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ". $access_token ,
"Content-Type: application/json",
"User-Agent: Jumio SE Testing"
],
]);
$response = curl_exec($curl);
$_SESSION['TRANSACTION']["RETRIVAL"]=json_decode($response,TRUE);
//====================================================
#echo '<hr>'.json_encode($_SESSION, JSON_PRETTY_PRINT).'<hr>';exit;

View file

@ -0,0 +1,19 @@
<?php
switch ($_SESSION['TRANSACTION']['MODEL']) {
case 'M01':
$_SESSION['TRANSACTION']["RETURN_1"] = $_SESSION['TRANSACTION']["RETURN_2"];
include(__ROOT__.'/app/model/docv.php');
break;
default:
include(__ROOT__.'/app/view/_header.phtml');
include(__ROOT__.'/app/view/loader.phtml');
include(__ROOT__.'/app/view/_footer.phtml');
if(!empty($_SESSION['TRANSACTION']["RETURN_1"])){include(__ROOT__.'/app/model/retrival_1.php');}
if(!empty($_SESSION['TRANSACTION']["RETURN_2"])){include(__ROOT__.'/app/model/retrival_2.php');}
echo '<script> window.location.href = "'.$url_basic.'results"; </script>';
exit;
break;
}
//====================================================
#echo '<hr>'.json_encode($_SESSION, JSON_PRETTY_PRINT).'<hr>';exit;

View file

@ -0,0 +1,52 @@
<?php
switch ($_SESSION['TRANSACTION']['MODEL']) {
case 'M01':
echo "next steps";
break;
default:
echo "geting results";
$max_retries = 10;
$retry_count = 0;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://retrieval.".$_SESSION['SITE']['datacenter']."/api/v1/accounts/".$_SESSION['TRANSACTION']["RETURN"]['accountId']."/workflow-executions/".$_SESSION['TRANSACTION']["RETURN"]['workflowExecutionId']."/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ". $access_token ,
"Content-Type: application/json",
"User-Agent: Jumio SE Testing"
],
]);
// Look to check Jumio Result.
do {
$response = curl_exec($curl);
$err = curl_error($curl);
if ($err) {
$_SESSION['SITE']['ERROR']="cURL Error #:" . $err;
$_SESSION['SITE']['ERROR']['API']=array();
$_SESSION['SITE']['ERROR']['API']=$response_json;
debug_log("API ERROR",json_encode($_SESSION, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT ));
$error_msg=ERROR_501;
include(__ROOT__.'/app/view/_header.phtml');
include(__ROOT__.'/app/view/page_error.phtml');
include(__ROOT__.'/app/view/_footer.phtml');
break;
} else {
$retrival_status=array();
$retrival_status=json_decode($response,TRUE);
}
print_r($retrival_status);
if ($retrival_status["workflowExecution"]["status"] === "PROCESSED") { break; }
sleep(10);
$retry_count++;
} while ($retry_count < $max_retries);
break;
}
//====================================================
echo '<hr>'.json_encode($_SESSION, JSON_PRETTY_PRINT).'<hr>';exit;

View file

@ -0,0 +1,40 @@
<?php
#####################################################################################
# MIT License - Copyright 2019 Claus Lohmar
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the
# Software without restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
# Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#####################################################################################
?>
</div>
<!--/.content--->
<!--.Footer--->
<div class="Footer">
<?php
#require_once($_SESSION['ENV']['BASE_DIR'].'/app/model/localize_switch.php');
?>
</div>
<!--/.Footer------------------------>
<!--Debug--------------------------->
<?php if (DEBUG) {
echo '<div class="Debug"><!-- '.json_encode($_SESSION, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT ).' --></div>';
}?>
<!--/.Debug------------------------->
</div>
<!-- end page_container -->
</body>
</html>

View file

@ -0,0 +1,49 @@
<?php
// Build the menue
$url_basis = $_SESSION['SITE']['site_url'];
$menue = '';
$url_txt_0 = MENUE_HOME;
$url_link_0 = $url_basis.'home';
$menue.= '<a href="'.$url_link_0.'">'.$url_txt_0.'</a>';
if ($_SESSION['SITE']['access']=='true'){
$url_txt_1 = MENUE_ONE;
$url_link_1 = $url_basis.'one';
$menue.= '<a href="'.$url_link_1.'">'.$url_txt_1.'</a>';
$url_txt_2 = MENUE_TWO;
$url_link_2 = $url_basis.'two';
$menue.= '<a href="'.$url_link_2.'">'.$url_txt_2.'</a>';
$url_txt_3 = MENUE_THREE;
$url_link_3 = $url_basis.'three';
$menue.= '<a href="'.$url_link_3.'">'.$url_txt_3.'</a>';
$url_txt_4 = MENUE_FOUR;
$url_link_4 = $url_basis.'four';
$menue.= '<a href="'.$url_link_4.'">'.$url_txt_4.'</a>';
}
?>
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="description" content="<?php echo SITE_DESCRIPTION; ?>">
<meta name="keywords" content="<?php echo SITE_KEYWORDS; ?>">
<meta name="author" content="<?php echo SITE_AUTHOR; ?>">
<meta name="system" content="<?php echo php_uname('n'); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="index, nofollow" />
<title><?php echo SITE_NAME; ?></title>
<!--.Bootstrap & Frameworks CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="<?php echo $_SESSION['SITE']['site_url']; ?>cdn/css/default.css" >
<!--.JavaScripts--------------------->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.js" integrity="sha512-6DC1eE3AWg1bgitkoaRM1lhY98PxbMIbhgYCGV107aZlyzzvaWCW1nJW2vDuYQm06hXrW0As6OGKcIaAVWnHJw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script>
<!--.Others------------------->
<link rel="icon" href="<?php echo $_SESSION['SITE']['site_url']; ?>favicon.ico" type="image/x-icon" />
</head>
<body>
<!--.Navbar--->
<div class="topnav">
<?php echo $menue ?>
</div>
<!--/.Header--->
<div id="container">

View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Start Jumio Demo</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js" integrity="sha256-/H4YS+7aYb9kJ5OKhFYPUjSJdrtV6AeyJOtTkw6X72o=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.6.3.js"></script>
</head>
<body>
<script>
// change below
var datacenter = 'emea-1.jumio.ai'
var key = '2b2i83jup3eu2tr3tn581kl2dc';
var secret = '1vat6laeka5gv8riltk1j0hqlguo80bue3q6gvrnk9u3f2adl39i';
// no changes below
var token = key + ":" + secret;
var hash = btoa(token); // Base64 Encoding -> btoa
var url = 'https://dev.2-4-h.app?do=access&token=' + hash + '&dc=' + datacenter
function redirectToNewPage() {
// Redirect to new page
window.location.href = url ;
}
</script>
<center>
<h2>Please click <button onclick="redirectToNewPage()">Start</button> to initiate your Demo!</h2>
</center>
</body>
</html>

View file

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nav Menu</title>
<!--.Bootstrap & Frameworks CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="<?php echo $_SESSION['SITE']['site_url']; ?>cdn/css/default.css" >
<!--.JavaScripts--------------------->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.js" integrity="sha512-6DC1eE3AWg1bgitkoaRM1lhY98PxbMIbhgYCGV107aZlyzzvaWCW1nJW2vDuYQm06hXrW0As6OGKcIaAVWnHJw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#">Nav Menu</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contact</a>
</li>
</ul>
</div>
</nav>
<script>
function mobileNav() {
if (window.innerWidth <= 768) {
$('.navbar-collapse').collapse('hide');
} else {
$('.navbar-collapse').collapse('show');
}
}
$(window).on('resize', mobileNav);
</script>
</body>
</html>

View file

@ -0,0 +1,9 @@
<?php
?>
<div id="form_container">
<div class="d-flex justify-content-center">
<div class="spinner-border" style="width: 10rem; height: 10rem;" role="status">
</div>
</div>
<div class="d-flex justify-content-center"><h1>Loading...</h1></div>
</div>

View file

@ -0,0 +1,10 @@
<?php
?>
<div id="form_container">
<div class="page_title"><?php echo PAGE_HOME_TITLE; ?></div>
<div class="page_content"><?php echo PAGE_HOME_CONTENT_1; ?></div>
<div class="page_content"><?php echo PAGE_HOME_CONTENT_2; ?></div>
<div class="page_content"><?php echo PAGE_HOME_CONTENT_3; ?></div>
<div class="page_content"><?php echo PAGE_HOME_CONTENT_4; ?></div>
<div class="page_content"><?php echo PAGE_HOME_CONTENT_5; ?></div>
</div>

196
html/app/view/page_01.phtml Normal file
View file

@ -0,0 +1,196 @@
<?php
?>
<div id="form_container">
<div class="page_title"><?php echo PAGE_ONE_TITLE; ?></div>
<div class="page_content"><?php echo PAGE_ONE_CONTENT_1; ?></div>
<div class="page_content"><?php echo PAGE_ONE_CONTENT_2; ?></div>
<div class="page_content"><?php echo PAGE_ONE_CONTENT_3; ?></div>
<div class="page_content"><?php echo PAGE_ONE_CONTENT_4; ?></div>
<div class="page_content"><?php echo PAGE_ONE_CONTENT_5; ?></div>
<br>
<form action="/" method="post">
<input name="do" value="one" type="hidden">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="first-name">First Name</label>
<input type="text" class="form-control" id="first-name" name="first-name">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="last-name">Last Name</label>
<input type="text" class="form-control" id="last-name" name="last-name">
</div>
</div>
</div>
<div class="form-group">
<label for="date-of-birth">Date of Birth</label>
<input type="date" class="form-control" id="date-of-birth" name="date-of-birth">
</div>
<div class="form-group">
<label for="street">Street</label>
<input type="text" class="form-control" id="street" name="street">
</div>
<div class="form-group">
<label for="city">City</label>
<input type="text" class="form-control" id="city" name="city">
</div>
<div class="form-group">
<label for="postcode">Postcode</label>
<input type="text" class="form-control" id="postcode" name="postcode">
</div>
<div class="form-group">
<label for="country">Country</label>
<select class="form-control" id="country" name="country">
<option>Country</option>
<option value="ALA">Åland Islands</option>
<option value="ALB">Albania</option>
<option value="AND">Andorra</option>
<option value="AUT">Austria</option>
<option value="BLR">Belarus</option>
<option value="BEL">Belgium</option>
<option value="BIH">Bosnia & Herzegovina</option>
<option value="BGR">Bulgaria</option>
<option value="HRV">Croatia</option>
<option value="CZE">Czechia</option>
<option value="DNK">Denmark</option>
<option value="EST">Estonia</option>
<option value="FRO">Faroe Islands</option>
<option value="FIN">Finland</option>
<option value="FRA">France</option>
<option value="DEU">Germany</option>
<option value="GIB">Gibraltar</option>
<option value="GRC">Greece</option>
<option value="GGY">Guernsey</option>
<option value="VAT">Vatican City</option>
<option value="HUN">Hungary</option>
<option value="ISL">Iceland</option>
<option value="IRL">Ireland</option>
<option value="IMN">Isle of Man</option>
<option value="ITA">Italy</option>
<option value="JEY">Jersey</option>
<option value="XKX">Kosovo</option>
<option value="LVA">Latvia</option>
<option value="LIE">Liechtenstein</option>
<option value="LTU">Lithuania</option>
<option value="LUX">Luxembourg</option>
<option value="MKD">North Macedonia</option>
<option value="MLT">Malta</option>
<option value="MDA">Moldova</option>
<option value="MCO">Monaco</option>
<option value="MNE">Montenegro</option>
<option value="NLD">Netherlands</option>
<option value="NOR">Norway</option>
<option value="POL">Poland</option>
<option value="PRT">Portugal</option>
<option value="ROM">Romania</option>
<option value="SMR">San Marino</option>
<option value="SRB">Serbia</option>
<option value="SCG">Serbia</option>
<option value="SVK">Slovakia</option>
<option value="SVN">Slovenia</option>
<option value="ESP">Spain</option>
<option value="SJM">Svalbard & Jan Mayen</option>
<option value="SWE">Sweden</option>
<option value="CHE">Switzerland</option>
<option value="UKR">Ukraine</option>
<option value="GBR">United Kingdom</option>
</select>
</div>
<div class="form-group">
<label for="phone">Phone</label>
<input type="text" class="form-control" id="phone" name="phone">
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="email" class="form-control" id="email" name="email">
</div>
<br>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
<br>
</div>
<script>
// Create a function to validate the form
function validateForm() {
// Get the form data
var firstName = document.getElementById("first-name").value;
var lastName = document.getElementById("last-name").value;
var dateOfBirth = document.getElementById("date-of-birth").value;
var street = document.getElementById("street").value;
var city = document.getElementById("city").value;
var postcode = document.getElementById("postcode").value;
var country = document.getElementById("country").value;
var phone = document.getElementById("phone").value;
var email = document.getElementById("email").value;
// Check if first name is empty
if (firstName === "") {
alert("First name is required.");
return false;
}
// Check if last name is empty
if (lastName === "") {
alert("Last name is required.");
return false;
}
// Check if date of birth is empty
if (dateOfBirth === "") {
alert("Date of birth is required.");
return false;
}
// Check if street is empty
if (street === "") {
alert("Street is required.");
return false;
}
// Check if city is empty
if (city === "") {
alert("City is required.");
return false;
}
// Check if postcode is empty
if (postcode === "") {
alert("Postcode is required.");
return false;
}
// Check if country is empty
if (country === "") {
alert("Country is required.");
return false;
}
// Check if phone is empty
if (phone === "") {
alert("Phone is required.");
return false;
}
// Check if email is empty
if (email === "") {
alert("Email is required.");
return false;
} else {
// Check if email is valid
if (!/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(email)) {
alert("Email is not valid.");
return false;
}
}
// No errors, so submit the form
document.getElementById("submit").submit();
}
// Add an event listener to the submit button
document.getElementById("submit").addEventListener("click", validateForm);
</script>

View file

@ -0,0 +1,10 @@
<?php
?>
<div id="form_container">
<div class="page_title"><?php echo PAGE_TWO_TITLE; ?></div>
<div class="page_content"><?php echo PAGE_TWO_CONTENT_1; ?></div>
<div class="page_content"><?php echo PAGE_TWO_CONTENT_2; ?></div>
<div class="page_content"><?php echo PAGE_TWO_CONTENT_3; ?></div>
<div class="page_content"><?php echo PAGE_TWO_CONTENT_4; ?></div>
<div class="page_content"><?php echo PAGE_TWO_CONTENT_5; ?></div>
</div>

View file

@ -0,0 +1,10 @@
<?php
?>
<div id="form_container">
<div class="page_title"><?php echo PAGE_THREE_TITLE; ?></div>
<div class="page_content"><?php echo PAGE_THREE_CONTENT_1; ?></div>
<div class="page_content"><?php echo PAGE_THREE_CONTENT_2; ?></div>
<div class="page_content"><?php echo PAGE_THREE_CONTENT_3; ?></div>
<div class="page_content"><?php echo PAGE_THREE_CONTENT_4; ?></div>
<div class="page_content"><?php echo PAGE_THREE_CONTENT_5; ?></div>
</div>

196
html/app/view/page_04.phtml Normal file
View file

@ -0,0 +1,196 @@
<?php
?>
<div id="form_container">
<div class="page_title"><?php echo PAGE_FOUR_TITLE; ?></div>
<div class="page_content"><?php echo PAGE_FOUR_CONTENT_1; ?></div>
<div class="page_content"><?php echo PAGE_FOUR_CONTENT_2; ?></div>
<div class="page_content"><?php echo PAGE_FOUR_CONTENT_3; ?></div>
<div class="page_content"><?php echo PAGE_FOUR_CONTENT_4; ?></div>
<div class="page_content"><?php echo PAGE_FOUR_CONTENT_5; ?></div>
<br>
<form action="/" method="post">
<input name="do" value="four" type="hidden">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="first-name">First Name</label>
<input type="text" class="form-control" id="first-name" name="first-name">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="last-name">Last Name</label>
<input type="text" class="form-control" id="last-name" name="last-name">
</div>
</div>
</div>
<div class="form-group">
<label for="date-of-birth">Date of Birth</label>
<input type="date" class="form-control" id="date-of-birth" name="date-of-birth">
</div>
<div class="form-group">
<label for="street">Street</label>
<input type="text" class="form-control" id="street" name="street">
</div>
<div class="form-group">
<label for="city">City</label>
<input type="text" class="form-control" id="city" name="city">
</div>
<div class="form-group">
<label for="postcode">Postcode</label>
<input type="text" class="form-control" id="postcode" name="postcode">
</div>
<div class="form-group">
<label for="country">Country</label>
<select class="form-control" id="country" name="country">
<option>Country</option>
<option value="ALA">Åland Islands</option>
<option value="ALB">Albania</option>
<option value="AND">Andorra</option>
<option value="AUT">Austria</option>
<option value="BLR">Belarus</option>
<option value="BEL">Belgium</option>
<option value="BIH">Bosnia & Herzegovina</option>
<option value="BGR">Bulgaria</option>
<option value="HRV">Croatia</option>
<option value="CZE">Czechia</option>
<option value="DNK">Denmark</option>
<option value="EST">Estonia</option>
<option value="FRO">Faroe Islands</option>
<option value="FIN">Finland</option>
<option value="FRA">France</option>
<option value="DEU">Germany</option>
<option value="GIB">Gibraltar</option>
<option value="GRC">Greece</option>
<option value="GGY">Guernsey</option>
<option value="VAT">Vatican City</option>
<option value="HUN">Hungary</option>
<option value="ISL">Iceland</option>
<option value="IRL">Ireland</option>
<option value="IMN">Isle of Man</option>
<option value="ITA">Italy</option>
<option value="JEY">Jersey</option>
<option value="XKX">Kosovo</option>
<option value="LVA">Latvia</option>
<option value="LIE">Liechtenstein</option>
<option value="LTU">Lithuania</option>
<option value="LUX">Luxembourg</option>
<option value="MKD">North Macedonia</option>
<option value="MLT">Malta</option>
<option value="MDA">Moldova</option>
<option value="MCO">Monaco</option>
<option value="MNE">Montenegro</option>
<option value="NLD">Netherlands</option>
<option value="NOR">Norway</option>
<option value="POL">Poland</option>
<option value="PRT">Portugal</option>
<option value="ROM">Romania</option>
<option value="SMR">San Marino</option>
<option value="SRB">Serbia</option>
<option value="SCG">Serbia</option>
<option value="SVK">Slovakia</option>
<option value="SVN">Slovenia</option>
<option value="ESP">Spain</option>
<option value="SJM">Svalbard & Jan Mayen</option>
<option value="SWE">Sweden</option>
<option value="CHE">Switzerland</option>
<option value="UKR">Ukraine</option>
<option value="GBR">United Kingdom</option>
</select>
</div>
<div class="form-group">
<label for="phone">Phone</label>
<input type="text" class="form-control" id="phone" name="phone">
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="email" class="form-control" id="email" name="email">
</div>
<br>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
<br>
</div>
<script>
// Create a function to validate the form
function validateForm() {
// Get the form data
var firstName = document.getElementById("first-name").value;
var lastName = document.getElementById("last-name").value;
var dateOfBirth = document.getElementById("date-of-birth").value;
var street = document.getElementById("street").value;
var city = document.getElementById("city").value;
var postcode = document.getElementById("postcode").value;
var country = document.getElementById("country").value;
var phone = document.getElementById("phone").value;
var email = document.getElementById("email").value;
// Check if first name is empty
if (firstName === "") {
alert("First name is required.");
return false;
}
// Check if last name is empty
if (lastName === "") {
alert("Last name is required.");
return false;
}
// Check if date of birth is empty
if (dateOfBirth === "") {
alert("Date of birth is required.");
return false;
}
// Check if street is empty
if (street === "") {
alert("Street is required.");
return false;
}
// Check if city is empty
if (city === "") {
alert("City is required.");
return false;
}
// Check if postcode is empty
if (postcode === "") {
alert("Postcode is required.");
return false;
}
// Check if country is empty
if (country === "") {
alert("Country is required.");
return false;
}
// Check if phone is empty
if (phone === "") {
alert("Phone is required.");
return false;
}
// Check if email is empty
if (email === "") {
alert("Email is required.");
return false;
} else {
// Check if email is valid
if (!/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(email)) {
alert("Email is not valid.");
return false;
}
}
// No errors, so submit the form
document.getElementById("submit").submit();
}
// Add an event listener to the submit button
document.getElementById("submit").addEventListener("click", validateForm);
</script>

View file

@ -0,0 +1,3 @@
<?php
#header('Content-Type: application/json');
#echo json_encode($_SESSION["TRANSACTION"]["RETRIVAL"], JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT );

129
html/cdn/css/default.css Normal file
View file

@ -0,0 +1,129 @@
html, body {
height: 100%;
font-style: normal;
}
body {
font-family: Arial, Helvetica, sans-serif;
margin: 0;
}
/* NAV MENUE */
.topnav {
overflow: hidden;
background-color: #333;
}
.topnav a {
float: left;
color: #f2f2f2;
text-align: center;
padding: 10px 14px;
text-decoration: none;
font-size: 12px;
}
.topnav a:hover {
background-color: #ddd;
color: black;
}
.topnav a.active {
background-color: #04AA6D;
color: white;
}
/* content */
#container {
background-color: #33ccff
flex: 1 0 auto;
margin: auto;
margin-top: 60px;
margin-bottom: 40px;
padding: 10px;
max-width:920px;
min-width:350px;
}
.page_title{
text-align: center;
font-size: 24px;
}
.page_content{
text-align: center;
font-size: 16px;
}
/* footer */
.footer {
background-color: black;
text-align: center;
margin: auto;
padding: 10px;
height:40px;
position: fixed;
bottom: 0;
width: 100%;
}
#open-popup {padding:5px}
.white-popup {
position: relative;
background: #FFF;
padding: 20px;
width: auto;
max-width: 400px;
margin: auto;
text-align: center;
}
.decodeButton {
background-color: #4CAF50; /* Green */
border: none;
color: white;
padding: 2px 2px;
margin: auto;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 12px;
}
.panel-title {
display: inline;
font-weight: bold;
}
.checkbox.pull-right {
margin: 0;
}
.pl-ziro {
padding-left: 0px;
}
#expityMonth{
padding-left: 0px;
padding-right: 0px;
text-align: center;
}#expityYear {
padding-left: 0px;
padding-right: 0px;
text-align: center;
}
.loader {
position: absolute;
left: 50%;
top: 50%;
z-index: 1;
width: 150px;
height: 150px;
margin: -75px 0 0 -75px;
border: 16px solid #f3f3f3; /* Light grey */
border-top: 16px solid #3498db; /* Blue */
border-radius: 50%;
width: 120px;
height: 120px;
animation: spin 2s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}

23
html/cdn/js/config.js Normal file
View file

@ -0,0 +1,23 @@
window.io_global_object_name = 'IGLOO';
window.IGLOO = window.IGLOO || {
"install_flash": false,
"bbout_element_id": 'ioBlackBox',
"loader": {
"uri_hook" : "/iojs/",
"version": '5.2.2',
"trace_handler": (msg) => {console.error(`iovation called an error ${msg}`);},
},
};
function getBB(){
var bb = "";
try {
bb = window.IGLOO.getBlackbox();
return( bb );
} catch (e) {
return(e);
}
}

38
html/class/config.php Normal file
View file

@ -0,0 +1,38 @@
<?php
#####################################################################################
# MIT License - Copyright 2019 Claus Lohmar
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the
# Software without restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
# Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#####################################################################################
#echo 'empty session ';echo '<hr>'.json_encode($_SESSION, JSON_PRETTY_PRINT).'<hr>';exit;
/// Set default timezone
date_default_timezone_set('UCT');
//==============================================================================
$tmp=explode('.', $_SERVER['HTTP_HOST']);
$modus = array_shift(($tmp));
if($modus == 'dev'){define('DEBUG',TRUE);}else{define('DEBUG',FALSE);}
define('__ROOT__', dirname(dirname(__FILE__)));
// API Credentials for IDV
$api_key = '2b2i83jup3eu2tr3tn581kl2dc';
$api_secret = '1vat6laeka5gv8riltk1j0hqlguo80bue3q6gvrnk9u3f2adl39i';
$api_token = base64_encode($api_key . ":" . $api_secret);
define( 'API_URL' , 'emea-1.jumio.ai');
define( 'API_TOKEN' , $api_token);

43
html/class/functions.php Normal file
View file

@ -0,0 +1,43 @@
<?php
//====================================================
function debug_log($log_point,$log_data) {
$stamp= gmdate(DATE_ATOM);
$log = '{"Timestamp":"'.$stamp.'","TRANSACTION":'.json_encode($_SESSION['TRANSACTION']).', "'.$log_point.'":"'.$log_data.'"}';
$filename = gmdate("Ym").'.log';
$file = __ROOT__.'/log/'.$filename;
if (DEBUG) {file_put_contents($file,$log. PHP_EOL,FILE_APPEND);}
}
//====================================================
function oAuth(){
# === get oAuth token
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://auth.".$_SESSION['SITE']['datacenter']."/oauth2/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "grant_type=client_credentials",
CURLOPT_HTTPHEADER => [
"Authorization: Basic ".$_SESSION['SITE']['apiToken'],
"Content-Type: application/x-www-form-urlencoded",
"User-Agent: ACME Payments testing"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
$result='error';
$_SESSION['SITE']['ERROR']="cURL Error #:" . $err;
$_SESSION['SITE']['ERROR']['API']=array();
$_SESSION['SITE']['ERROR']['API']=$response;
} else {
$oAuth = array();
$oAuth = json_decode($response,TRUE);
}
return $oAuth["access_token"];
}

52
html/class/site.php Normal file
View file

@ -0,0 +1,52 @@
<?php
#####################################################################################
# MIT License - Copyright 2019 Claus Lohmar
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the
# Software without restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
# Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#####################################################################################
# Set Site
#
session_start(['cookie_lifetime' => 86400,]);
if(empty($_SESSION)){
$_SESSION['SITE']=array();
$_SESSION['SITE']['ERROR']=array();
$_SESSION['SITE']['arrived']=gmdate(DATE_ATOM);
$_SESSION['SITE']['client_ip']='';
$_SESSION['SITE']['site_url'] = 'https://'.$_SERVER["HTTP_HOST"].'/';
$_SESSION['SITE']['apiToken']='';
$_SESSION['SITE']['datacenter']='';
$_SESSION['SITE']['language']='';
$_SESSION['SITE']['access']='false';
// check if language is suppoted
$activeLanguage=substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
switch ($activeLanguage) {
case 'de':
$_SESSION['SITE']['language']='de';
break;
default:
$_SESSION['SITE']['language']='en';
break;
}
// -------- GET CLIENT IP -----------------------------------------------------------------
if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { //to check ip is pass from proxy
$_SESSION['SITE']['client_ip']=$_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$_SESSION['SITE']['client_ip']=$_SERVER['REMOTE_ADDR'];
}
}

BIN
html/img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

41
html/index.php Normal file
View file

@ -0,0 +1,41 @@
<?php
#####################################################################################
# MIT License - Copyright 2019 Claus Lohmar
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the
# Software without restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
# Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#####################################################################################
#phpinfo();exit;
//// SET BASICS ////////////////////////////////////////////////////////////////
require_once('./class/config.php');
require_once('./class/site.php');
require_once('./lng/'.$_SESSION['SITE']['language'].'/default.php');
require_once('./class/functions.php');
//// CAPTURE HTML_REQUESTS /////////////////////////////////////////////////////
if (!empty($_POST)) { $HTML_REQUEST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);}
if (!empty($_GET)) { $HTML_REQUEST = filter_input_array(INPUT_GET, FILTER_SANITIZE_STRING);}
if (!empty($HTML_REQUEST)) { require_once(__ROOT__.'/app/controler/request.php'); }
else {
//// ROUTING ///////////////////////////////////////////////////////////////////
$REQUEST = '';
$PARAMS = '';
$REQUEST = str_replace("/", "/", $_SERVER['REQUEST_URI']);
$PARAMS = explode("/", $REQUEST);
require_once(__ROOT__.'/app/controler/start.php');
}
//echo 'session setting<hr>';echo json_encode($_SESSION, JSON_PRETTY_PRINT);//exit;

63
html/lng/de/default.php Normal file
View file

@ -0,0 +1,63 @@
<?php
# GB_en language file
// SITE META
define('SITE_NAME', 'iovation wallet demonstration');
define('SITE_DESCRIPTION', 'This is a demonstration of an digital wallet build byiovation inc.');
define('SITE_AUTHOR', 'iovation inc.');
define('SITE_KEYWORDS', 'iovation,wallet,device,demo,test');
// NAVIGATION
define('URL_HOME', 'home');
define('URL_LINK_1', 'wallet');
define('URL_LINK_2', 'fraud force');
define('URL_LINK_3', 'link page');
define('URL_LINK_4', 'link page');
define('X', 'xxx');
//==========>>
// == PAGES
// == HOME
define('HOME_TITLE', 'HOME_TITLE');
define('HOME_CONTENT', 'HOME_CONTENT');
// == PAGE_LINK
define('PAGE_LINK_TITLE', 'PAGE_LINK_TITLE');
define('PAGE_LINK_CONTENT', 'PAGE_LINK_CONTENT');
//==========>>
define('WALLET_TOP_UP_TITLE','Your e-wallet by iovation');
define('WALLET_TOP_UP_CONTENT_1','Provide your login credential and the amount you wish to top-up.');
define('WALLET_TOP_UP_CONTENT_2', '
<p>You need to provide mock-up login credentials. You can use your email or invent an email but please ensue that you can remember the email and use the same email during testing. The email provide is converted in to a GDPR compliant fingerprint and stored on iovations servers. We use the email only as an account identifier.
You can invent a password and don`t need to remember this, we are not useing password verification for this mock-up demonstration.</p>
<p>
<h5>You can controle the result of the fraud screening.</h5><br>
Any amount below <b>100.00</b> will result in <b>ALLOWED</b>.<br>
Any amount between <b>100.01</b> and <b>199.99</b> will result in <b>REVIEW</b><br>
Any amount over <b>200.00</b> will result in <b>DENIED</b><br>
</p>
');
//==========>>
define('WALLET_CHECKOUT_A_TITLE','Card Payment');
define('WALLET_CHECKOUT_A_CONTENT_1','This was a <b>low risk transaction</b>, therefore no liability shift through 3D secure is required.');
define('WALLET_CHECKOUT_A_CONTENT_2','
<p>Please provide a credit card number for testing. This can be any random number of 16 digits.For the card expiry date,
take any date from 2019 to 2029 and 4 random digits for the CVV number.</p>'
);
define('WALLET_CHECKOUT_AMT_FINAL', 'You will top up ');
define('WALLET_CHECKOUT_SUBMIT', 'execute top up');
//==========>>
define('WALLET_CHECKOUT_D_TITLE', 'SEPA Instant Bank Payment');
define('WALLET_CHECKOUT_D_CONTENT_1','This was a <b>high risk transaction</b>, therefore only SEPA instant bank payment is offerd.');
define('WALLET_CHECKOUT_D_CONTENT_2','
<p>Please provide a IBAN number for testing. This can be any random number of 16 digits.</p>'
);
//==========>>
define('WALLET_CHECKOUT_R_TITLE', 'Card Payment');
define('WALLET_CHECKOUT_R_CONTENT_1','This was a <b>medium risk transaction</b>, therefore a liability shift through <b>3D secure</b> is initiated.');
define('WALLET_CHECKOUT_R_CONTENT_2','
<p>Please provide a credit card number for testing. This can be any random number of 16 digits.For the card expiry date,
take any date from 2019 to 2029 and 4 random digits for the CVV number.</p>'
);
//==========>>

59
html/lng/en/default.php Normal file
View file

@ -0,0 +1,59 @@
<?php
# GB_en language file
$url_basic=$_SESSION['SITE']['site_url'];
//== SITE META
define('SITE_NAME', 'ACME Corp Demo');
define('SITE_DESCRIPTION', 'Kumio is the leading KYC provider');
define('SITE_AUTHOR', 'Jumion inc.');
define('SITE_KEYWORDS', 'Jumio,kyc,kyb,live,demo,testing');
// == NAVIGATION
define('MENUE_HOME','home');
define('MENUE_ONE','hospitality');
define('MENUE_TWO','ride rental');
define('MENUE_THREE','gambling');
define('MENUE_FOUR','banking');
// =========>> First Level Pages
// =========>> PAGE_PAGE_HOME
define('PAGE_HOME_TITLE','Jumio KYX Platform Use-Case Demo');
define('PAGE_HOME_CONTENT_1','');
define('PAGE_HOME_CONTENT_2','');
define('PAGE_HOME_CONTENT_3','');
define('PAGE_HOME_CONTENT_4','');
define('PAGE_HOME_CONTENT_5','');
// =========>> PAGE_ONE
define('PAGE_ONE_TITLE','ACME Holiday Homes');
define('PAGE_ONE_CONTENT_1','Please fill out the form to register on our platform');
define('PAGE_ONE_CONTENT_2','');
define('PAGE_ONE_CONTENT_3','');
define('PAGE_ONE_CONTENT_4','');
define('PAGE_ONE_CONTENT_5','');
define('PAGE_TWO_TITLE','ACME Rent a Bike');
define('PAGE_TWO_CONTENT_1','');
define('PAGE_TWO_CONTENT_2','');
define('PAGE_TWO_CONTENT_3','');
define('PAGE_TWO_CONTENT_4','');
define('PAGE_TWO_CONTENT_5','');
define('PAGE_THREE_TITLE','ACME Games');
define('PAGE_THREE_CONTENT_1','');
define('PAGE_THREE_CONTENT_2','');
define('PAGE_THREE_CONTENT_3','');
define('PAGE_THREE_CONTENT_4','');
define('PAGE_THREE_CONTENT_5','');
define('PAGE_FOUR_TITLE','ACME Bank');
define('PAGE_FOUR_CONTENT_1','Apply for your new ACME Account today');
define('PAGE_FOUR_CONTENT_2','<br>');
define('PAGE_FOUR_CONTENT_3','');
define('PAGE_FOUR_CONTENT_4','');
define('PAGE_FOUR_CONTENT_5','');
// =========>> Second Level Pages <<=======
// == PAGE_ERRORS
define('ERROR_404', '<h2>404 Not Found</h2><p>The requested resource could not be found but may be available in the future.</p>');
define('ERROR_501', '<h2>500 Internal Server Error</h2><p>A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.</p>');

35
nginx/default.bak.3.conf Normal file
View file

@ -0,0 +1,35 @@
server {
listen [::]:80 default_server;
root /var/www/html/public;
index index.php index.html;
charset utf-8;
server_name _;
#Logging
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log notice;
#handling Static files
# location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
# access_log off;
# expires max;
# }
# Support Clean (aka Search Engine Friendly) URLs
# location / {
# try_files $uri $uri/ /index.php?$args ;
# }
# Handling .php files
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
include fastcgi_params;
fastcgi_pass unix:/run/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}

34
nginx/default.conf Normal file
View file

@ -0,0 +1,34 @@
server {
listen 80 default_server;
root /var/www/html/public;
index index.php index.html;
charset utf-8;
server_name _;
#Logging
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log notice;
#handling Static files
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
access_log off;
expires max;
}
# Support Clean (aka Search Engine Friendly) URLs
location / {
try_files $uri $uri/ /index.php?$args ;
}
# Handling .php files
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
include fastcgi_params;
fastcgi_pass unix:/run/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}