mercadopago

package
v0.0.0-...-769f8fb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MERCHANT_ORDER = "merchant_order"
	PAYMENT        = "payment"
)

Variables

View Source
var OrderStatus = struct {
	CLOSED  string
	OPENED  string
	EXPIRED string
}{
	CLOSED:  "closed",
	OPENED:  "opened",
	EXPIRED: "expired",
}

Functions

This section is empty.

Types

type Item

type Item struct {
	Title     string  `json:"title"`
	Quantity  int64   `json:"quantity"`
	UnitPrice float64 `json:"unit_price"`
}

type Notification

type Notification struct {
	Id    string `json:"id"`
	Topic string `json:"topic"`
}

type Order

type Order struct {
	Id                int64  `json:"id"`
	ExternalReference string `json:"external_reference"`
	PreferenceId      string `json:"preference_id"`
	OrderStatus       string `json:"order_status"`
	Status            string `json:"status"`
}

func GetMerchantOrder

func GetMerchantOrder(orderId string) (Order, error)

func (*Order) IsTotallyPaid

func (order *Order) IsTotallyPaid() bool

type Preference

type Preference struct {
	ID                string `json:"id,omitempty"`
	InitPoint         string `json:"init_point,omitempty"`
	ExternalReference string `json:"external_reference"`
	Items             []Item `json:"items"`
}

func CreatePreference

func CreatePreference(preference Preference) (Preference, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL