louie-kyc #1

Merged
erwin merged 27 commits from louie-kyc into main 2024-04-19 10:33:46 +08:00
1 changed files with 29 additions and 29 deletions
Showing only changes of commit 9398c053b1 - Show all commits

View File

@ -3,12 +3,12 @@
function validate_user($id, $pwd)
{
$curl = curl_init();
$url = "https://testapi.obpay.online/api/users/id/$id";
$url = "https://testapi.obanana.io/api/users/id/$id";
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt_array(
$curl,
array(
//CURLOPT_URL => 'https://testapi.obpay.online/api/users/id/648058013436143c807101e4',
//CURLOPT_URL => 'https://testapi.obanana.io/api/users/id/648058013436143c807101e4',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
@ -34,11 +34,11 @@ function validate_user($id, $pwd)
function get_user_info($email)
{
$curl = curl_init();
//$url = "https://testapi.obpay.online/api/users/id/$email";
$url = "https://testapi.obpay.online/api/users/$email";
//$url = "https://testapi.obanana.io/api/users/id/$email";
$url = "https://testapi.obanana.io/api/users/$email";
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt_array($curl, array(
//CURLOPT_URL => 'https://testapi.obpay.online/api/users/egalang@premiummegastructures.com',
//CURLOPT_URL => 'https://testapi.obanana.io/api/users/egalang@premiummegastructures.com',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
@ -61,7 +61,7 @@ function get_user_info($email)
function get_user_info2($email)
{
$curl = curl_init();
$url = "https://testapi.obpay.online/api/users/id/$email";
$url = "https://testapi.obanana.io/api/users/id/$email";
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt_array($curl, array(
//CURLOPT_URL => 'https://api.obananapay.com/api/users/egalang@premiummegastructures.com',
@ -86,10 +86,10 @@ function get_user_info2($email)
function activate_account($user_id)
{
$curl = curl_init();
$url = "https://testapi.obpay.online/api/users/$user_id/sub";
$url = "https://testapi.obanana.io/api/users/$user_id/sub";
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt_array($curl, array(
//CURLOPT_URL => 'https://testapi.obpay.online/api/users/645a0c93008258b5e9a2cd20/sub',
//CURLOPT_URL => 'https://testapi.obanana.io/api/users/645a0c93008258b5e9a2cd20/sub',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
@ -113,7 +113,7 @@ function get_transactions()
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://testapi.obpay.online/api/transactions/',
CURLOPT_URL => 'https://testapi.obanana.io/api/transactions/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
@ -137,7 +137,7 @@ function get_users()
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://testapi.obpay.online/api/users/',
CURLOPT_URL => 'https://testapi.obanana.io/api/users/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
@ -163,7 +163,7 @@ function get_kyc($bToken)
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://testapi.obpay.online/api/kycs/',
CURLOPT_URL => 'https://testapi.obanana.io/api/kycs/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
@ -185,11 +185,11 @@ function get_kyc($bToken)
function get_kyc_info($IDkyc, $bToken)
{
$curl = curl_init();
//$url = "https://testapi.obpay.online/api/users/id/$email";
$url = "https://testapi.obpay.online/api/kycs/$IDkyc";
//$url = "https://testapi.obanana.io/api/users/id/$email";
$url = "https://testapi.obanana.io/api/kycs/$IDkyc";
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt_array($curl, array(
//CURLOPT_URL => 'https://testapi.obpay.online/api/users/egalang@premiummegastructures.com',
//CURLOPT_URL => 'https://testapi.obanana.io/api/users/egalang@premiummegastructures.com',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
@ -212,7 +212,7 @@ function reject_kyc($IDkyc, $IDuser, $reason, $bToken, $Admin_UserId)
{
// First cURL request to reject KYC
$curl = curl_init();
$url = "https://testapi.obpay.online/api/kycs/update/$IDkyc";
$url = "https://testapi.obanana.io/api/kycs/update/$IDkyc";
curl_setopt_array($curl, array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
@ -235,7 +235,7 @@ function reject_kyc($IDkyc, $IDuser, $reason, $bToken, $Admin_UserId)
$response1 = curl_exec($curl);
curl_close($curl);
$curl2 = curl_init();
$url2 = "https://testapi.obpay.online/api/users/$IDuser/sub";
$url2 = "https://testapi.obanana.io/api/users/$IDuser/sub";
$data = '{"kycStatus":"new", "kycRef":"' . $IDkyc . '"}';
curl_setopt_array($curl2, array(
CURLOPT_URL => $url2,
@ -266,7 +266,7 @@ function reject_kyc($IDkyc, $IDuser, $reason, $bToken, $Admin_UserId)
curl_setopt($curl3, CURLOPT_POSTFIELDS, $postfields);
curl_setopt_array($curl3, array(
CURLOPT_URL => 'https://testapi.obpay.online/api/notifications/create',
CURLOPT_URL => 'https://testapi.obanana.io/api/notifications/create',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
@ -291,7 +291,7 @@ function accept_kyc($IDkyc, $IDuser, $reason, $bToken, $Admin_UserId)
{
$curl = curl_init();
$url = "https://testapi.obpay.online/api/kycs/update/$IDkyc";
$url = "https://testapi.obanana.io/api/kycs/update/$IDkyc";
curl_setopt_array($curl, array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
@ -311,7 +311,7 @@ function accept_kyc($IDkyc, $IDuser, $reason, $bToken, $Admin_UserId)
$response1 = curl_exec($curl);
curl_close($curl);
$curl2 = curl_init();
$url2 = "https://testapi.obpay.online/api/users/$IDuser/sub";
$url2 = "https://testapi.obanana.io/api/users/$IDuser/sub";
$data = '{"kycStatus":"validated", "kycRef":"' . $IDkyc . '"}';
curl_setopt_array($curl2, array(
CURLOPT_URL => $url2,
@ -342,7 +342,7 @@ function accept_kyc($IDkyc, $IDuser, $reason, $bToken, $Admin_UserId)
curl_setopt($curl3, CURLOPT_POSTFIELDS, $postfields);
curl_setopt_array($curl3, array(
CURLOPT_URL => 'https://testapi.obpay.online/api/notifications/create',
CURLOPT_URL => 'https://testapi.obanana.io/api/notifications/create',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
@ -368,7 +368,7 @@ function delete_kyc_info($IDuser)
$curl = curl_init();
// Append the $refNum to the API URL for deletion
$url = "https://testapi.obpay.online/api/kycs/$IDuser/delete";
$url = "https://testapi.obanana.io/api/kycs/$IDuser/delete";
curl_setopt_array($curl, array(
CURLOPT_URL => $url,
@ -396,7 +396,7 @@ function user_login($email, $password)
$postfields = '{"users":"' . $email . '", "password":"' . $password . '"}';
curl_setopt($curl, CURLOPT_POSTFIELDS, $postfields);
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://testapi.obpay.online/api/auth/login',
CURLOPT_URL => 'https://testapi.obanana.io/api/auth/login',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
@ -419,12 +419,12 @@ function user_login($email, $password)
function user_balance($user_id, $token)
{
$curl = curl_init();
$url = "https://testapi.obpay.online/api/users/id/$user_id";
$url = "https://testapi.obanana.io/api/users/id/$user_id";
$httpheader = "Authorization: Bearer $token";
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array($httpheader));
curl_setopt_array($curl, array(
//CURLOPT_URL => 'https://testapi.obpay.online/api/users/id/6458dd6066139b3fee29a9cf',
//CURLOPT_URL => 'https://testapi.obanana.io/api/users/id/6458dd6066139b3fee29a9cf',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
@ -468,7 +468,7 @@ function cash_in($user_id, $amount, $notes, $refno)
}';
curl_setopt($curl, CURLOPT_POSTFIELDS, $postfields);
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://testapi.obpay.online/api/transactions/create',
CURLOPT_URL => 'https://testapi.obanana.io/api/transactions/create',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
@ -502,7 +502,7 @@ function cash_out($user_id, $amount, $notes, $refno)
}';
curl_setopt($curl, CURLOPT_POSTFIELDS, $postfields);
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://testapi.obpay.online/api/transactions/create',
CURLOPT_URL => 'https://testapi.obanana.io/api/transactions/create',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
@ -535,7 +535,7 @@ function create_notification($to_id, $amount)
';
curl_setopt($curl, CURLOPT_POSTFIELDS, $postfields);
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://testapi.obpay.online/api/notifications/create',
CURLOPT_URL => 'https://testapi.obanana.io/api/notifications/create',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
@ -568,7 +568,7 @@ function create_notification_co($from_id, $amount)
';
curl_setopt($curl, CURLOPT_POSTFIELDS, $postfields);
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://testapi.obpay.online/api/notifications/create',
CURLOPT_URL => 'https://testapi.obanana.io/api/notifications/create',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
@ -613,7 +613,7 @@ function sendSMSotp($phone, $otp)
function getUserById($id)
{
$curl = curl_init();
$url = "https://testapi.obpay.online/api/users/id/" . $id;
$url = "https://testapi.obanana.io/api/users/id/" . $id;
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt_array($curl, array(
//CURLOPT_URL => 'https://api.obpay.online/api/users/id/6458dd6066139b3fee29a9cf',