private function store($data)
    {
        if (array_key_exists('txn_id', $data)) {
            $order = IpnOrder::firstOrNew(array('txn_id' => $data['txn_id']));
            $order->fill($data);
        } else {
            $order = new IpnOrder($data);
        }
        $order->full_ipn = json_encode(Input::all());
        $order->save();

        $this->storeOrderItems($order, $data);

        return $order;
    }
private function store($data)
    {
        if (array_key_exists('txn_id', $data)) {
            $order = IpnOrder::firstOrNew(array('txn_id' => $data['txn_id']));
            $order->fill($data);
        } else {
            $order = new IpnOrder($data);
        }
        $order->full_ipn = json_encode(Input::all());
        $order->save();

        $this->storeOrderItems($order, $data);

        return $order;
    }
private function store ( $ data ) { if ( array_key_exists ( 'txn_id' , $ data ) ) { $ order = IpnOrder :: firstOrNew ( array ( 'txn_id' => $ data [ 'txn_id' ] ) ) ; $ order -> fill ( $ data ) ; } else { $ order = new IpnOrder ( $ data ) ; } $ order -> full_ipn = json_encode ( Input :: all ( ) ) ; $ order -> save ( ) ; $ this -> storeOrderItems ( $ order , $ data ) ; return $ order ; }
Stores the IPN contents and returns the IpnOrder object.

@param array $data
@return IpnOrder
Stores the IPN contents and returns the IpnOrder object .