1 <?php
2 /**
3 * Pagarme Void Request
4 */
5 namespace Omnipay\Pagarme\Message;
6
7 /**
8 * Pagarme Void Request
9 *
10 * Pagarme does not support voiding, per se, but
11 * we treat it as a full refund.
12 *
13 * See RefundRequest for additional information
14 *
15 * Example -- note this example assumes that the purchase has been successful
16 * and that the transaction ID returned from the purchase is held in $sale_id.
17 * See PurchaseRequest for the first part of this example transaction:
18 *
19 * <code>
20 * // Do a void transaction on the gateway
21 * $transaction = $gateway->void(array(
22 * 'transactionReference' => $sale_id,
23 * ));
24 * $response = $transaction->send();
25 * if ($response->isSuccessful()) {
26 * echo "Void transaction was successful!\n";
27 * $void_id = $response->getTransactionReference();
28 * echo "Transaction reference = " . $void_id . "\n";
29 * }
30 * </code>
31 *
32 * @see RefundRequest
33 * @see Omnipay\Pagarme\Gateway
34 * @link https://docs.pagar.me/api/?shell#estorno-de-transao
35 */
36 class VoidRequest extends RefundRequest
37 {
38 public function getData()
39 {
40 $this->validate('transactionReference');
41 $data = array();
42
43 return $data;
44 }
45 }
46
47