public function testSetFax()
 {
     $fax = '0123456789';
     $this->object->setFax($fax);
     $data = $this->object->getData();
     $this->assertArrayHasKey('consumerShippingFax', $data);
     $this->assertEquals($fax, $data['consumerShippingFax']);
 }
Пример #2
0
 /**
  * @param Mage_Sales_Model_Order_Address $source
  * @param string $type
  *
  * @return WirecardCEE_Stdlib_ConsumerData_Address
  */
 protected function _getAddress($source, $type = 'billing')
 {
     switch ($type) {
         case 'shipping':
             $address = new WirecardCEE_Stdlib_ConsumerData_Address(WirecardCEE_Stdlib_ConsumerData_Address::TYPE_SHIPPING);
             break;
         default:
             $address = new WirecardCEE_Stdlib_ConsumerData_Address(WirecardCEE_Stdlib_ConsumerData_Address::TYPE_BILLING);
             break;
     }
     $address->setFirstname($source->getFirstname());
     $address->setLastname($source->getLastname());
     $address->setAddress1($source->getStreet1());
     $address->setAddress2($source->getStreet2());
     $address->setZipCode($source->getPostcode());
     $address->setCity($source->getCity());
     $address->setCountry($source->getCountry());
     $address->setState($source->getRegionCode());
     $address->setPhone($source->getTelephone());
     $address->setFax($source->getFax());
     return $address;
 }