erwin_branch #20

Merged
erwin merged 3 commits from erwin_branch into main 2024-02-21 14:14:04 +08:00
3 changed files with 9 additions and 4 deletions
Showing only changes of commit fdad95358b - Show all commits

View File

@ -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";
}
?>

View File

@ -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,

View File

@ -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,