Skip to content

Instantly share code, notes, and snippets.

@spinweb-dev
Created January 13, 2014 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spinweb-dev/8409197 to your computer and use it in GitHub Desktop.
Save spinweb-dev/8409197 to your computer and use it in GitHub Desktop.
<?php
class CustomCommerceTax {
$this->_aItems;
$this->_aShipping;
$this->_aCoupon;
public function __construct($aItems, $aShipping, $aCoupon) {
$this->_aItems = $aItems;
$this->_aShipping = $aShipping;
$this->_aCoupon = $aCoupon;
}
public function CalcluateTax() {
// API calls here
// Access shipping/coupon/items: $this->_aItems
}
public function EstimateTax() {
// API calls here
// Access shipping/coupon/items: $this->_aItems
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment