getShippingPostcode() public method

Get the shipping postcode.
public getShippingPostcode ( ) : string
return string
Ejemplo n.º 1
0
 public function testPostcode()
 {
     $this->card->setPostcode('12345');
     $this->assertEquals('12345', $this->card->getPostcode());
     $this->assertEquals('12345', $this->card->getBillingPostcode());
     $this->assertEquals('12345', $this->card->getShippingPostcode());
 }
Ejemplo n.º 2
0
 /**
  * Returns ReD Shield risk checker parameters
  *
  * @param CreditCard $card
  * @return array
  */
 protected function getRedParams($card)
 {
     $params = ['CRITERION.RED_ebWEBSITE' => $card->getEbWebsite(), 'CRITERION.RED_EBT_GENDER' => $card->getGender(), 'CRITERION.RED_EBT_TOF' => $card->getRedTof(), 'CRITERION.RED_SHIP_ADDR1' => $card->getShippingAddress1(), 'CRITERION.RED_SHIP_ADDR2' => $card->getShippingAddress2(), 'CRITERION.RED_SHIP_CITY' => $card->getShippingCity(), 'CRITERION.RED_SHIP_CNTRY_CD' => $card->getShippingCountry(), 'CRITERION.RED_CUST_ID' => $card->getCustomerId(), 'CRITERION.RED_SHIP_EMAIL' => $card->getShippingEmail(), 'CRITERION.RED_SHIP_FNAME' => $card->getShippingFirstName(), 'CRITERION.RED_SHIP_LNAME' => $card->getShippingLastName(), 'CRITERION.RED_SHIP_HOME_PHONE' => $card->getShippingPhone(), 'CRITERION.RED_SHIP_MOBILE_PHONE' => $card->getShippingFax(), 'CRITERION.RED_SHIP_POSTAL_CD' => $card->getShippingPostcode(), 'CRITERION.RED_SHIP_STPR_CD' => $card->getShippingState()];
     foreach ($this->getItemAmount() as $idx => $value) {
         $params["CRITERION.RED_ITEM_AMT" . ($idx + 1)] = $value;
     }
     foreach ($this->getItemQty() as $idx => $value) {
         $params["CRITERION.RED_ITEM_QTY" . ($idx + 1)] = $value;
     }
     foreach ($this->getItemDesc() as $idx => $value) {
         $params["CRITERION.RED_ITEM_DESC" . ($idx + 1)] = $value;
     }
     // set number of ITEMs
     $params['CRITERION.RED_OI_REPEAT'] = max([count($this->getItemAmount()), count($this->getItemQty()), count($this->getItemDesc())]) ?: null;
     foreach ($card->getUserData() as $idx => $value) {
         $params["CRITERION.RED_EBT_USER_DATA" . ($idx + 1)] = $value;
     }
     return $params;
 }