Documentation ¶
Index ¶
- Constants
- type CacheRedis
- type Centrifugo
- type Config
- func (cfg *Config) GetAdminCompanyUrl(merchantId string) string
- func (cfg *Config) GetAdminOnboardingRequestsUrl() string
- func (cfg *Config) GetCentrifugoOrderChannel(orderUuid string) string
- func (cfg *Config) GetCustomerTokenExpire() time.Duration
- func (cfg *Config) GetCustomerTokenLength() int
- func (cfg *Config) GetEmailConfirmTokenLifetime() time.Duration
- func (cfg *Config) GetEmailConfirmUrl() string
- func (cfg *Config) GetMerchantCompanyUrl() string
- func (cfg *Config) GetPayoutsUrl() string
- func (cfg *Config) GetReceiptPurchaseUrl(transactionId, receiptId string) string
- func (cfg *Config) GetReceiptRefundUrl(transactionId, receiptId string) string
- func (cfg *Config) GetRedirectUrlFail(params map[string]string) string
- func (cfg *Config) GetRedirectUrlSuccess(params map[string]string) string
- func (cfg *Config) GetRoyaltyReportAdminUrl(id string) string
- func (cfg *Config) GetRoyaltyReportUrl(id string) string
- func (cfg *Config) GetRoyaltyReportsUrl() string
- func (cfg *Config) GetSystemPayoutUrl(id string) string
- func (cfg *Config) GetUserConfirmEmailUrl(params map[string]string) string
- func (cfg *Config) GetUserInviteUrl(token string) string
- type CustomerTokenConfig
- type EmailTemplates
- type PaymentSystemConfig
Constants ¶
View Source
const (
EmailTemplateConfirmAccount = "confirm_account"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheRedis ¶
type CacheRedis struct { Address []string `envconfig:"CACHE_REDIS_ADDRESS" required:"true"` Password string `envconfig:"CACHE_REDIS_PASSWORD" required:"false"` PoolSize int `envconfig:"CACHE_REDIS_POOL_SIZE" default:"1"` MaxRetries int `envconfig:"CACHE_REDIS_MAX_RETRIES" default:"10"` MaxRedirects int `envconfig:"CACHE_REDIS_MAX_REDIRECTS" default:"8"` Version string `envconfig:"CACHE_REDIS_VERSION" default:"1.0.6"` }
CacheRedis defines the parameters for connecting to the radish server for caching objects.
type Centrifugo ¶ added in v1.1.0
type Config ¶
type Config struct { MongoDsn string `envconfig:"MONGO_DSN" required:"true"` MongoDialTimeout string `envconfig:"MONGO_DIAL_TIMEOUT" required:"false" default:"10"` Environment string `envconfig:"ENVIRONMENT" default:"dev"` RedisHost string `envconfig:"REDIS_HOST" default:"127.0.0.1:6379"` RedisPassword string `envconfig:"REDIS_PASSWORD" default:""` BrokerAddress string `envconfig:"BROKER_ADDRESS" default:"amqp://127.0.0.1:5672"` CentrifugoUserChannel string `envconfig:"CENTRIFUGO_USER_CHANNEL" default:"paysuper:user#%s"` EmailConfirmTokenLifetime int64 `envconfig:"EMAIL_CONFIRM_TOKEN_LIFETIME" default:"86400"` MicroRegistry string `envconfig:"MICRO_REGISTRY" required:"false"` RoyaltyReportPeriod int64 `envconfig:"ROYALTY_REPORT_PERIOD" default:"604800"` RoyaltyReportAcceptTimeout int64 `envconfig:"ROYALTY_REPORT_ACCEPT_TIMEZONE" default:"432000"` CentrifugoMerchantChannel string `envconfig:"CENTRIFUGO_MERCHANT_CHANNEL" default:"paysuper:merchant#%s"` CentrifugoFinancierChannel string `envconfig:"CENTRIFUGO_FINANCIER_CHANNEL" default:"paysuper:financier"` CentrifugoAdminChannel string `envconfig:"CENTRIFUGO_ADMIN_CHANNEL" default:"paysuper:admin"` EmailNotificationFinancierRecipient string `envconfig:"EMAIL_NOTIFICATION_FINANCIER_RECIPIENT" required:"true"` EmailOnboardingAdminRecipient string `envconfig:"EMAIL_ONBOARDING_ADMIN_RECIPIENT" required:"true"` OrderViewUpdateBatchSize int `envconfig:"ORDER_VIEW_UPDATE_BATCH_SIZE" default:"200"` HelloSignDefaultTemplate string `envconfig:"HELLO_SIGN_DEFAULT_TEMPLATE" required:"true"` HelloSignAgreementClientId string `envconfig:"HELLO_SIGN_AGREEMENT_CLIENT_ID" required:"true"` KeyDaemonRestartInterval int64 `envconfig:"KEY_DAEMON_RESTART_INTERVAL" default:"60"` PaylinkMinProducts int `envconfig:"PAYLINK_MIN_PRODUCTS" required:"false" default:"1"` PaylinkMaxProducts int `envconfig:"PAYLINK_MAX_PRODUCTS" required:"false" default:"8"` CentrifugoOrderChannel string `envconfig:"CENTRIFUGO_ORDER_CHANNEL" default:"paysuper:order#%s"` UserInviteTokenSecret string `envconfig:"USER_INVITE_TOKEN_SECRET" required:"true"` UserInviteTokenTimeout int64 `envconfig:"USER_INVITE_TOKEN_TIMEOUT" default:"48"` *PaymentSystemConfig *CustomerTokenConfig *CacheRedis *EmailTemplates CentrifugoPaymentForm *Centrifugo `envconfig:"CENTRIFUGO_PAYMENT_FORM"` CentrifugoDashboard *Centrifugo `envconfig:"CENTRIFUGO_DASHBOARD"` EmailConfirmUrlParsed *url.URL RedirectUrlSuccessParsed *url.URL RedirectUrlFailParsed *url.URL MigrationsLockTimeout int64 `envconfig:"MIGRATIONS_LOCK_TIMEOUT" default:"60"` DashboardUrl string `envconfig:"DASHBOARD_URL" default:"https://paysupermgmt.tst.protocol.one"` CheckoutUrl string `envconfig:"CHECKOUT_URL" default:"https://checkout.tst.pay.super.com"` MetricsPort string `envconfig:"METRICS_PORT" default:"8086"` MetricsReadTimeout int `envconfig:"METRICS_READ_TIMEOUT" default:"60"` MetricsReadHeaderTimeout int `envconfig:"METRICS_READ_HEADER_TIMEOUT" default:"60"` }
func (*Config) GetAdminCompanyUrl ¶
func (*Config) GetAdminOnboardingRequestsUrl ¶
func (*Config) GetCentrifugoOrderChannel ¶
func (*Config) GetCustomerTokenExpire ¶
func (*Config) GetCustomerTokenLength ¶
func (*Config) GetEmailConfirmTokenLifetime ¶
func (*Config) GetEmailConfirmUrl ¶
func (*Config) GetMerchantCompanyUrl ¶
func (*Config) GetPayoutsUrl ¶
func (*Config) GetReceiptPurchaseUrl ¶
func (*Config) GetReceiptRefundUrl ¶
func (*Config) GetRedirectUrlFail ¶
func (*Config) GetRedirectUrlSuccess ¶
func (*Config) GetRoyaltyReportAdminUrl ¶ added in v1.4.0
func (*Config) GetRoyaltyReportUrl ¶ added in v1.3.0
func (*Config) GetRoyaltyReportsUrl ¶
func (*Config) GetSystemPayoutUrl ¶ added in v1.4.0
func (*Config) GetUserConfirmEmailUrl ¶
func (*Config) GetUserInviteUrl ¶
type CustomerTokenConfig ¶
type CustomerTokenConfig struct { Length int `envconfig:"CUSTOMER_TOKEN_LENGTH" default:"32"` LifeTime int64 `envconfig:"CUSTOMER_TOKEN_LIFETIME" default:"2592000"` CookiePublicKeyBase64 string `envconfig:"CUSTOMER_COOKIE_PUBLIC_KEY" required:"true"` CookiePrivateKeyBase64 string `envconfig:"CUSTOMER_COOKIE_PRIVATE_KEY" required:"true"` CookiePublicKey *rsa.PublicKey CookiePrivateKey *rsa.PrivateKey }
type EmailTemplates ¶
type EmailTemplates struct { ConfirmAccountEn string `envconfig:"EMAIL_CONFIRM_TEMPLATE" default:"p1_verify_letter"` ConfirmAccountRu string `envconfig:"EMAIL_CONFIRM_TEMPLATE_RU" default:"p1_verify_letter_ru"` NewRoyaltyReport string `envconfig:"EMAIL_NEW_ROYALTY_REPORT_TEMPLATE" default:"p1_new_royalty_report"` NewPayout string `envconfig:"EMAIL_NEW_PAYOUT_TEMPLATE" default:"p1_new_payout"` UpdateRoyaltyReport string `envconfig:"EMAIL_UPDATE_ROYALTY_REPORT_TEMPLATE" default:"p1_update_royalty_report"` VatReportChanged string `envconfig:"EMAIL_VAT_REPORT_TEMPLATE" default:"p1_vat_report"` ActivationGameKey string `envconfig:"EMAIL_ACTIVATION_CODE_TEMPLATE" default:"p1_verify_letter-1"` SuccessTransaction string `envconfig:"EMAIL_SUCCESS_TRANSACTION_TEMPLATE" default:"p1-success-transaction-letter-v2"` RefundTransaction string `envconfig:"EMAIL_REFUND_TRANSACTION_TEMPLATE" default:"p1-refund-transaction-letter-v2"` OnboardingVerificationMerchant string `envconfig:"EMAIL_MERCHANT_NEW_ONBOARDING_REQUEST_TEMPLATE" default:"p1_email_merchant_new_onboarding_request_template"` OnboardingVerificationAdmin string `envconfig:"EMAIL_ADMIN_NEW_ONBOARDING_REQUEST_TEMPLATE" default:"p1_email_admin_new_onboarding_request_template"` OnboardingCompleted string `` /* 128-byte string literal not displayed */ UserInvite string `envconfig:"EMAIL_INVITE_TEMPLATE" default:"code-your-own"` MerchantAgreementSigned string `envconfig:"EMAIL_MERCHANT_AGREEMENT_SIGNED" default:"p1_agreement_fully_signed"` RoyaltyReportFinancier string `envconfig:"EMAIL_ROYALTY_REPORT_FINANCIER" default:"p1_royalty_report_financier"` PayoutInvoiceFinancier string `envconfig:"EMAIL_PAYOUT_INVOICE_FINANCIER" default:"p1_payout_invoice_financier"` MerchantDocumentUploaded string `envconfig:"EMAIL_MERCHANT_DOCUMENT_UPLOAD_TEMPLATE" default:"p1_merchant_upload_document"` AdminDocumentUploaded string `envconfig:"EMAIL_ADMIN_DOCUMENT_UPLOAD_TEMPLATE" default:"p1_admin_upload_document"` MinimalKeyProductNotify string `envconfig:"EMAIL_MINIMAL_KEY_PRODUCT_NOTIFY" default:"p1_minimal_key_product"` EmptyKeyProductNotify string `envconfig:"EMAIL_EMPTY_KEY_PRODUCT_NOTIFY" default:"p1_empty_key_product"` MultiLanguage map[string]map[string]string }
EmailTemplates defines of the Postmark template names for sending letters.
func (*EmailTemplates) GetTemplate ¶ added in v1.9.0
func (t *EmailTemplates) GetTemplate(name, locale string) (string, error)
type PaymentSystemConfig ¶
type PaymentSystemConfig struct { CardPayApiUrl string `envconfig:"CARD_PAY_API_URL" required:"true"` CardPayApiSandboxUrl string `envconfig:"CARD_PAY_API_SANDBOX_URL" required:"true"` RedirectUrlSuccess string `envconfig:"REDIRECT_URL_SUCCESS" default:"https://checkout.pay.super.com/pay/order/?result=success"` RedirectUrlFail string `envconfig:"REDIRECT_URL_FAIL" default:"https://checkout.pay.super.com/pay/order/?result=fail"` }
Click to show internal directories.
Click to hide internal directories.