Documentation
¶
Index ¶
- Variables
- type Bridge
- func (bridge *Bridge) Description() *plutus.BridgeDescription
- func (bridge *Bridge) MakeCharge(source plutus.CardToken, params plutus.ChargeParams) (*plutus.ChargeToken, error)
- func (bridge *Bridge) MakeRefund(source plutus.ChargeToken, params plutus.RefundParams) (*plutus.RefundToken, error)
- func (bridge *Bridge) NewToken(details plutus.CardDetails, kind plutus.CardTokenType) (*plutus.CardToken, error)
- type Card
- type CheckoutParams
- type CustomerInfo
- type Token
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCulqiNotWorking = errors.New("sorry, culqi is a piece of shit and it isn't working")
ErrCulqiNotWorking culqi is a shit
Functions ¶
This section is empty.
Types ¶
type Bridge ¶
type Bridge struct {
// contains filtered or unexported fields
}
Bridge represents a bridge between your culqi service and your plutus service
func (*Bridge) Description ¶
func (bridge *Bridge) Description() *plutus.BridgeDescription
Description returns useful information of culqi bridge, that is an implementation of plutus bridge
func (*Bridge) MakeCharge ¶
func (bridge *Bridge) MakeCharge(source plutus.CardToken, params plutus.ChargeParams) (*plutus.ChargeToken, error)
MakeCharge make a charge with culqi, that implements plutus bridge
func (*Bridge) MakeRefund ¶
func (bridge *Bridge) MakeRefund(source plutus.ChargeToken, params plutus.RefundParams) (*plutus.RefundToken, error)
MakeRefund ...
func (*Bridge) NewToken ¶
func (bridge *Bridge) NewToken(details plutus.CardDetails, kind plutus.CardTokenType) (*plutus.CardToken, error)
NewToken returns a new token of your card, that is an implementation of plutus bridge
type Card ¶
type Card struct { ID string `json:"id"` CustomerID string `json:"customer_id"` Token struct { ID string `json:"id"` CardNumber string `json:"card_number"` Active bool Iin struct { CardBrand string `json:"card_brand"` CardType string `json:"card_type"` CardCategory string `json:"card_category"` } `json:"iin"` } `json:"token"` }
Card represents the culqi response to /card endpoint
type CheckoutParams ¶
type CheckoutParams struct { Title string Currency string Description string Amount string Logo string Installments bool Orders string }
CheckoutParams ...
type CustomerInfo ¶
type CustomerInfo struct { FirstName string `json:"first_name"` LastName string `json:"last_name"` Email string `json:"email"` Address string `json:"address"` AddressCity string `json:"address_city"` CountryCode string `json:"country_code"` PhoneNumber string `json:"phone_number"` Metadata map[string]string `json:"metadata"` }
CustomerInfo is an customer object of Culqi Service
Click to show internal directories.
Click to hide internal directories.