added payment gateway switch in config.php
This commit is contained in:
parent
705df743f0
commit
fdad95358b
|
@ -3,6 +3,11 @@ $_SESSION["is_test"]=true;
|
|||
$_SESSION["test_email_rcpt"]="";
|
||||
$_SESSION["sales_email"]="";
|
||||
$_SESSION["data_endpoint"]="api.obanana.shop";
|
||||
$_SESSION["obpay"]="";
|
||||
$_SESSION["obpay_gate"]="";
|
||||
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";
|
||||
}
|
||||
?>
|
|
@ -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://<?php echo $_SESSION["obpay_gate"]; ?>/payment/links', {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
amount: totalAmount * 100,
|
||||
|
|
|
@ -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://<?php echo $_SESSION["obpay_gate"]; ?>/payment/links', {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
amount: totalAmount * 100,
|
||||
|
|
Loading…
Reference in New Issue