From defe3e09a4289120e022dab4309262b04efa9293 Mon Sep 17 00:00:00 2001 From: Binit kumar singh Date: Fri, 22 Jul 2022 14:18:14 +0530 Subject: [PATCH] Fix authorize order to return the correct response (#243) --- order.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/order.go b/order.go index 3aee58f..4d4241a 100644 --- a/order.go +++ b/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 // Endpoint: POST /v2/checkout/orders/ID/authorize -func (c *Client) AuthorizeOrder(ctx context.Context, orderID string, authorizeOrderRequest AuthorizeOrderRequest) (*Authorization, error) { - auth := &Authorization{} +func (c *Client) AuthorizeOrder(ctx context.Context, orderID string, authorizeOrderRequest AuthorizeOrderRequest) (*AuthorizeOrderResponse, error) { + auth := &AuthorizeOrderResponse{} req, err := c.NewRequest(ctx, "POST", fmt.Sprintf("%s%s", c.APIBase, "/v2/checkout/orders/"+orderID+"/authorize"), authorizeOrderRequest) if err != nil {