changed all instances of fipf to cipf

This commit is contained in:
asus
2024-03-07 22:32:50 +01:00
parent f870f77a2c
commit be79310404
18 changed files with 170 additions and 92 deletions

View File

@@ -8,10 +8,10 @@ import { PLGNTLS_fetch } from '../../utils/plgntls_fetch.js';
//async function createOrder() {
export async function createOrder() {
try {
//const fetch_create_url = PLGNTLS_data.fetch_url + "/fipf_plugin/api/v1/orders";
//const fetch_create_url = PLGNTLS_data.fetch_url + "/cipf_plugin/api/v1/orders";
//console.log("fetch_create_url:", fetch_create_url);
//const response = await fetch(fetch_create_url, {
const response = await PLGNTLS_fetch('/fipf_plugin/api/v1/orders', {
const response = await PLGNTLS_fetch('/cipf_plugin/api/v1/orders', {
method: "POST",
headers: {
"Content-Type": "application/json",
@@ -51,7 +51,7 @@ export async function createOrder() {
*
// Call your server to set up the transaction
function createOrder(data, actions) {
const fetch_create_url = PLGNTLS_data.fetch_url + "/fipf_plugin/api/v1/orders";
const fetch_create_url = PLGNTLS_data.fetch_url + "/cipf_plugin/api/v1/orders";
console.log("fetch_create_url:", fetch_create_url);
return fetch(fetch_create_url, {
method: 'post'

View File

@@ -8,10 +8,10 @@ import { PLGNTLS_fetch } from '../../utils/plgntls_fetch.js';
//async function onApprove(data, actions) {
export async function onApprove(data, actions) {
try {
const fetch_approve_url = PLGNTLS_data.fetch_url + "/fipf_plugin/api/v1/orders/" + data.orderID + "/capture";
const fetch_approve_url = PLGNTLS_data.fetch_url + "/cipf_plugin/api/v1/orders/" + data.orderID + "/capture";
console.log("fetch_approve_url:", fetch_approve_url);
//const response = await fetch(fetch_approve_url, {
const response = await PLGNTLS_fetch('/fipf_plugin/api/v1/orders/' + data.orderID + '/capture', {
const response = await PLGNTLS_fetch('/cipf_plugin/api/v1/orders/' + data.orderID + '/capture', {
method: "POST",
headers: {
"Content-Type": "application/json",
@@ -71,7 +71,7 @@ export async function onApprove(data, actions) {
*
// Call your server to finalize the transaction
function onApprove (data, actions) {
const fetch_approve_url = PLGNTLS_data.fetch_url + "/fipf_plugin/api/v1/orders/" + data.orderID + "/capture";
const fetch_approve_url = PLGNTLS_data.fetch_url + "/cipf_plugin/api/v1/orders/" + data.orderID + "/capture";
console.log("fetch_approve_url:", fetch_approve_url);
return fetch(fetch_approve_url, {
method: 'post'