We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit c7bd96bd authored by Scott Powell's avatar Scott Powell Committed by GitHub

Merge pull request #323 from Adyen/feature/PW-670

Assign default values to billing address fields
parents da872c02 c445aa14
......@@ -62,15 +62,33 @@ class AddressDataBuilder implements BuilderInterface
$billingAddress = $order->getBillingAddress();
if ($billingAddress) {
// filter housenumber from streetLine1
$requestBilling = ["street" => $billingAddress->getStreetLine1(),
"postalCode" => $billingAddress->getPostcode(),
"city" => $billingAddress->getCity(),
$requestBilling = ["street" => "N/A",
"postalCode" => '',
"city" => "N/A",
"houseNumberOrName" => '',
"stateOrProvince" => $billingAddress->getRegionCode(),
"country" => $billingAddress->getCountryId()
"stateOrProvince" => '',
"country" => "ZZ"
];
if ($billingAddress->getStreetLine1()) {
$requestBilling["street"] = $billingAddress->getStreetLine1();
}
if ($billingAddress->getPostcode()) {
$requestBilling["postalCode"] = $billingAddress->getPostcode();
}
if ($billingAddress->getCity()) {
$requestBilling["city"] = $billingAddress->getCity();
}
if ($billingAddress->getRegionCode()) {
$requestBilling["stateOrProvince"] = $billingAddress->getRegionCode();
}
if ($billingAddress->getCountryId()) {
$requestBilling["country"] = $billingAddress->getCountryId();
}
$result['billingAddress'] = $requestBilling;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment