changeset 6a01d57bf23e in modules/account_payment_stripe:default
details:
https://hg.tryton.org/modules/account_payment_stripe?cmd=changeset&node=6a01d57bf23e
description:
Use correct function name to convert timestamp into datetime
issue11253
diffstat:
payment.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r 6fb86e38ff04 -r 6a01d57bf23e payment.py
--- a/payment.py Sun Apr 10 19:11:37 2022 +0200
+++ b/payment.py Mon Apr 11 13:38:47 2022 +0200
@@ -1632,7 +1632,8 @@
if setup_intent.status not in {'succeeded', 'canceled'}:
delay = customer.stripe_account.setup_intent_delay
expiration = dt.datetime.now() - delay
- if dt.datetime.fromtimstamp(setup_intent.created) < expiration:
+ created = dt.datetime.fromtimestamp(setup_intent.created)
+ if created < expiration:
stripe.SetupIntent.cancel(
customer.stripe_customer_id,
api_key=customer.stripe_account.secret_key)