<?php
require_once('../../vendor/autoload.php');
require_once('../init.php');
$client = new \GuzzleHttp\Client();

// define('API_BASE', 'https://api.myidentitypass.com');
// define('API_BASE', 'https://sandbox.myidentitypass.com');

function error_res($status, $response_code, $message)
{
    $response = new stdClass;
    $response->status = $status;
    $response->response_code = $response_code;
    $response->message = $message;
    return json_encode($response);
}

if (isset($_SESSION['user_id'])) {
    extract($_POST);
    if (isset($phone) && !empty($service_type)) {

        $user = User::find_by_id($_SESSION['user_id']);
        if ($user) {

            $service_type = Service::find_by_id($service_type);
            $sub_service = SubService::find_by_id($sub_service_id);


            // print_r($service_type);
            // return false;

            if (!$service_type) {
                echo error_res(false, "03", "Service Not Avilable, Contact Administrator!");
                exit;
            }
            if (!$sub_service) {
                echo error_res(false, "03", "Service Not Avilable, Contact Administrator!");
            exit;
        }

            $service = $service_type->service_name;
            $service_fee = intval($service_type->service_fee);
            $status = 0;

            $my_wallet = Wallet::find_by_query("SELECT * FROM wallet WHERE user_id =" . $user->id . " LIMIT 1");
            $my_wallet = array_shift($my_wallet);
            $my_wallet_balance = intval($my_wallet->balance);

            if ($my_wallet_balance >= ($service_fee + intval($sub_service->service_fee))) {


                try {

                    $response = $client->request('POST', 'https://api.youverify.co/v2/api/identity/ng/nin-phone', [
                        'body' => '{"mobile":"' . $phone . '","isSubjectConsent":"true"}',
                        'headers' => [
                            'accept' => 'application/json',
                            'token' => 'UDOoT6WR.opBprIHTSPN18Nd8wNmbtyXXz7bBDgLdrq0j',
                            'content-type' => 'application/json',
                        ],
                    ]);



                    $responses = $response->getBody();


                    // $responses = '

                    // {
                    //     "success": true,
                    //     "statusCode": 200,
                    //     "message": "success",
                    //     "data": {
                    //         "id": "6496fc65c0eaccdd29fee54b",
                    //         "parentId": null,
                    //         "status": "found",
                    //         "reason": null,
                    //         "dataValidation": false,
                    //         "selfieValidation": false,
                    //         "firstName": "ISAH",
                    //         "middleName": null,
                    //         "lastName": "AHMED",
                    //         "image": "data:image/jpg;base64,/9j/4AAQSkZ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JIULknesqbV3E7Mj7wrzfwlr2i6b+z\nMx1K7j8o295ZvFHMFkaWR5dsQ4ba5VgeVOAdxGBWp8AtHe38F3XiC7fzr7Wrt5XnaVnd0QlRvz/F\nv805Gc7hk9h45oPwuu/EfxG1XRNPWQ6PpWptb3ly8yK8cIkcA9OXKxsBhSM4zgUAe7/A6Nk+EmkM\n00kgd52VWC4jHnONq4AOMgnnJyx5xgD0SqelaVY6HpdvpmmW0dtZ26bIok6KP5kk5JJ5JJJyTVyg\nAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAr5Ui+DHivUvFU+jQQXdr4fgvZjD\neXjDasRdk8wJkbnZYV4UDPyE4UqaKKAPpPwx4Y0vwjocOkaRB5VvHyzNy8rnq7nuxwPyAAAAA2KK\nKACiiigAooooAjnghureW3uIo5oJUKSRyKGV1IwQQeCCOMV8iT+LLzw74E8S/DfUE+0yJqAjhmRy\nUh8uXMuM/wAJaNSqhR99yTnglFAH1X4b0SHw54a03RoPLKWdukRdIxGJGA+Z9o6Fmyx5PJPJq5DY\nWdveXN5DaQR3V1t+0TJGA8u0YXcw5bA4GelFFAFiiiigAooooAKKKKACiiigAooooAKKKKACiiig\nAooooAKKKKACiiigD//Z",
                    //         "mobile": "08161838283",
                    //         "birthState": "****",
                    //         "birthLGA": "****",
                    //         "birthCountry": "****",
                    //         "dateOfBirth": "1995-05-11",
                    //         "isConsent": true,
                    //         "nin": "32064990855",
                    //         "idNumber": "08161838283",
                    //         "businessId": "647afb23e50ca307a2d94672",
                    //         "type": "nin",
                    //         "allValidationPassed": true,
                    //         "requestedAt": "2023-06-24T14:23:33.208Z",
                    //         "requestedById": "647afb23e50ca376a9d9466e",
                    //         "country": "NG",
                    //         "createdAt": "2023-06-24T14:23:33.236Z",
                    //         "lastModifiedAt": "2023-06-24T14:23:33.236Z",
                    //         "metadata": {},
                    //         "requestedBy": {
                    //             "firstName": "API",
                    //             "lastName": "User",
                    //             "middleName": "",
                    //             "id": "647afb23e50ca376a9d9466e"
                    //         }
                    //     },
                    //     "links": []
                    // }

                    // ';
                } catch (\Throwable $th) {

                    // print_r($th->getMessage());
                    echo error_res(false, "03", "Network Error!");
                    exit;
                }




                $response_std = json_decode($responses);
                // print_r($response_std);

                // return false;



                $service_record = new ServiceRecord;
                $in_transaction = new InTransaction;




                if (isset($response_std->data) && !empty($response_std->data) && $response_std->statusCode == 200) {
                    $status = 1;

                    $new_response_std = new stdClass;
                    $new_response_std->response_code = "00";
                    $new_response_std->detail = "Verification Successful";
                    $new_response_std->nin_data = new stdClass;


                    // $new_response_std->nin_data->birthcountry = $response_std->data[0]->contactInfo->
                    $new_response_std->nin_data->birthdate = $response_std->data->dateOfBirth;
                    $new_response_std->nin_data->birthlga = $response_std->data->birthLGA;
                    $new_response_std->nin_data->birthstate = $response_std->data->birthState;
                    $new_response_std->nin_data->centralID = "";
                    $new_response_std->nin_data->educationallevel = '';
                    $new_response_std->nin_data->email = '';
                    $new_response_std->nin_data->emplymentstatus = "";
                    $new_response_std->nin_data->firstname = $response_std->data->firstName;
                    $new_response_std->nin_data->middlename = $response_std->data->middleName;
                    if (strtoupper($gender) == 'M') {
                        # code...
                        $new_response_std->nin_data->gender = 'M';
                    } else if (strtoupper($gender) == 'F') {

                        $new_response_std->nin_data->gender = 'F';
                    } else {

                        $new_response_std->nin_data->gender = '';
                    }
                    $new_response_std->nin_data->heigth = "";
                    $new_response_std->nin_data->maritalstatus = $response_std->data->status;
                    $new_response_std->nin_data->nin = $response_std->data->nin;
                    $new_response_std->nin_data->trackingId = '';
                    $new_response_std->nin_data->nok_address1 = "";
                    $new_response_std->nin_data->nok_address2 = "";
                    $new_response_std->nin_data->nok_firstname = "";
                    $new_response_std->nin_data->nok_lga = "";
                    $new_response_std->nin_data->nok_middlename = "";
                    $new_response_std->nin_data->nok_postalcode = "";
                    $new_response_std->nin_data->nok_state = "";
                    $new_response_std->nin_data->nok_surname = "";
                    $new_response_std->nin_data->nok_town = "";
                    $new_response_std->nin_data->nspokenlang = "";
                    $new_response_std->nin_data->ospokenlang = "";
                    $new_response_std->nin_data->pfirstname = "";
                    $new_response_std->nin_data->photo = explode(",", $response_std->data->image)[1] ?? '';
                    $new_response_std->nin_data->signature = explode(",", $response_std->data->signature)[1] ?? '';
                    $new_response_std->nin_data->pmiddlename = "";
                    $new_response_std->nin_data->profession = "";
                    $new_response_std->nin_data->psurname = "";
                    $new_response_std->nin_data->religion = '';
                    $new_response_std->nin_data->residence_address  = "";
                    $new_response_std->nin_data->residence_town = "";
                    $new_response_std->nin_data->residence_lga = "";
                    $new_response_std->nin_data->residence_state = "";
                    $new_response_std->nin_data->residencestatus = '';
                    $new_response_std->nin_data->self_origin_lga = "";
                    $new_response_std->nin_data->self_origin_place = "";
                    $new_response_std->nin_data->self_origin_state = "";
                    $new_response_std->nin_data->surname = $response_std->data->lastName;
                    $new_response_std->nin_data->telephoneno = $response_std->data->idNumber;
                    $new_response_std->nin_data->title = "";
                    $new_response_std->nin_data->vnin = "";
                    $new_response_std->nin_data->userid = "";

                    $new_response_std->verification = new stdClass;
                    $new_response_std->verification->status = '';
                    $new_response_std->verification->reference = "";



                    // print_r($new_response_std);
                    // return false;

                    // $new_wallet_balance = $my_wallet_balance  - $service_fee;
                    $new_wallet_balance = $my_wallet_balance - ($service_fee + intval($sub_service->service_fee));

                    $my_wallet->balance = $new_wallet_balance;
                    $my_wallet->date_updated = $date;
                    $my_wallet->save();
                } else if (isset($response_std->data) && empty($response_std->data) && $response_std->code == 200) {

                    echo error_res(false, "01", $response_std->message);
                    $in_transaction->user_id = $user->id;
                    $in_transaction->wallet_id = $my_wallet->id;
                    $in_transaction->search_query = $phone;
                    $in_transaction->amount = 0;
                    $in_transaction->remaining_balance = $my_wallet->balance;
                    // $in_transaction->service = $service;
                    $in_transaction->service = $service_type->service_name;
                    $in_transaction->date =  $date;
                    $in_transaction->status = $status;
                    $in_transaction->save();
                    exit;
                } else if ($response_std->code == 422) {
                    echo error_res(false, "01", $response_std->errors->phoneNumber[0]);
                    $in_transaction->user_id = $user->id;
                    $in_transaction->wallet_id = $my_wallet->id;
                    $in_transaction->search_query = $phone;
                    $in_transaction->amount = 0;
                    $in_transaction->remaining_balance = $my_wallet->balance;
                    // $in_transaction->service = $service;
                    $in_transaction->service = $service_type->service_name;
                    $in_transaction->date =  $date;
                    $in_transaction->status = $status;
                    $in_transaction->save();
                    exit;



                    // $new_wallet_balance = $my_wallet_balance  - 49;
                    // $my_wallet->balance = $new_wallet_balance;
                    // $my_wallet->date_updated = $date;
                    // $my_wallet->save();
                } else {
                    $new_wallet_balance = $my_wallet->balance;
                    $service_fee = 0;
                }




                $in_transaction->user_id = $user->id;
                $in_transaction->wallet_id = $my_wallet->id;
                $in_transaction->search_query = $phone;
                $in_transaction->amount = $service_fee;
                $in_transaction->remaining_balance = $new_wallet_balance;
                // $in_transaction->service = $service;
                $in_transaction->service = $service_type->service_name;
                $in_transaction->date =  $date;
                $in_transaction->status = $status;

                if ($in_transaction->save()) {

                    $service_record->user_id = $user->id;
                    // $service_record->service = $service;
                    $service_record->service = $service_type->service_name;
                    $service_record->search_query = $phone;
                    $service_record->response = json_encode($new_response_std);
                    $service_record->in_transaction_id = $in_transaction->id;
                    if ($service_record->save()) {
                        $new_response_std->record_id = $service_record->id;

                        $new_response_std->search_query = $phone;
                        $new_response_std->record_id = $service_record->id;

                        echo (json_encode($new_response_std));
                        exit;
                    } else {
                        echo error_res(false, "03", "Contact Administrator!");
                        exit;
                    }
                } else {
                    echo error_res(false, "03", "Contact Administrator!");
                    exit;
                }
            } else {
                echo error_res(false, "03", "Insufficient wallet balance");
                exit;
            }
        } else {

            echo error_res(false, "03", "Contact Administrator!");
            exit;
        }
    } else {

        echo error_res(false, "03", "Contact Administrator!");
        exit;
    }
} else {
    echo error_res(false, "03", "Contact Administrator!");
    exit;
}