Skip to content

Commit

Permalink
Merge pull request #5 from srishaharidas/XOL-3425
Browse files Browse the repository at this point in the history
XOL-3425 Collect Stripe level 3 data to decrease IC rates
  • Loading branch information
anush authored Apr 24, 2017
2 parents b1440bd + accc2aa commit 12b5963
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/Omnipay/Common/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,36 @@ public function setPrice($value)
{
return $this->setParameter('price', $value);
}

/**
* {@inheritDoc}
*/
public function getTaxes()
{
return $this->getParameter('taxes');
}

/**
* Set the item tax amount
*/
public function setTaxes($value)
{
return $this->setParameter('taxes', $value);
}

/**
* {@inheritDoc}
*/
public function getDiscount()
{
return $this->getParameter('discount');
}

/**
* Set the item discount
*/
public function setDiscount($value)
{
return $this->setParameter('discount', $value);
}
}
10 changes: 10 additions & 0 deletions src/Omnipay/Common/ItemInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,14 @@ public function getQuantity();
* Price of the item
*/
public function getPrice();

/**
* Discount for the item
*/
public function getDiscount();

/**
* Taxes for the item
*/
public function getTaxes();
}
12 changes: 12 additions & 0 deletions tests/Omnipay/Common/ItemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,16 @@ public function testPrice()
$this->item->setPrice('10.01');
$this->assertSame('10.01', $this->item->getPrice());
}

public function testTaxes()
{
$this->item->setTaxes('50.55');
$this->assertSame('50.55', $this->item->getTaxes());
}

public function testDiscount()
{
$this->item->setDiscount('10.57');
$this->assertSame('10.57', $this->item->getDiscount());
}
}

0 comments on commit 12b5963

Please sign in to comment.