From 4ab23e5f7827f6f1e625d568dd396f5907d68023 Mon Sep 17 00:00:00 2001 From: Yuusuke Miyatake <62065088+Yuusuke8686@users.noreply.github.com> Date: Wed, 25 Aug 2021 00:05:57 +0900 Subject: [PATCH] #219: fix parameter --- authorization.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authorization.go b/authorization.go index b2481d2..be547ec 100644 --- a/authorization.go +++ b/authorization.go @@ -71,7 +71,7 @@ func (c *Client) VoidAuthorization(ctx context.Context, authID string) (*Authori // PayPal recommends to reauthorize payment after ~3 days // Endpoint: POST /v2/payments/authorizations/ID/reauthorize func (c *Client) ReauthorizeAuthorization(ctx context.Context, authID string, a *Amount) (*Authorization, error) { - buf := bytes.NewBuffer([]byte(`{"amount":{"currency":"` + a.Currency + `","total":"` + a.Total + `"}}`)) + buf := bytes.NewBuffer([]byte(`{"amount":{"currency_code":"` + a.Currency + `","total":"` + a.Total + `"}}`)) req, err := http.NewRequestWithContext(ctx, "POST", fmt.Sprintf("%s%s", c.APIBase, "/v2/payments/authorizations/"+authID+"/reauthorize"), buf) auth := &Authorization{}