Advertisement
Guest User

Untitled

a guest
May 26th, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. <?php
  2.  
  3. class RefundService {
  4.    
  5.     public function refundOrder($order, $amount)
  6.     {
  7.         if(isset($this->refunds[$order->vendorTxCode])) {
  8.             $this->refund[$order->vendorTxCode] += $amount
  9.         } else {
  10.             $this->refund[$order->vendorTxCode] = $amount            
  11.         }
  12.     }
  13.  
  14.     public function flush()
  15.     {
  16.         foreach($this->refund as $vendorTxCode => $amount) {
  17.             performRefund($vendorTxCode, $amount)
  18.         }
  19.     }
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement