pkg

package
v0.0.0-...-5dae55a Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ThreeDSecurePasswordAttemptsBegin = `<a id="resendPasswordLink" href="#" title="`
View Source
const ThreeDSecurePasswordAttemptsEnd = ` password send attempt(s) left" onclick="jsf.util.chain`
View Source
const ThreeDSecurePaymentResponseBegin = `<input type="hidden" name="PaRes" value="`
View Source
const ThreeDSecurePaymentResponseEnd = `" />`
View Source
const ThreeDSecurePhoneTipBegin = `<div id="tipContainer" class="tipContainer"><span class="tip">One-time password will be sent to number `
View Source
const ThreeDSecurePhoneTipEnd = `</span></div>`
View Source
const ThreeDSecurePhoneTipEndForRysgal = `</span>`
View Source
const ThreeDSecurePhoneTipMiddleForRysgal = `<div class="col-xs-12"><span class="tip__text">One-time password will be sent to number `
View Source
const ThreeDSecureWrongPasswordAttemptBegin = `<div id="errorContainer" class="errorContainer"><ul><li class="errorMessage">	Wrong password typed attempt `
View Source
const ThreeDSecureWrongPasswordAttemptEnd = ` </li></ul></div>`
View Source
const ThreeDSecureWrongPasswordAttemptMiddle = ` of `
View Source
const ThreeDSecureWrongPasswordFinal = `<span class="operationCancelledMessage">Operation cancelled</span>`

Variables

View Source
var ErrWrongPasswordOperationCancelled = errors.New("wrong password, operation cancelled")

Functions

This section is empty.

Types

type ConfirmPaymentRequest

type ConfirmPaymentRequest struct {
	// application trying to use bpc hack, for information purpose only
	// to identify each user's request one from another
	MDOrder         string `json:"md_order"`
	ACSRequestId    string `json:"acs-request-id"`
	ACSSessionUrl   string `json:"acs-session-url,omitempty"`
	OneTimePassword string `json:"one-time-password"`
	TerminateUrl    string `json:"terminate-url"`
}

type ConfirmPaymentResponse

type ConfirmPaymentResponse struct {
	Status         HackResponseStatus `json:"status"`
	CurrentAttempt int                `json:"current-attempt,omitempty"`
	TotalAttempts  int                `json:"total-attempts,omitempty"`
	FinalUrl       string             `json:"final-url,omitempty"`
}

func (*ConfirmPaymentResponse) String

func (s *ConfirmPaymentResponse) String() string

type HackResponseStatus

type HackResponseStatus string
const (
	HackResponseStatusOk                 HackResponseStatus = "ok"
	HackResponseStatusNetworkError       HackResponseStatus = "network-error"
	HackResponseStatusAlreadyProcessed   HackResponseStatus = "already-processed"
	HackResponseStatusWrongOTP           HackResponseStatus = "wrong-otp"
	HackResponseStatusOperationCancelled HackResponseStatus = "operation-cancelled"
	HackResponseStatusOtherError         HackResponseStatus = "other-error"
	HackResponseStatusSpecifyCVC         HackResponseStatus = "specify-cvc"
	HackResponseStatusInvalidCard        HackResponseStatus = "invalid-card"
)

type ResendCodeRequest

type ResendCodeRequest struct {
	// application trying to use bpc hack, for information purpose only
	// to identify each user's request one from another
	ACSRequestId  string `json:"acs-request-id"`
	ACSSessionUrl string `json:"acs-session-url"`
}

type ResendCodeResponse

type ResendCodeResponse struct {
	Status             HackResponseStatus `json:"status"`
	ResendAttemptsLeft int                `json:"resend-attempts-left"`
}

func (*ResendCodeResponse) String

func (s *ResendCodeResponse) String() string

type Service

type Service interface {
	Step1StartHack(ctx context.Context, req StartHackRequest) (StartHackResponse, error)
	Step2SubmitCard(ctx context.Context, req SubmitCardRequest) (SubmitCardResponse, error)
	Step3ResendCode(ctx context.Context, req ResendCodeRequest) (ResendCodeResponse, error)
	Step4ConfirmPayment(ctx context.Context, req ConfirmPaymentRequest) (ConfirmPaymentResponse, error)
}

func NewService

func NewService(baseMpiUrl string, timeout time.Duration) Service

type StartHackRequest

type StartHackRequest struct {
	// application trying to use bpc hack, for information purpose only
	// to identify each user's request one from another
	// url you received to redirect user to (during https://{crappy_bpc_server}/register.do request)
	PaymentUrl string `json:"url"`
}

type StartHackResponse

type StartHackResponse struct {
	Status        HackResponseStatus `json:"status"`
	MDOrder       string             `json:"md-order,omitempty"`
	RemainingTime int64              `json:"remaining-time,omitempty"`
	ExpirationTs  int64              `json:"expiration-ts,omitempty"`
	IsCVCRequired bool               `json:"is-cvc-required,omitempty"`
	AmountInfo    string             `json:"amount-info,omitempty"`
}

type SubmitCardRequest

type SubmitCardRequest struct {
	// application trying to use bpc hack, for information purpose only
	// to identify each user's request one from another
	MDOrder    string `json:"md-order"`
	CardNumber string `json:"card-number"`
	Expiry     string `json:"card-expiry"`
	NameOnCard string `json:"name-on-card"`
	CVCCode    string `json:"card-cvc,omitempty"`
}

type SubmitCardResponse

type SubmitCardResponse struct {
	Status        HackResponseStatus `json:"status"`
	ACSRequestId  string             `json:"acs-request-id,omitempty"`
	ACSSessionUrl string             `json:"acs-session-url,omitempty"`
	// number shown in acs form
	ThreeDSecureNumber string `json:"three-d-secure-number,omitempty"`
	ResendAttemptsLeft int    `json:"resend-attempts-left,omitempty"`
	TerminateUrl       string `json:"terminate-url,omitempty"`
}

func (SubmitCardResponse) String

func (s SubmitCardResponse) String() string

Directories

Path Synopsis
bpc

Jump to

Keyboard shortcuts

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