webpay

package
v0.0.0-...-e54bcae Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TransbankIntegrationCert stores the certificate to verify the SOAP
	// responses of the integration environment
	TransbankIntegrationCert = `` /* 1467-byte string literal not displayed */

	// TransbankCert stores the certificate to verify the SOAP responses of the
	// production environment
	TransbankCert = `` /* 1288-byte string literal not displayed */

)
View Source
const (
	EnvironmentIntegration   = "integration"
	EnvironmentCertification = "certification"
	EnvironmentTest          = "test"
	EnvironmentLive          = "live"
	EnvironmentProduction    = "production"

	ServiceNormal       = "normal"
	ServiceMallNormal   = "mallNormal"
	ServicePatpass      = "patpass"
	ServiceCapture      = "capture"
	ServiceNullify      = "nullify"
	ServiceOneClick     = "oneClick"
	ServiceOneClickMall = "oneClickMall"
)

Variables

This section is empty.

Functions

func NewIntegrationPatpass

func NewIntegrationPatpass() transbank.Transaction

NewIntegrationPatpass returns a configured Webpay instance that will use the integration environment

func NewIntegrationPlusNormal

func NewIntegrationPlusNormal() transbank.Transaction

NewIntegrationPlusNormal returns a configured Webpay instance that will use the integration environment

func NewPatpass

func NewPatpass(privateCert, publicCert string, commerceCode int64, commerceEmail, service, environment string) (transbank.Transaction, error)

NewPatpass returns a Webpay Plus Normal with respective configuration

func NewPlusNormal

func NewPlusNormal(privateCert, publicCert string, commerceCode int64, commerceEmail, service, environment string) (transbank.Transaction, error)

NewPlusNormal returns a Webpay Plus Normal with respective configuration

Types

type Webpay

type Webpay struct {
	sign.SOAPSigner
	// contains filtered or unexported fields
}

Webpay holds configuration that will be used by the services `service`

func New

func New(privateCert, publicCert string, commerceCode int64, commerceEmail, service, environment string) (*Webpay, error)

New returns a configured Webpay instance

func (*Webpay) GetCommerceCode

func (w *Webpay) GetCommerceCode() int64

func (*Webpay) SOAP

func (w *Webpay) SOAP(payload interface{}) ([]byte, error)

SOAP This method performs a SOAP request to the server with a given payload

Jump to

Keyboard shortcuts

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