Skip to content

Commit 99d94a4

Browse files
committed
Use extra customer details when creating transaction
1 parent a0b3ad6 commit 99d94a4

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/Omnipay/Eway/Message/RapidPurchaseRequest.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,19 @@ public function getData()
4949
$data['Payment']['CurrencyCode'] = $this->getCurrency();
5050

5151
$data['Customer'] = array();
52-
if ($this->getCard()) {
53-
$data['Customer']['FirstName'] = $this->getCard()->getFirstName();
54-
$data['Customer']['LastName'] = $this->getCard()->getLastName();
52+
$card = $this->getCard();
53+
if ($card) {
54+
$data['Customer']['FirstName'] = $card->getFirstName();
55+
$data['Customer']['LastName'] = $card->getLastName();
56+
$data['Customer']['CompanyName'] = $card->getCompany();
57+
$data['Customer']['Street1'] = $card->getAddress1();
58+
$data['Customer']['Street2'] = $card->getAddress2();
59+
$data['Customer']['City'] = $card->getCity();
60+
$data['Customer']['State'] = $card->getState();
61+
$data['Customer']['PostalCode'] = $card->getPostCode();
62+
$data['Customer']['Country'] = strtolower($card->getCountry());
63+
$data['Customer']['Email'] = $card->getEmail();
64+
$data['Customer']['Phone'] = $card->getPhone();
5565
}
5666

5767
return $data;

0 commit comments

Comments
 (0)