Skip to content

Commit

Permalink
Update exemple paymentmethod
Browse files Browse the repository at this point in the history
  • Loading branch information
lucmkz authored Mar 11, 2024
1 parent 6e86ef4 commit a7f691a
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,8 @@ Before making API requests, you need to initialize the SDK with your access toke
To make requests to the Mercado Pago APIs, you can use the packages provided by the SDK. For example, to list payment methods, you can use the `paymentmethod` package:

```go
req := payment.Request{
TransactionAmount: 105.1,
Payer: &payment.PayerRequest{
Email: "{{EMAIL}}",
},
Token: "{{CARD_TOKEN}}",
Installments: 1,
}

client := payment.NewClient(cfg)
pay, err := client.Create(context.Background(), req)
client := paymentmethod.NewClient(cfg)
paymentMethods, err := client.List(context.Background())
```

### Exception throwing handling
Expand Down

0 comments on commit a7f691a

Please sign in to comment.