add default org
This commit is contained in:
@@ -87,7 +87,8 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
||||
pk=keys['id'],
|
||||
sk=f'START#{start_period}#END#{end_period}',
|
||||
),
|
||||
update_expr='SET #status = :status, s3_uri = :s3_uri, \
|
||||
update_expr='SET #status = :status, \
|
||||
s3_uri = :s3_uri, \
|
||||
updated_at = :updated_at',
|
||||
expr_attr_names={'#status': 'status'},
|
||||
expr_attr_values={
|
||||
|
||||
@@ -101,6 +101,7 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
||||
key=KeyPair(order_id, 'TRANSACTION#STATS'),
|
||||
update_expr='SET #count = if_not_exists(#count, :zero) + :one, \
|
||||
last_attempt_succeeded = :succeeded, \
|
||||
created_at = if_not_exists(created_at, :now), \
|
||||
updated_at = :now',
|
||||
expr_attr_names={
|
||||
'#count': 'payment_attempts',
|
||||
@@ -109,7 +110,7 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
||||
':succeeded': charge['success'],
|
||||
':zero': 0,
|
||||
':one': 1,
|
||||
':now': now(),
|
||||
':now': now_,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@@ -87,9 +87,6 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
||||
)
|
||||
|
||||
if 'credit_card' in r:
|
||||
transact.delete(
|
||||
key=KeyPair(order_id, 'CREDIT_CARD#PAYMENT_INTENT'),
|
||||
)
|
||||
transact.put(
|
||||
item={
|
||||
'id': order_id,
|
||||
@@ -102,6 +99,9 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
||||
},
|
||||
cond_expr='attribute_not_exists(sk)',
|
||||
)
|
||||
transact.delete(
|
||||
key=KeyPair(order_id, 'CREDIT_CARD#PAYMENT_INTENT'),
|
||||
)
|
||||
|
||||
if test_mode:
|
||||
transact.put(
|
||||
|
||||
Reference in New Issue
Block a user