diff --git a/admin/config.php b/admin/config.php index d7fea8a..57d9763 100644 --- a/admin/config.php +++ b/admin/config.php @@ -3,4 +3,11 @@ $_SESSION["is_test"]=true; $_SESSION["test_email_rcpt"]="stacyjoycemapano@gmail.com"; $_SESSION["sales_email"]="stacyjoycemapano@gmail.com"; $_SESSION["data_endpoint"]="api.obanana.shop"; +if ($_SESSION["is_test"]){ + $_SESSION["obpay"]="web.obpay.online/test"; + $_SESSION["obpay_gate"]="gate.obpay.online/api"; +} else { + $_SESSION["obpay"]="web.obpay.online"; + $_SESSION["obpay_gate"]="gate.obpay.online/api/v1"; +} ?> \ No newline at end of file diff --git a/checkout.php b/checkout.php index a0d9dd4..9c31b2f 100644 --- a/checkout.php +++ b/checkout.php @@ -848,7 +848,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"] } else if (pay2RadioButton.checked) { try { const base64Credentialss = btoa(`${username}:${password}`); - const response = await fetch('https://gate.obpay.online/api/payment/links', { + const response = await fetch('https:///payment/links', { method: "POST", body: JSON.stringify({ amount: totalAmount * 100, diff --git a/checkouttest.php b/checkouttest.php index 154742a..a356165 100644 --- a/checkouttest.php +++ b/checkouttest.php @@ -856,7 +856,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"] try { const base64Credentialss = btoa(`${username}:${password}`); - const response = await fetch('https://gate.obpay.online/api/v1/payment/links', { + const response = await fetch('https:///payment/links', { method: "POST", body: JSON.stringify({ amount: totalAmount * 100, diff --git a/header.php b/header.php index 4767466..71d2a17 100644 --- a/header.php +++ b/header.php @@ -862,7 +862,7 @@
  • Privacy Policy
  • --> -