diff --git a/src/Common/CreditCard.php b/src/Common/CreditCard.php index c92285ba..05c0d2f3 100644 --- a/src/Common/CreditCard.php +++ b/src/Common/CreditCard.php @@ -44,6 +44,7 @@ * * company * * address1 * * address2 + * * address3 * * city * * postcode * * state @@ -66,6 +67,7 @@ * * billingCompany * * billingAddress1 * * billingAddress2 + * * billingAddress3 * * billingCity * * billingPostcode * * billingState @@ -79,6 +81,7 @@ * * shippingCompany * * shippingAddress1 * * shippingAddress2 + * * shippingAddress3 * * shippingCity * * shippingPostcode * * shippingState @@ -791,6 +794,27 @@ public function setBillingAddress2($value) return $this->setParameter('billingAddress2', $value); } + /** + * Get the billing address, line 3. + * + * @return string + */ + public function getBillingAddress3() + { + return $this->getParameter('billingAddress3'); + } + + /** + * Sets the billing address, line 3. + * + * @param string $value + * @return $this + */ + public function setBillingAddress3($value) + { + return $this->setParameter('billingAddress3', $value); + } + /** * Get the billing city. * @@ -1090,6 +1114,27 @@ public function setShippingAddress2($value) return $this->setParameter('shippingAddress2', $value); } + /** + * Get the shipping address, line 3. + * + * @return string + */ + public function getShippingAddress3() + { + return $this->getParameter('shippingAddress3'); + } + + /** + * Sets the shipping address, line 3. + * + * @param string $value + * @return $this + */ + public function setShippingAddress3($value) + { + return $this->setParameter('shippingAddress3', $value); + } + /** * Get the shipping city. * @@ -1285,6 +1330,30 @@ public function setAddress2($value) return $this; } + /** + * Get the billing address, line 3. + * + * @return string + */ + public function getAddress3() + { + return $this->getParameter('billingAddress3'); + } + + /** + * Sets the billing and shipping address, line 3. + * + * @param string $value + * @return $this + */ + public function setAddress3($value) + { + $this->setParameter('billingAddress3', $value); + $this->setParameter('shippingAddress3', $value); + + return $this; + } + /** * Get the billing city. * diff --git a/tests/Omnipay/Common/CreditCardTest.php b/tests/Omnipay/Common/CreditCardTest.php index fdd4e91e..74de5070 100644 --- a/tests/Omnipay/Common/CreditCardTest.php +++ b/tests/Omnipay/Common/CreditCardTest.php @@ -428,6 +428,13 @@ public function testBillingAddress2() $this->assertEquals('Suburb', $this->card->getAddress2()); } + public function testBillingAddress3() + { + $this->card->setBillingAddress3('Building C, Room 308'); + $this->assertEquals('Building C, Room 308', $this->card->getBillingAddress3()); + $this->assertEquals('Building C, Room 308', $this->card->getAddress3()); + } + public function testBillingCity() { $this->card->setBillingCity('Quahog'); @@ -524,6 +531,12 @@ public function testShippingAddress2() $this->assertEquals('Suburb', $this->card->getShippingAddress2()); } + public function testShippingAddress3() + { + $this->card->setShippingAddress3('Building C, Room 308'); + $this->assertEquals('Building C, Room 308', $this->card->getShippingAddress3()); + } + public function testShippingCity() { $this->card->setShippingCity('Quahog'); @@ -590,6 +603,14 @@ public function testAddress2() $this->assertEquals('Suburb', $this->card->getShippingAddress2()); } + public function testAddress3() + { + $this->card->setAddress3('Building C, Room 308'); + $this->assertEquals('Building C, Room 308', $this->card->getAddress3()); + $this->assertEquals('Building C, Room 308', $this->card->getBillingAddress3()); + $this->assertEquals('Building C, Room 308', $this->card->getShippingAddress3()); + } + public function testCity() { $this->card->setCity('Quahog');