Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fenriz07 authored Jan 8, 2021
1 parent 7c254e5 commit 1e042d6
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<p align="center">

[![Go Report Card](https://goreportcard.com/badge/github.com/fenriz07/Golang-Transbank-Oneclick-mall)](https://goreportcard.com/report/github.com/fenriz07/Golang-Transbank-Oneclick-mall)
<a href="https://pkg.go.dev/github.com/fenriz07/Golang-Transbank-Oneclick-mall"><img src="https://godoc.org/github.com/fenriz07/Golang-Transbank-Oneclick-mall?status.svg" alt="GoDoc"></a>


</p>
Expand Down Expand Up @@ -82,37 +83,37 @@ oneclickmall.SetEnvironmentProduction(APIKeyID,APIKeySecret)

### Crear una inscripción
```go
response, err := inscription.CreateInscription(username, email, "http://localhost:8080/inscription/confirm")
response, err := inscription.CreateInscription(username, email, "http://localhost:8080/inscription/confirm")
```

### Confirmar una inscripción
```go
response, err := inscription.ConfirmInscription(token)
response, err := inscription.ConfirmInscription(token)
```

### Borrar una inscripción
```go
status, err := inscription.DeleteInscription(userToken, username)
status, err := inscription.DeleteInscription(userToken, username)
```

### Autorizar un pago
```go
//Primero creamos el detalle de la transacción
detail := transaction.CreateDetailTransaction("597055555542", order, amount, 1)
//Primero creamos el detalle de la transacción
detail := transaction.CreateDetailTransaction("597055555542", order, amount, 1)

//Llamamos a transaction.AuthorizeTransaction y pasamos: Usuario, token de usuario, numero de orden y detalle (detail)
response, err := transaction.AuthorizeTransaction(username, userToken, order, detail)
//Llamamos a transaction.AuthorizeTransaction y pasamos: Usuario, token de usuario, numero de orden y detalle (detail)
response, err := transaction.AuthorizeTransaction(username, userToken, order, detail)
```

### Estado de un pago
```go
response, err := transaction.StatusTransaction(order)
response, err := transaction.StatusTransaction(order)
```


### Reversar o anular un pago
```go
response, err := transaction.RefundTransaction(order, "597055555542", order, amount)
response, err := transaction.RefundTransaction(order, "597055555542", order, amount)
```

## Creador
Expand Down

0 comments on commit 1e042d6

Please sign in to comment.