Fix column names in submitCash.cfm (PaymentAddedOn, TipAmount)
This commit is contained in:
parent
175fdfb2b9
commit
eebf231aad
1 changed files with 5 additions and 4 deletions
|
|
@ -56,8 +56,9 @@
|
||||||
<cfset apiAbort({ "OK": false, "ERROR": "bad_state", "MESSAGE": "Order is not in cart state." })>
|
<cfset apiAbort({ "OK": false, "ERROR": "bad_state", "MESSAGE": "Order is not in cart state." })>
|
||||||
</cfif>
|
</cfif>
|
||||||
|
|
||||||
<!--- Create Payment record with cash amount --->
|
<!--- Create Payment record with expected cash amount --->
|
||||||
<cfset PaymentUUID = createUUID()>
|
<cfset PaymentUUID = createUUID()>
|
||||||
|
<cfset CashAmountCents = round(CashAmount * 100)>
|
||||||
<cfset qInsertPayment = queryExecute(
|
<cfset qInsertPayment = queryExecute(
|
||||||
"INSERT INTO Payments (
|
"INSERT INTO Payments (
|
||||||
UUID,
|
UUID,
|
||||||
|
|
@ -65,7 +66,7 @@
|
||||||
PaymentSentByUserID,
|
PaymentSentByUserID,
|
||||||
PaymentOrderID,
|
PaymentOrderID,
|
||||||
PaymentTip,
|
PaymentTip,
|
||||||
CreatedOn
|
PaymentAddedOn
|
||||||
) VALUES (?, ?, ?, ?, ?, NOW())",
|
) VALUES (?, ?, ?, ?, ?, NOW())",
|
||||||
[
|
[
|
||||||
{ value = PaymentUUID, cfsqltype = "cf_sql_varchar" },
|
{ value = PaymentUUID, cfsqltype = "cf_sql_varchar" },
|
||||||
|
|
@ -85,7 +86,7 @@
|
||||||
SET StatusID = 1,
|
SET StatusID = 1,
|
||||||
PaymentID = ?,
|
PaymentID = ?,
|
||||||
PaymentStatus = 'pending',
|
PaymentStatus = 'pending',
|
||||||
Tip = ?,
|
TipAmount = ?,
|
||||||
SubmittedOn = NOW(),
|
SubmittedOn = NOW(),
|
||||||
LastEditedOn = NOW()
|
LastEditedOn = NOW()
|
||||||
WHERE ID = ?",
|
WHERE ID = ?",
|
||||||
|
|
@ -97,7 +98,7 @@
|
||||||
{ datasource = "payfrit" }
|
{ datasource = "payfrit" }
|
||||||
)>
|
)>
|
||||||
|
|
||||||
<cfset apiAbort({ "OK": true, "OrderID": OrderID, "PaymentID": PaymentID, "MESSAGE": "Order submitted with cash payment." })>
|
<cfset apiAbort({ "OK": true, "OrderID": OrderID, "PaymentID": PaymentID, "CashAmountCents": CashAmountCents, "MESSAGE": "Order submitted with cash payment." })>
|
||||||
|
|
||||||
<cfcatch>
|
<cfcatch>
|
||||||
<cfset apiAbort({
|
<cfset apiAbort({
|
||||||
|
|
|
||||||
Reference in a new issue