Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class RefundService {
- public function refundOrder($order, $amount)
- {
- if(isset($this->refunds[$order->vendorTxCode])) {
- $this->refund[$order->vendorTxCode] += $amount
- } else {
- $this->refund[$order->vendorTxCode] = $amount
- }
- }
- public function flush()
- {
- foreach($this->refund as $vendorTxCode => $amount) {
- performRefund($vendorTxCode, $amount)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement