Skip to content

Commit

Permalink
Add doAuthorization and doVoid operations (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
JavierMartinz authored and srmklive committed Sep 16, 2016
1 parent 85939dd commit c447e8f
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/Services/ExpressCheckout.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,41 @@ public function doCapture($authorization_id, $amount, $complete = 'Complete', $d
return $response;
}


/**
* Function to perform DoAuthorization PayPal API operation.
*
* @param string $authorization_id Transaction ID
* @param float $amount Amount to capture
* @param array $data Optional request fields
* @return array
*/
public function doAuthorization($authorization_id, $amount, $data = [])
{
$response = $this->doPayPalRequest('DoAuthorization', array_merge($data, [
'AUTHORIZATIONID' => $authorization_id,
'AMT' => $amount
]));

return $response;
}

/**
* Function to perform DoVoid PayPal API operation.
*
* @param string $authorization_id Transaction ID
* @param array $data Optional request fields
* @return array
*/
public function doVoid($authorization_id, $data = [])
{
$response = $this->doPayPalRequest('DoVoid', array_merge($data, [
'AUTHORIZATIONID' => $authorization_id
]));

return $response;
}

/**
* Function to perform CreateBillingAgreement PayPal API operation.
*
Expand Down

0 comments on commit c447e8f

Please sign in to comment.