habulaj commited on
Commit
0a391d0
·
verified ·
1 Parent(s): 746d8ca

Update routes/subscription.py

Browse files
Files changed (1) hide show
  1. routes/subscription.py +2 -2
routes/subscription.py CHANGED
@@ -135,7 +135,7 @@ async def sync_emergency_payments(request: Request, data: EmergencyPaymentReques
135
  continue # Pular se já existe
136
 
137
  # Se não existe, adicionar pagamento de emergência ao Supabase
138
- amount = stripe_payment["amount_received"] / 100 # Valor recebido
139
  currency = stripe_payment["currency"].upper() # Moeda
140
 
141
  payment_method = stripe_payment.get("payment_method")
@@ -150,7 +150,7 @@ async def sync_emergency_payments(request: Request, data: EmergencyPaymentReques
150
  "stylist_id": stylist_id,
151
  "client_id": user_id,
152
  "payment_id": payment_id,
153
- "amount": amount,
154
  "currency": currency,
155
  "payment_method": f"{payment_type.upper()} ending in {last4}",
156
  "status": stripe_payment["status"], # Status do pagamento
 
135
  continue # Pular se já existe
136
 
137
  # Se não existe, adicionar pagamento de emergência ao Supabase
138
+ price = stripe_payment["amount_received"] / 100 # Valor recebido
139
  currency = stripe_payment["currency"].upper() # Moeda
140
 
141
  payment_method = stripe_payment.get("payment_method")
 
150
  "stylist_id": stylist_id,
151
  "client_id": user_id,
152
  "payment_id": payment_id,
153
+ "price": price, # Usando a coluna correta 'price'
154
  "currency": currency,
155
  "payment_method": f"{payment_type.upper()} ending in {last4}",
156
  "status": stripe_payment["status"], # Status do pagamento