Skip to content

Commit 32d148a

Browse files
Update README.md
1 parent a03ffdc commit 32d148a

1 file changed

Lines changed: 18 additions & 14 deletions

File tree

README.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,24 @@ Thats all, you have Mercado Pago SDK installed.
2626

2727
Simple usage looks like:
2828

29-
::
30-
def index(req, **kwargs):
31-
preference = {
32-
"items": [
33-
{
34-
"title": "Test",
35-
"quantity": 1,
36-
"currency_id": "USD",
37-
"unit_price": 10.4
38-
}
39-
]
40-
}
41-
42-
preferenceResult = mp.create_preference(preference)
29+
```python
30+
import mercadopago
31+
import json
32+
33+
mp = mercadopago.MP("CLIENT_ID", "CLIENT_SECRET")
34+
preference = {
35+
"items": [
36+
{
37+
"title": "Test",
38+
"quantity": 1,
39+
"currency_id": "USD",
40+
"unit_price": 10.4
41+
}
42+
]
43+
}
44+
45+
mp.create_preference(preference)
46+
```
4347

4448
## 📚 Documentation
4549

0 commit comments

Comments
 (0)