Skip to content

Commit b96c13f

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

1 file changed

Lines changed: 16 additions & 14 deletions

File tree

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,24 @@ Thats all, you have Mercado Pago SDK installed.
2727
Simple usage looks like:
2828

2929
```python
30-
import mercadopago
31-
import json
30+
import mercadopago
31+
import json
3232

33-
mp = mercadopago.MP("CLIENT_ID", "CLIENT_SECRET")
34-
preference = {
33+
mp = mercadopago.MP("CLIENT_ID", "CLIENT_SECRET")
34+
35+
def index(req, **kwargs):
36+
preference = {
3537
"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)
38+
{
39+
"title": "Test",
40+
"quantity": 1,
41+
"currency_id": "USD",
42+
"unit_price": 10.4
43+
}
44+
]
45+
}
46+
47+
mp.create_preference(preference)
4648
```
4749

4850
## 📚 Documentation

0 commit comments

Comments
 (0)