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.
Your receipt can be found here.
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,
Remark,
Address,
DeliveryCharge,
TaxChargeAmount,
AddedOn
)
values (
#session.UserID#,
#form.bizid#,
0,
#cart_total#,
'#form.SpecialRemark#',
'',
0,
0,
#CreateODBCDateTime(now())#
);
SELECT TOP 1 O.OrderID, M.UserID as person_to_pay_for_orderID, U.Balance
FROM dbo.Business_OrderMaster O, dbo.BusinessMaster M, Users U
WHERE O.BusinessID = M.BusinessID
AND
M.UserID = U.UserID
ORDER BY O.AddedOn DESC
INSERT INTO dbo.Business_OrderCartTransaction (
OrderID,
CartID
)
VALUES
(
#get_last_inserted.OrderID#,
#get_queued_food.CartID#
)
problem! what is the payment_mode?
INSERT INTO dbo.PaymentMaster (
ReceiverID,
PayUserID,
BusinessID,
Amount,
AdminFees,
PayUserRemark,
SystemRemark,
AddedOn,
CartID,
PaymentReceiptURL
)
VALUES (
#get_last_inserted.person_to_pay_for_orderID#,
#session.UserID#,
#form.bizid#,
#cart_total-admin_fees_calculated#,
#admin_fees_calculated#,
'',
'from account balance',
#createODBCDateTime(now())#,
#get_queued_food.CartID#,
'#stcResult.receipt_url#'
)
UPDATE Users
SET balance = #check_user.balance-cart_total#
WHERE UserID = #session.UserID#
UPDATE Users
SET balance = #get_last_inserted.balance+(cart_total-admin_fees_calculated)#
WHERE UserID = #get_last_inserted.person_to_pay_for_orderID#
SELECT balance
FROM Users
WHERE UserID = 104
UPDATE Users
SET balance = #get_user_104_balance.balance+admin_fees_calculated#
WHERE UserID = 104
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#,
#get_queued_food.balance#,
#admin_fees_calculated#,
'',
'mixed - from account balance #dollarformat(get_queued_food.balance)#',
#createODBCDateTime(now())#,
#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-get_queued_food.balance#,
0,
'',
'mixed - from credit card #dollarformat(amount)#',
#createODBCDateTime(now())#,
#get_queued_food.CartID#
)
UPDATE Users
SET balance = 0
WHERE UserID = #session.UserID#
UPDATE Users
SET balance = #get_last_inserted.balance+(cart_total-admin_fees_calculated)#
WHERE UserID = #get_last_inserted.person_to_pay_for_orderID#
SELECT balance
FROM Users
WHERE UserID = 104
UPDATE Users
SET balance = #get_user_104_balance.balance+admin_fees_calculated#
WHERE UserID = 104
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#,
'',
'from credit card',
#createODBCDateTime(now())#,
#get_queued_food.CartID#
)
UPDATE Users
SET balance = #get_last_inserted.balance+(cart_total-admin_fees_calculated)#
WHERE UserID = #get_last_inserted.person_to_pay_for_orderID#
problem! what is the payment_mode?
Order Complete!
Reload for new balance
Initialization Error - Credit Card Payment Form