setAddress2() public méthode

Sets the billing and shipping address, line 2.
public setAddress2 ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.
Exemple #1
0
 public function testAddress2()
 {
     $this->card->setAddress2('Suburb');
     $this->assertEquals('Suburb', $this->card->getAddress2());
     $this->assertEquals('Suburb', $this->card->getBillingAddress2());
     $this->assertEquals('Suburb', $this->card->getShippingAddress2());
 }
 public function testCardDetails()
 {
     $card = new CreditCard();
     $card->setName('Test Foo');
     $card->setEmail('*****@*****.**');
     $card->setCompany('Test Company');
     $card->setPostcode('13100');
     $card->setCity('Nicetown');
     $card->setCountry('TN');
     $card->setPhone('00999555666');
     $card->setAddress1('Home street');
     $card->setAddress2('Near the shop');
     $this->request->setCard($card);
     $data = $this->request->getData();
     $this->assertSame("Test Foo", $data['CN']);
     $this->assertSame("*****@*****.**", $data['EMAIL']);
     $this->assertSame("Test Company", $data['COM']);
     $this->assertSame("13100", $data['OWNERZIP']);
     $this->assertSame("Nicetown", $data['OWNERTOWN']);
     $this->assertSame("TN", $data['OWNERCTY']);
     $this->assertSame("00999555666", $data['OWNERTELNO']);
     $this->assertSame("Home street", $data['OWNERADDRESS']);
     $this->assertSame("Near the shop", $data['OWNERADDRESS2']);
 }