Skip to content

Commit 593d93b

Browse files
feat: Adiciona campos de validação e URL de verificação de autenticidade no resultado do certificado
1 parent 1691852 commit 593d93b

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

lambda_function.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ def lambda_handler(event, context):
132132

133133
certificates_results_messagens.append({
134134
"order_id": result.get('participant', {}).get('event', {}).get('order_id', ""),
135+
"validation_code": result.get('participant', {}).get('validation_code', ""),
136+
"authenticity_verification_url": result.get('participant', {}).get('authenticity_verification_url', ""),
135137
"product_id": result.get('participant', {}).get('event', {}).get('product_id', ""),
136138
"product_name": result.get('participant', {}).get('event', {}).get('product_name', ""),
137139
"email": result.get('participant', {}).get('email', ""),
@@ -169,3 +171,34 @@ def lambda_handler(event, context):
169171
'message': 'Erro ao gerar certificados'
170172
})
171173
}
174+
175+
176+
if __name__ == "__main__":
177+
# Test event for local execution
178+
test_event = {
179+
"Records": [
180+
{
181+
"body": [
182+
{
183+
"order_id": 2266,
184+
"first_name": "Maxson",
185+
"last_name": "Almeida Ferovante",
186+
"email": "[email protected]",
187+
"phone": "(48) 99223-8206",
188+
"cpf": "",
189+
"city": "Florianópolis",
190+
"product_id": 316,
191+
"product_name": "Evento de Teste",
192+
"certificate_details": "In recognition of their participation in the 90st edition of the Python Floripa Community Meeting, held on Sep 27, 2025, in Florianópolis, Brazil, with a total duration of 5 hours.",
193+
"certificate_logo": "https://tech.floripa.br/wp-content/uploads/2025/03/logo-certificado.png",
194+
"certificate_background": "https://tech.floripa.br/wp-content/uploads/2025/03/certificado-python-floripa.png",
195+
"order_date": "2025-08-28 02:44:54",
196+
"checkin_latitude": "-27.5460492",
197+
"checkin_longitude": "-48.6227075",
198+
"time_checkin": "2025-03-26 20:55:44"
199+
},
200+
]
201+
}
202+
]
203+
}
204+
lambda_handler(test_event, None)

0 commit comments

Comments
 (0)