-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmp.py
More file actions
36 lines (34 loc) · 1.08 KB
/
Copy pathmp.py
File metadata and controls
36 lines (34 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import mercadopago
import json
from t import get
sdk = mercadopago.SDK("APP_USR-6810946749343910-102714-ed3a34e585628c745f54998a6ac96bc8-422523501")
def pix():
email = "timpremiados@gmail.com"
campo = "telegram bot"
payment_data = {
"transaction_amount": 19.99,
"description": f"Consulta placa:{campo} para o e-mail: {email}",
"payment_method_id": "pix",
"payer": {
"email": email,
"first_name": "Test",
"last_name": "User",
"identification": {
"type": "CPF",
"number": "191191191-00"
},
"address": {
"zip_code": "06233-200",
"street_name": "Av. das Nações Unidas",
"street_number": "3003",
"neighborhood": "Bonfim",
"city": "Osasco",
"federal_unit": "SP"
}
},
"date_of_expiration":str(get())+".000-04:00",
}
payment_response = sdk.payment().create(payment_data)
payment = payment_response["response"]
pix = payment["point_of_interaction"]["transaction_data"]["ticket_url"]
return pix