paypay

package
v0.0.0-...-b2f2091 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIEndpointProduction = "https://api.paypay.ne.jp"
	APIEndpointSandbox    = "https://stg-api.sandbox.paypay.ne.jp"
)

API endpoint base constants

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

Bool bool to pointer function

func Int

func Int(v int) *int

Int int to pointer function

func Int64

func Int64(v int64) *int64

Int64 int64 to pointer function

func MustParseInt64

func MustParseInt64(v string) int64

MustParseInt64 string to int64 without error function

func ParseInt64

func ParseInt64(v string) (int64, error)

ParseInt64 string to int64 function

func String

func String(v string) *string

String string to pointer function

Types

type Client

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

Client type

func New

func New(apiKey, apiSecret, assumeMerchant string, options ...ClientOption) (*Client, error)

New returns a new pay client instance.

func (*Client) Do

func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*http.Response, error)

Do method

func (*Client) NewRequest

func (c *Client) NewRequest(method, path string, body interface{}) (*http.Request, error)

NewRequest method

func (*Client) ParseResponseToken

func (c *Client) ParseResponseToken(tokenString string) (*ResponseToken, error)

type ClientOption

type ClientOption func(*Client) error

ClientOption type

func WithEndpoint

func WithEndpoint(endpoint string) ClientOption

WithEndpoint function

func WithHTTPClient

func WithHTTPClient(c *http.Client) ClientOption

WithHTTPClient function

func WithSandbox

func WithSandbox() ClientOption

WithSandbox function

type CreateAccountLinkQRCodeRequest

type CreateAccountLinkQRCodeRequest struct {
	Scopes       []string `json:"scopes"`
	Nonce        string   `json:"nonce"`
	RedirectType string   `json:"redirectType,omitempty"`
	RedirectURL  string   `json:"redirectUrl"`
	ReferenceID  string   `json:"referenceId"`
	PhoneNumber  string   `json:"phoneNumber,omitempty"`
	DeviceID     string   `json:"deviceId,omitempty"`
	UserAgent    string   `json:"userAgent,omitempty"`
}

type CreateAccountLinkQRCodeResponse

type CreateAccountLinkQRCodeResponse struct {
	ResultInfo struct {
		Code    string `json:"code"`
		Message string `json:"message"`
		CodeID  string `json:"codeId"`
	} `json:"resultInfo"`
	Data struct {
		LinkQRCodeURL string `json:"linkQRCodeURL"`
	} `json:"data"`
}

type ResponseToken

type ResponseToken struct {
	jwt.StandardClaims
	Result              string `json:"result"`
	ProfileIdentifier   string `json:"profileIdentifier"`
	Nonce               string `json:"nonce"`
	UserAuthorizationID string `json:"userAuthorizationId"`
	ReferenceID         string `json:"referenceId"`
}

Jump to

Keyboard shortcuts

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