@@ 66-75 (lines=10) @@ | ||
63 | $this->assertEquals('FULL', $refund->getType()); |
|
64 | } |
|
65 | ||
66 | public function testRefundPaymentCreditCardPartial() |
|
67 | { |
|
68 | $payment = $this->paymentCreditCard(); |
|
69 | ||
70 | $this->mockHttpSession($this->body_payment_refund_partial_cc); |
|
71 | $refund = $payment->refunds()->creditCardPartial(5000); |
|
72 | ||
73 | $this->assertNotEmpty($refund->getId()); |
|
74 | $this->assertEquals('PARTIAL', $refund->getType()); |
|
75 | } |
|
76 | ||
77 | public function testRefundPaymentBankAccountFull() |
|
78 | { |
|
@@ 101-110 (lines=10) @@ | ||
98 | $this->assertEquals('PARTIAL', $refund->getType()); |
|
99 | } |
|
100 | ||
101 | public function testRefundCCFullWithResourceId() |
|
102 | { |
|
103 | $payment = $this->paymentCreditCard(); |
|
104 | ||
105 | $this->mockHttpSession($this->body_payment_refund_full_cc); |
|
106 | $refund = $this->moip->refunds()->creditCard($payment->getId()); |
|
107 | ||
108 | $this->assertNotEmpty($refund->getId()); |
|
109 | $this->assertEquals('FULL', $refund->getType()); |
|
110 | } |
|
111 | ||
112 | public function testRefundCCPartialWithResourceId() |
|
113 | { |
|
@@ 112-121 (lines=10) @@ | ||
109 | $this->assertEquals('FULL', $refund->getType()); |
|
110 | } |
|
111 | ||
112 | public function testRefundCCPartialWithResourceId() |
|
113 | { |
|
114 | $payment = $this->paymentCreditCard(); |
|
115 | ||
116 | $this->mockHttpSession($this->body_payment_refund_partial_cc); |
|
117 | $refund = $this->moip->refunds()->creditCard($payment->getId(), 5000); |
|
118 | ||
119 | $this->assertNotEmpty($refund->getId()); |
|
120 | $this->assertEquals('PARTIAL', $refund->getType()); |
|
121 | } |
|
122 | ||
123 | public function testRefundBankAccountFullWithResourceId() |
|
124 | { |
|
@@ 123-132 (lines=10) @@ | ||
120 | $this->assertEquals('PARTIAL', $refund->getType()); |
|
121 | } |
|
122 | ||
123 | public function testRefundBankAccountFullWithResourceId() |
|
124 | { |
|
125 | $payment = $this->paymentBoleto(); |
|
126 | ||
127 | $this->mockHttpSession($this->body_payment_refund_full_bankaccount); |
|
128 | $refund = $this->moip->refunds()->bankAccount($payment->getId(), $this->bankAccount()); |
|
129 | ||
130 | $this->assertNotEmpty($refund->getId()); |
|
131 | $this->assertEquals('FULL', $refund->getType()); |
|
132 | } |
|
133 | ||
134 | public function testRefundBankAccountPartialWithResourceId() |
|
135 | { |
|
@@ 134-143 (lines=10) @@ | ||
131 | $this->assertEquals('FULL', $refund->getType()); |
|
132 | } |
|
133 | ||
134 | public function testRefundBankAccountPartialWithResourceId() |
|
135 | { |
|
136 | $payment = $this->paymentBoleto(); |
|
137 | ||
138 | $this->mockHttpSession($this->body_payment_refund_partial_bankaccount); |
|
139 | $refund = $this->moip->refunds()->bankAccount($payment->getId(), $this->bankAccount(), 5000); |
|
140 | ||
141 | $this->assertNotEmpty($refund->getId()); |
|
142 | $this->assertEquals('PARTIAL', $refund->getType()); |
|
143 | } |
|
144 | ||
145 | public function testRefundOrderCCFullWithResourceId() |
|
146 | { |
|
@@ 145-154 (lines=10) @@ | ||
142 | $this->assertEquals('PARTIAL', $refund->getType()); |
|
143 | } |
|
144 | ||
145 | public function testRefundOrderCCFullWithResourceId() |
|
146 | { |
|
147 | $order = $this->paymentCreditCard(false); |
|
148 | ||
149 | $this->mockHttpSession($this->body_order_refund_full_cc); |
|
150 | $refund = $this->moip->refunds()->creditCard($order->getId()); |
|
151 | ||
152 | $this->assertNotEmpty($refund->getId()); |
|
153 | $this->assertEquals('FULL', $refund->getType()); |
|
154 | } |
|
155 | ||
156 | public function testRefundOrderCCPartialWithResourceId() |
|
157 | { |
|
@@ 156-165 (lines=10) @@ | ||
153 | $this->assertEquals('FULL', $refund->getType()); |
|
154 | } |
|
155 | ||
156 | public function testRefundOrderCCPartialWithResourceId() |
|
157 | { |
|
158 | $order = $this->paymentCreditCard(false); |
|
159 | ||
160 | $this->mockHttpSession($this->body_order_refund_partial_cc); |
|
161 | $refund = $this->moip->refunds()->creditCard($order->getId(), 5000); |
|
162 | ||
163 | $this->assertNotEmpty($refund->getId()); |
|
164 | $this->assertEquals('PARTIAL', $refund->getType()); |
|
165 | } |
|
166 | ||
167 | public function testRefundOrderBankAccountFullWithResourceId() |
|
168 | { |
|
@@ 167-176 (lines=10) @@ | ||
164 | $this->assertEquals('PARTIAL', $refund->getType()); |
|
165 | } |
|
166 | ||
167 | public function testRefundOrderBankAccountFullWithResourceId() |
|
168 | { |
|
169 | $order = $this->paymentBoleto(false); |
|
170 | ||
171 | $this->mockHttpSession($this->body_order_refund_full_bankaccount); |
|
172 | $refund = $this->moip->refunds()->bankAccount($order->getId(), $this->bankAccount()); |
|
173 | ||
174 | $this->assertNotEmpty($refund->getId()); |
|
175 | $this->assertEquals('FULL', $refund->getType()); |
|
176 | } |
|
177 | ||
178 | public function testRefundOrderBankAccountPartialWithResourceId() |
|
179 | { |
|
@@ 178-187 (lines=10) @@ | ||
175 | $this->assertEquals('FULL', $refund->getType()); |
|
176 | } |
|
177 | ||
178 | public function testRefundOrderBankAccountPartialWithResourceId() |
|
179 | { |
|
180 | $order = $this->paymentBoleto(false); |
|
181 | ||
182 | $this->mockHttpSession($this->body_order_refund_partial_bankaccount); |
|
183 | $refund = $this->moip->refunds()->bankAccount($order->getId(), $this->bankAccount(), 5000); |
|
184 | ||
185 | $this->assertNotEmpty($refund->getId()); |
|
186 | $this->assertEquals('PARTIAL', $refund->getType()); |
|
187 | } |
|
188 | ||
189 | private function bankAccount() |
|
190 | { |