for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Omnipay\PaypalRest\Message;
/**
* @author Ivan Kerin <[email protected]>
* @copyright 2014, Clippings Ltd.
* @license http://spdx.org/licenses/BSD-3-Clause
*/
class PaymentCompleteRequest extends AbstractPaypalRequest
{
* @return string
public function getEndpoint()
$this->validate('transactionReference');
return "/payments/payment/{$this->getTransactionReference()}/execute";
}
public function getHttpMethod()
return 'POST';
public function getPayerId()
return $this->getParameter('payerId');
* @param string $value
public function setPayerId($value)
return $this->setParameter('payerId', $value);
* @param mixed $data
* @return PaymentResponse
public function sendData($data)
$httpResponse = $this->sendHttpRequest($data);
return $this->response = new PaymentResponse(
$this,
$httpResponse->json(),
$httpResponse->getStatusCode()
);
* @return array
public function getData()
$this->validate('payerId');
return array(
'payer_id' => $this->getPayerId(),