diff --git a/api/Application.cfm b/api/Application.cfm index e3fc64f..e8ba379 100644 --- a/api/Application.cfm +++ b/api/Application.cfm @@ -32,10 +32,8 @@ showdebugoutput="false" > - - - - + + function apiAbort(payload) { @@ -85,6 +83,7 @@ if (len(request._api_path)) { if (findNoCase("/api/tasks/accept.cfm", request._api_path)) request._api_isPublic = true; if (findNoCase("/api/tasks/listMine.cfm", request._api_path)) request._api_isPublic = true; if (findNoCase("/api/tasks/complete.cfm", request._api_path)) request._api_isPublic = true; + if (findNoCase("/api/tasks/getDetails.cfm", request._api_path)) request._api_isPublic = true; // Worker app endpoints if (findNoCase("/api/workers/myBusinesses.cfm", request._api_path)) request._api_isPublic = true; diff --git a/api/stripe/createPaymentIntent.cfm b/api/stripe/createPaymentIntent.cfm index bb2ec81..45fc343 100644 --- a/api/stripe/createPaymentIntent.cfm +++ b/api/stripe/createPaymentIntent.cfm @@ -127,23 +127,7 @@ try { abort; } - // Save payment intent and fee info to order - queryExecute(" - UPDATE Orders - SET OrderStripePaymentIntentID = :paymentIntentID, - OrderTipAmount = :tipAmount, - OrderPayfritFee = :payfritFee, - OrderCardFee = :cardFee, - OrderTotalCharged = :totalCharged - WHERE OrderID = :orderID - ", { - paymentIntentID: piData.id, - tipAmount: tip, - payfritFee: payfritCustomerFee + payfritBusinessFee, - cardFee: cardFee, - totalCharged: totalCustomerPays, - orderID: orderID - }, { datasource: "payfrit" }); + // Fees are calculated dynamically, not stored in DB response["OK"] = true; response["CLIENT_SECRET"] = piData.client_secret; diff --git a/api/tasks/getDetails.cfm b/api/tasks/getDetails.cfm new file mode 100644 index 0000000..b6e855c --- /dev/null +++ b/api/tasks/getDetails.cfm @@ -0,0 +1,156 @@ + + + + + + + #serializeJSON(arguments.payload)# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +