protected function getGatewayData($customData)
    {
        $shipping = $this->order->getShippingAddress();
        $billing = $this->order->getBillingAddress();

        $numPayments = Payment::get()
            ->filter(array('OrderID' => $this->order->ID))
            ->count() - 1;

        $transactionId = $this->order->Reference . ($numPayments > 0 ? "-$numPayments" : '');

        return array_merge(
            $customData,
            array(
                'transactionId'    => $transactionId,
                'firstName'        => $this->order->FirstName,
                'lastName'         => $this->order->Surname,
                'email'            => $this->order->Email,
                'company'          => $this->order->Company,
                'billingAddress1'  => $billing->Address,
                'billingAddress2'  => $billing->AddressLine2,
                'billingCity'      => $billing->City,
                'billingPostcode'  => $billing->PostalCode,
                'billingState'     => $billing->State,
                'billingCountry'   => $billing->Country,
                'billingPhone'     => $billing->Phone,
                'shippingAddress1' => $shipping->Address,
                'shippingAddress2' => $shipping->AddressLine2,
                'shippingCity'     => $shipping->City,
                'shippingPostcode' => $shipping->PostalCode,
                'shippingState'    => $shipping->State,
                'shippingCountry'  => $shipping->Country,
                'shippingPhone'    => $shipping->Phone,
            )
        );
    }
protected function getGatewayData($customData)
    {
        $shipping = $this->order->getShippingAddress();
        $billing = $this->order->getBillingAddress();

        $numPayments = Payment::get()
            ->filter(array('OrderID' => $this->order->ID))
            ->count() - 1;

        $transactionId = $this->order->Reference . ($numPayments > 0 ? "-$numPayments" : '');

        return array_merge(
            $customData,
            array(
                'transactionId'    => $transactionId,
                'firstName'        => $this->order->FirstName,
                'lastName'         => $this->order->Surname,
                'email'            => $this->order->Email,
                'company'          => $this->order->Company,
                'billingAddress1'  => $billing->Address,
                'billingAddress2'  => $billing->AddressLine2,
                'billingCity'      => $billing->City,
                'billingPostcode'  => $billing->PostalCode,
                'billingState'     => $billing->State,
                'billingCountry'   => $billing->Country,
                'billingPhone'     => $billing->Phone,
                'shippingAddress1' => $shipping->Address,
                'shippingAddress2' => $shipping->AddressLine2,
                'shippingCity'     => $shipping->City,
                'shippingPostcode' => $shipping->PostalCode,
                'shippingState'    => $shipping->State,
                'shippingCountry'  => $shipping->Country,
                'shippingPhone'    => $shipping->Phone,
            )
        );
    }
protected function getGatewayData ( $ customData ) { $ shipping = $ this -> order -> getShippingAddress ( ) ; $ billing = $ this -> order -> getBillingAddress ( ) ; $ numPayments = Payment :: get ( ) -> filter ( array ( 'OrderID' => $ this -> order -> ID ) ) -> count ( ) - 1 ; $ transactionId = $ this -> order -> Reference . ( $ numPayments > 0 ? "-$numPayments" : '' ) ; return array_merge ( $ customData , array ( 'transactionId' => $ transactionId , 'firstName' => $ this -> order -> FirstName , 'lastName' => $ this -> order -> Surname , 'email' => $ this -> order -> Email , 'company' => $ this -> order -> Company , 'billingAddress1' => $ billing -> Address , 'billingAddress2' => $ billing -> AddressLine2 , 'billingCity' => $ billing -> City , 'billingPostcode' => $ billing -> PostalCode , 'billingState' => $ billing -> State , 'billingCountry' => $ billing -> Country , 'billingPhone' => $ billing -> Phone , 'shippingAddress1' => $ shipping -> Address , 'shippingAddress2' => $ shipping -> AddressLine2 , 'shippingCity' => $ shipping -> City , 'shippingPostcode' => $ shipping -> PostalCode , 'shippingState' => $ shipping -> State , 'shippingCountry' => $ shipping -> Country , 'shippingPhone' => $ shipping -> Phone , ) ) ; }
Map shop data to omnipay fields

@param array $customData Usually user submitted data.

@return array
Map shop data to omnipay fields