Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ import pandas as pd
|
|
| 6 |
app = Flask(__name__)
|
| 7 |
|
| 8 |
# Salesforce connection
|
| 9 |
-
sf = Salesforce(username='
|
| 10 |
|
| 11 |
# Utility functions
|
| 12 |
def check_credentials(email, password):
|
|
@@ -33,8 +33,8 @@ def submit_order(user_id, cart_items):
|
|
| 33 |
total_price = sum(item['itemTotal'] for item in cart_items)
|
| 34 |
order_items = "\n".join([f"{item['name']} (x{item['quantity']})" for item in cart_items])
|
| 35 |
sf.Order__c.create({
|
| 36 |
-
'
|
| 37 |
-
'
|
| 38 |
'Total_Price__c': total_price,
|
| 39 |
'Order_Status__c': 'Pending'
|
| 40 |
})
|
|
|
|
| 6 |
app = Flask(__name__)
|
| 7 |
|
| 8 |
# Salesforce connection
|
| 9 |
+
sf = Salesforce(username='diggavalli98@gmail.com', password='Sati@1020', security_token='sSSjyhInIsUohKpG8sHzty2q')
|
| 10 |
|
| 11 |
# Utility functions
|
| 12 |
def check_credentials(email, password):
|
|
|
|
| 33 |
total_price = sum(item['itemTotal'] for item in cart_items)
|
| 34 |
order_items = "\n".join([f"{item['name']} (x{item['quantity']})" for item in cart_items])
|
| 35 |
sf.Order__c.create({
|
| 36 |
+
'Customer_Login__c': user_id,
|
| 37 |
+
'Order_Item__c': order_items,
|
| 38 |
'Total_Price__c': total_price,
|
| 39 |
'Order_Status__c': 'Pending'
|
| 40 |
})
|