6 use Omnipay\Tests\TestCase;
8 class RefundRequestTest
extends TestCase
15 public function setUp()
17 $client = $this->getHttpClient();
19 $request = $this->getHttpRequest();
29 $this->request->setAmount($amount);
30 $this->request->setCurrency(
'USD');
31 $this->request->setTransactionReference(
'ABC-123');
32 $this->request->setUsername(
'testuser');
33 $this->request->setPassword(
'testpass');
34 $this->request->setSignature(
'SIG');
35 $this->request->setSubject(
'SUB');
38 $expected[
'REFUNDTYPE'] = $type;
39 $expected[
'METHOD'] =
'RefundTransaction';
40 $expected[
'TRANSACTIONID'] =
'ABC-123';
41 $expected[
'USER'] =
'testuser';
42 $expected[
'PWD'] =
'testpass';
43 $expected[
'SIGNATURE'] =
'SIG';
44 $expected[
'SUBJECT'] =
'SUB';
48 $expected[
'AMT'] = $amount;
49 $expected[
'CURRENCYCODE'] =
'USD';
52 $this->assertEquals($expected, $this->request->getData());
58 'Partial' => array(
'Partial',
'1.23'),
60 'Full' => array(
'Full',
'0.00'),