From 64bfbc9b802245f19cf175377be750de80198889 Mon Sep 17 00:00:00 2001 From: Nik Bisht Date: Mon, 27 Sep 2021 20:34:39 -0700 Subject: [PATCH] Update ReAuthorization call parameters (#226) --- authorization.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authorization.go b/authorization.go index f30b364..22ae322 100644 --- a/authorization.go +++ b/authorization.go @@ -71,7 +71,7 @@ func (c *Client) VoidAuthorization(ctx context.Context, authID string) (*Authori // PayPal recommends reauthorizing 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_code":"` + a.Currency + `","total":"` + a.Total + `"}}`)) + buf := bytes.NewBuffer([]byte(`{"amount":{"currency_code":"` + a.Currency + `","value":"` + a.Total + `"}}`)) req, err := http.NewRequestWithContext(ctx, "POST", fmt.Sprintf("%s%s", c.APIBase, "/v2/payments/authorizations/"+authID+"/reauthorize"), buf) auth := &Authorization{}