From c6e71cb003034d1bea86375e266cbd2488410487 Mon Sep 17 00:00:00 2001 From: Raza Mehdi Date: Thu, 12 Oct 2017 17:02:10 +0500 Subject: [PATCH] Implemented DoReauthorization API call --- src/Services/ExpressCheckout.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/Services/ExpressCheckout.php b/src/Services/ExpressCheckout.php index 27c01c9e..10276dd1 100644 --- a/src/Services/ExpressCheckout.php +++ b/src/Services/ExpressCheckout.php @@ -217,6 +217,27 @@ public function doCapture($authorization_id, $amount, $complete = 'Complete', $d return $this->doPayPalRequest('DoCapture'); } + /** + * Perform a DoReauthorization API call on PayPal to reauthorize an existing authorization transaction. + * + * @param string $authorization_id + * @param float $amount + * @param array $data + * + * @return array + */ + public function doReAuthorization($authorization_id, $amount, $data = []) + { + $this->setRequestData( + array_merge($data, [ + 'AUTHORIZATIONID' => $authorization_id, + 'AMOUNT' => $amount, + ]) + ); + + return $this->doPayPalRequest('DoReauthorization'); + } + /** * Perform a DoVoid API call on PayPal. *