stacy_branch #50

Merged
MarkHipe merged 4 commits from stacy_branch into main 2024-04-02 08:02:14 +08:00
3 changed files with 9 additions and 6 deletions
Showing only changes of commit 2a4f5a4755 - Show all commits

View File

@ -470,7 +470,9 @@ if (is_array($vendorDecode)) {
?>
$.ajax({
url: 'https://api.obanana.shop/api/v1/orders/' + orderId,
// url: 'https://api.obanana.shop/api/v1/orders/' + orderId,
url: 'https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/' + orderId,
type: 'GET',
headers: {
'Authorization': 'Bearer ' + token

View File

@ -618,7 +618,8 @@ $vendorPayoutData = json_decode($response, true);
var token = "<?php echo $authToken; ?>";
$('#payoutIdSpan').text(payoutId);
$.ajax({
url: 'https://api.obanana.shop/api/v1/payouts/' + payoutId,
// url: 'https://api.obanana.shop/api/v1/payouts/' + payoutId,
url: 'https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/payouts/' + payoutId,
type: 'GET',
headers: {
'Authorization': 'Bearer ' + token

View File

@ -1,5 +1,3 @@
<?php
@ -325,7 +323,8 @@ if ($_SESSION["userId"] <> "") {
// Make an AJAX request to update the favorites with the remaining products
var xhr = new XMLHttpRequest();
xhr.open('PATCH', 'https://api.obanana.shop/api/v1/customers/' + customerId, true);
// xhr.open('PATCH', 'https://api.obanana.shop/api/v1/customers/' + customerId, true);
xhr.open('PATCH', 'https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/customers/' + customerId, true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE) {
@ -360,7 +359,8 @@ if ($_SESSION["userId"] <> "") {
// Function to delete multiple products
function deleteProducts(productIds) {
var xhr = new XMLHttpRequest();
xhr.open('PATCH', 'https://api.obanana.shop/api/v1/customers/' + customerId, true);
// xhr.open('PATCH', 'https://api.obanana.shop/api/v1/customers/' + customerId, true);
xhr.open('PATCH', 'https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/customers/' + customerId, true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE) {