alipay

package module
v0.0.0-...-5403f24 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

AliPay

Build Status | codecov | Go Report Card | GoDoc

A simple client for stripe api to receive money from alipay.

With support:

Customer
  • Create
Payment
  • Create
  • Confirm

Setup

Copy default configs

make setup

Dependency Management

Dep

Project dependencies are managed using Dep. Read more about Dep.

  • Install dependencies: dep ensure
  • Update dependencies: dep ensure -update
Go
go get github.com/joaosoft/alipay
Code
import (
	"github.com/joaosoft/alipay"
)

func main() {
    ap, err := alipay.NewAliPay()
    if err != nil {
        panic(err)
    }
    
    if err = ap.Start(); err != nil {
        panic(err)
    }
}

Known issues

Follow me at

Facebook: https://www.facebook.com/joaosoft

LinkedIn: https://www.linkedin.com/in/jo%C3%A3o-ribeiro-b2775438/

If you have something to add, please let me know joaosoft@gmail.com

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliPay

type AliPay struct {
	// contains filtered or unexported fields
}

AliPay ...

func NewAliPay

func NewAliPay(options ...AliPayOption) (*AliPay, error)

NewAliPay ...

func (*AliPay) Reconfigure

func (ap *AliPay) Reconfigure(options ...AliPayOption)

Reconfigure ...

func (*AliPay) Start

func (ap *AliPay) Start() error

type AliPayConfig

type AliPayConfig struct {
	Host         string `json:"host"`
	ReturnUrl    string `json:"return_url"`
	PublicApiKey string `json:"public_api_key"`
	SecretApiKey string `json:"secret_api_key"`
	Log          struct {
		Level string `json:"level"`
	} `json:"log"`
}

AliPayConfig ...

type AliPayOption

type AliPayOption func(auth *AliPay)

AliPayOption ...

func WithConfiguration

func WithConfiguration(config *AliPayConfig) AliPayOption

WithConfiguration ...

func WithLogLevel

func WithLogLevel(level logger.Level) AliPayOption

WithLogLevel ...

func WithLogger

func WithLogger(logger logger.ILogger) AliPayOption

WithLogger ...

type AppConfig

type AppConfig struct {
	AliPay *AliPayConfig `json:"alipay"`
}

AppConfig ...

func NewConfig

func NewConfig() (*AppConfig, manager.IConfig, error)

NewConfig ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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