1 <?php
2 namespace OpenDNS\MES\Trident;
3
4 /**
5 * Refund a previously captured transaction.
6 */
7 class Refund extends Request
8 {
9 /** @var string Transaction type to send in the request */
10 protected $transactionType = 'U';
11
12 /**
13 * Sets the amount to refund.
14 *
15 * This is only required if you want to refund less than the full amount. If
16 * omitted, the whole transaction amount will be refunded.
17 *
18 * @param float|string $amount
19 * @return self The current class instance for chaining
20 */
21 public function setAmount($amount)
22 {
23 return $this->setField('transaction_amount', $amount);
24 }
25
26 /**
27 * Set the transaction ID of a previous capture or sale transaction.
28 *
29 * @param string $transactionID
30 * @return self The current class instance for chaining
31 */
32 public function setTransactionId($transactionId)
33 {
34 return $this->setField('transaction_id', $transactionId);
35 }
36 }
37