Beispiel #1
0
 public function tax()
 {
     if (isset($this->amount->tax)) {
         return $this->amount->tax;
     } elseif (isset($this->order->shipping)) {
         $tax = new Tax($this->order->shipping->country, $this->order->shipping->state, $this->order->basket);
         $this->amount->tax = $tax->amount();
         return $this->amount->tax;
     } else {
         return 0;
     }
 }