Skip to content

Commit

Permalink
Merge pull request #21 from andrewtweber/master
Browse files Browse the repository at this point in the history
Bug fix for refund_application_fee
  • Loading branch information
greydnls committed Apr 14, 2015
2 parents fa2ad61 + f546c25 commit 906377e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Message/RefundRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function getData()
$data['amount'] = $this->getAmountInteger();

if ($this->getRefundApplicationFee()) {
$data['refund_application_fee'] = true;
$data['refund_application_fee'] = "true";
}

return $data;
Expand Down
11 changes: 5 additions & 6 deletions src/Message/VoidRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,16 @@
* @see Omnipay\Stripe\Gateway
* @link https://stripe.com/docs/api#create_refund
*/
class VoidRequest extends AbstractRequest
class VoidRequest extends RefundRequest
{
public function getData()
{
$this->validate('transactionReference');

return null;
}
if ($this->getRefundApplicationFee()) {
$data['refund_application_fee'] = "true";
}

public function getEndpoint()
{
return $this->endpoint.'/charges/'.$this->getTransactionReference().'/refund';
return null;
}
}
2 changes: 1 addition & 1 deletion tests/Message/RefundRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function testAmount()
public function testRefundApplicationFee()
{
$data = $this->request->getData();
$this->assertTrue($data['refund_application_fee']);
$this->assertEquals("true", $data['refund_application_fee']);
}

public function testSendSuccess()
Expand Down

0 comments on commit 906377e

Please sign in to comment.