mirror of
https://github.com/plutov/paypal.git
synced 2025-01-23 02:11:02 +01:00
Fix authorize order to return the correct response (#243)
This commit is contained in:
parent
efc9bbdee0
commit
defe3e09a4
4
order.go
4
order.go
|
@ -92,8 +92,8 @@ func (c *Client) UpdateOrder(ctx context.Context, orderID string, op string, pat
|
||||||
|
|
||||||
// AuthorizeOrder - https://developer.paypal.com/docs/api/orders/v2/#orders_authorize
|
// AuthorizeOrder - https://developer.paypal.com/docs/api/orders/v2/#orders_authorize
|
||||||
// Endpoint: POST /v2/checkout/orders/ID/authorize
|
// Endpoint: POST /v2/checkout/orders/ID/authorize
|
||||||
func (c *Client) AuthorizeOrder(ctx context.Context, orderID string, authorizeOrderRequest AuthorizeOrderRequest) (*Authorization, error) {
|
func (c *Client) AuthorizeOrder(ctx context.Context, orderID string, authorizeOrderRequest AuthorizeOrderRequest) (*AuthorizeOrderResponse, error) {
|
||||||
auth := &Authorization{}
|
auth := &AuthorizeOrderResponse{}
|
||||||
|
|
||||||
req, err := c.NewRequest(ctx, "POST", fmt.Sprintf("%s%s", c.APIBase, "/v2/checkout/orders/"+orderID+"/authorize"), authorizeOrderRequest)
|
req, err := c.NewRequest(ctx, "POST", fmt.Sprintf("%s%s", c.APIBase, "/v2/checkout/orders/"+orderID+"/authorize"), authorizeOrderRequest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user