Skip to content

Commit 64bfbc9

Browse files
authored
Update ReAuthorization call parameters (#226)
1 parent 6fb262a commit 64bfbc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

authorization.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func (c *Client) VoidAuthorization(ctx context.Context, authID string) (*Authori
7171
// PayPal recommends reauthorizing payment after ~3 days
7272
// Endpoint: POST /v2/payments/authorizations/ID/reauthorize
7373
func (c *Client) ReauthorizeAuthorization(ctx context.Context, authID string, a *Amount) (*Authorization, error) {
74-
buf := bytes.NewBuffer([]byte(`{"amount":{"currency_code":"` + a.Currency + `","total":"` + a.Total + `"}}`))
74+
buf := bytes.NewBuffer([]byte(`{"amount":{"currency_code":"` + a.Currency + `","value":"` + a.Total + `"}}`))
7575
req, err := http.NewRequestWithContext(ctx, "POST", fmt.Sprintf("%s%s", c.APIBase, "/v2/payments/authorizations/"+authID+"/reauthorize"), buf)
7676
auth := &Authorization{}
7777

0 commit comments

Comments
 (0)