1 <?php
2
3 namespace Omnipay\Pagarme\Message;
4
5 /**
6 * Pagarme Capture Request
7 *
8 * Use this request to capture and process a previously created authorization.
9 *
10 * Example -- note this example assumes that the authorization has been successful
11 * and that the authorization ID returned from the authorization is held in $auth_id.
12 * See AuthorizeRequest for the first part of this example transaction:
13 *
14 * <code>
15 * // Once the transaction has been authorized, we can capture it for final payment.
16 * $transaction = $gateway->capture();
17 * $transaction->setTransactionReference($auth_id);
18 * $response = $transaction->send();
19 * </code>
20 *
21 * @see Omnipay\Pagarme\Message\AuthorizeRequest
22 */
23 class CaptureRequest extends AbstractRequest
24 {
25 public function getData()
26 {
27 $this->validate('transactionReference');
28 $data = array();
29
30 return $data;
31 }
32
33 public function getEndpoint()
34 {
35 return $this->endpoint.'transactions/'.$this->getTransactionReference().'/capture';
36 }
37 }
38