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." })>
|
||||
</cfif>
|
||||
|
||||
<!--- Create Payment record with cash amount --->
|
||||
<!--- Create Payment record with expected cash amount --->
|
||||
<cfset PaymentUUID = createUUID()>
|
||||
<cfset CashAmountCents = round(CashAmount * 100)>
|
||||
<cfset qInsertPayment = queryExecute(
|
||||
"INSERT INTO Payments (
|
||||
UUID,
|
||||
|
|
@ -65,7 +66,7 @@
|
|||
PaymentSentByUserID,
|
||||
PaymentOrderID,
|
||||
PaymentTip,
|
||||
CreatedOn
|
||||
PaymentAddedOn
|
||||
) VALUES (?, ?, ?, ?, ?, NOW())",
|
||||
[
|
||||
{ value = PaymentUUID, cfsqltype = "cf_sql_varchar" },
|
||||
|
|
@ -85,7 +86,7 @@
|
|||
SET StatusID = 1,
|
||||
PaymentID = ?,
|
||||
PaymentStatus = 'pending',
|
||||
Tip = ?,
|
||||
TipAmount = ?,
|
||||
SubmittedOn = NOW(),
|
||||
LastEditedOn = NOW()
|
||||
WHERE ID = ?",
|
||||
|
|
@ -97,7 +98,7 @@
|
|||
{ 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>
|
||||
<cfset apiAbort({
|
||||
|
|
|
|||
Reference in a new issue