cfg = { path = "cfpayment.api.gateway.stripe.stripe", TestSecretKey = "sk_test_LfbmDduJxTwbVZmvcByYmirw" };
svc = createObject("component", "cfpayment.api.core").init(cfg);
The credit card payment was successfully processed.
SELECT A.CartID, A.AddedOn, A.Quantity, A.SpecialRemark, B.BusinessName, B.UserID, C.ItemName, A.Price, D.UserFirstName, D.LaerFirstName, D.Balance
FROM dbo.Business_CartMaster A, dbo.BusinessMaster B, dbo.Business_ItemMaster C, Users D
WHERE A.UserID = D.UserID
AND
A.ItemID = C.ItemID
AND
B.BusinessID = C.BusinessID
AND
C.BusinessID = #form.bizid#
AND
A.CartStatusID = 1
AND
A.UserID = #session.UserID#
ORDER BY A.AddedOn DESC
UPDATE dbo.Business_CartMaster
SET CartStatusID=2
WHERE CartID=#get_queued_food.CartID#
INSERT Into dbo.Business_OrderMaster (
UserID,
BusinessID,
IsDelivery,
TotalAmount,
Address,
DeliveryCharge,
TaxChargeAmount,
AddedOn
)
values (
#session.UserID#,
#form.bizid#,
0,
#cart_total#,
'',
0,
0,
#CreateODBCDateTime(now())#
);
SELECT TOP 1 O.OrderID, M.UserID as person_to_pay_for_orderID
FROM dbo.Business_OrderMaster O, dbo.BusinessMaster M
WHERE O.BusinessID = M.BusinessID
ORDER BY O.AddedOn DESC
INSERT INTO dbo.Business_OrderCartTransaction (
OrderID,
CartID
)
VALUES
(
#get_last_inserted.OrderID#,
#get_queued_food.CartID#
)
INSERT INTO dbo.PaymentMaster (
ReceiverID,
PayUserID,
BusinessID,
Amount,
AdminFees,
PayUserRemark,
SystemRemark,
AddedOn,
CartID
)
VALUES (
#get_last_inserted.person_to_pay_for_orderID#,
#session.UserID#,
#form.bizid#,
#cart_total-admin_fees_calculated#,
#admin_fees_calculated#,
'',
'',
#createODBCDateTime(now())#,
#get_queued_food.CartID#
)
UPDATE Users
SET balance = #check_user.balance-cart_total#
WHERE UserID = #session.UserID#
UPDATE Users
SET balance = #check_user.balance+(cart_total-admin_fees_calculated)#
WHERE UserID = #get_last_inserted.person_to_pay_for_orderID#
UPDATE Users
SET balance = #check_user.balance+admin_fees_calculated#
WHERE UserID = 104
Order Complete!
Reload for new balance
Initialization Error - Credit Card Payment Form