Dynamic API Endpoint Issues
This commit is contained in:
parent
a05bd1db37
commit
2a4f5a4755
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue