mirror of
https://github.com/plutov/paypal.git
synced 2025-01-23 02:11:02 +01:00
Update ReAuthorization call parameters (#226)
This commit is contained in:
parent
6fb262a2b0
commit
64bfbc9b80
|
@ -71,7 +71,7 @@ func (c *Client) VoidAuthorization(ctx context.Context, authID string) (*Authori
|
||||||
// PayPal recommends reauthorizing payment after ~3 days
|
// PayPal recommends reauthorizing payment after ~3 days
|
||||||
// Endpoint: POST /v2/payments/authorizations/ID/reauthorize
|
// Endpoint: POST /v2/payments/authorizations/ID/reauthorize
|
||||||
func (c *Client) ReauthorizeAuthorization(ctx context.Context, authID string, a *Amount) (*Authorization, error) {
|
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)
|
req, err := http.NewRequestWithContext(ctx, "POST", fmt.Sprintf("%s%s", c.APIBase, "/v2/payments/authorizations/"+authID+"/reauthorize"), buf)
|
||||||
auth := &Authorization{}
|
auth := &Authorization{}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user