Skip to content

Commit

Permalink
Update ReAuthorization call parameters (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikBisht committed Sep 28, 2021
1 parent 6fb262a commit 64bfbc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion authorization.go
Expand Up @@ -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{}

Expand Down

0 comments on commit 64bfbc9

Please sign in to comment.