Payu\Serializer\PaymentRequestSerializer::serializeDelivery PHP Method

serializeDelivery() private method

private serializeDelivery ( ) : array
return array
    private function serializeDelivery()
    {
        /** @var $delivery \Payu\Component\Delivery */
        $delivery = $this->request->getDelivery();
        if (!$delivery) {
            return array();
        }
        return array('DELIVERY_FNAME' => $delivery->getFirstName(), 'DELIVERY_LNAME' => $delivery->getLastName(), 'DELIVERY_EMAIL' => $delivery->getEmail(), 'DELIVERY_PHONE' => $delivery->getPhone(), 'DELIVERY_COMPANY' => $delivery->getCompany(), 'DELIVERY_ADDRESS' => $delivery->getAddress(), 'DELIVERY_ZIPCODE' => $delivery->getZipCode(), 'DELIVERY_CITY' => $delivery->getCity(), 'DELIVERY_STATE' => $delivery->getState(), 'DELIVERY_COUNTRYCODE' => $delivery->getCountryCode());
    }

Usage Example

 /**
  * @return array
  */
 protected function serializeDelivery()
 {
     /** @var $delivery \Payu\Component\Delivery */
     $delivery = $this->request->getDelivery();
     if (!$delivery) {
         return array();
     }
     return parent::serializeDelivery();
 }