Spaces:
Sleeping
Sleeping
Setup Future Usage Null
Browse files- funciones.py +4 -1
- paga_oxxo.py +4 -2
funciones.py
CHANGED
@@ -96,7 +96,10 @@ def create_checkout_session(price_id, customer_email=None, customer_id=None, fir
|
|
96 |
# 'client_reference_id': 'HERC',
|
97 |
'metadata': {
|
98 |
'imagenes': unidades
|
99 |
-
}
|
|
|
|
|
|
|
100 |
}
|
101 |
|
102 |
# Asociar el cliente encontrado/creado a la sesi贸n
|
|
|
96 |
# 'client_reference_id': 'HERC',
|
97 |
'metadata': {
|
98 |
'imagenes': unidades
|
99 |
+
},
|
100 |
+
'payment_intent_data': {
|
101 |
+
'setup_future_usage': None # En Python usamos None en lugar de null
|
102 |
+
}
|
103 |
}
|
104 |
|
105 |
# Asociar el cliente encontrado/creado a la sesi贸n
|
paga_oxxo.py
CHANGED
@@ -1,13 +1,15 @@
|
|
1 |
import stripe
|
2 |
import globales
|
3 |
|
4 |
-
|
|
|
|
|
5 |
|
6 |
# Despu茅s de crear un Checkout Session
|
7 |
#session = stripe.checkout.Session.create(**session_params)
|
8 |
|
9 |
# Si necesitas recuperar el PaymentIntent asociado a la sesi贸n
|
10 |
-
payment_intent = stripe.PaymentIntent.retrieve('
|
11 |
print("payment_intent obtenido...")
|
12 |
|
13 |
# Comprobar si hay alguna acci贸n necesaria
|
|
|
1 |
import stripe
|
2 |
import globales
|
3 |
|
4 |
+
print("Haciendo pago en Oxxo...")
|
5 |
+
|
6 |
+
stripe.api_key = globales.llave
|
7 |
|
8 |
# Despu茅s de crear un Checkout Session
|
9 |
#session = stripe.checkout.Session.create(**session_params)
|
10 |
|
11 |
# Si necesitas recuperar el PaymentIntent asociado a la sesi贸n
|
12 |
+
payment_intent = stripe.PaymentIntent.retrieve('pi_3RupzSROVpWRmEfB1wEZghFL')
|
13 |
print("payment_intent obtenido...")
|
14 |
|
15 |
# Comprobar si hay alguna acci贸n necesaria
|