Commit 42c18904 authored by Rik ter Beek's avatar Rik ter Beek

delivery and billing houseNumberOrName fix

delivery and billing houseNumberOrName is mandatory so if it is empty set it to default NA.
parent 0dc4ef11
...@@ -108,6 +108,12 @@ class PaymentRequest extends \Magento\Framework\Object ...@@ -108,6 +108,12 @@ class PaymentRequest extends \Magento\Framework\Object
"paymentRequest.card.billingAddress.stateOrProvince" => $billingAddress->getRegionCode(), "paymentRequest.card.billingAddress.stateOrProvince" => $billingAddress->getRegionCode(),
"paymentRequest.card.billingAddress.country" => $billingAddress->getCountryId() "paymentRequest.card.billingAddress.country" => $billingAddress->getCountryId()
); );
// houseNumberOrName is mandatory
+ if($requestBilling['paymentRequest.card.billingAddress.houseNumberOrName'] == "") {
+ $requestBilling['paymentRequest.card.billingAddress.houseNumberOrName'] = "NA";
+ }
$request = array_merge($request, $requestBilling); $request = array_merge($request, $requestBilling);
} }
...@@ -123,6 +129,12 @@ class PaymentRequest extends \Magento\Framework\Object ...@@ -123,6 +129,12 @@ class PaymentRequest extends \Magento\Framework\Object
"paymentRequest.card.deliveryAddress.stateOrProvince" => $deliveryAddress->getRegionCode(), "paymentRequest.card.deliveryAddress.stateOrProvince" => $deliveryAddress->getRegionCode(),
"paymentRequest.card.deliveryAddress.country" => $deliveryAddress->getCountryId() "paymentRequest.card.deliveryAddress.country" => $deliveryAddress->getCountryId()
); );
// houseNumberOrName is mandatory
+ if($requestDelivery['paymentRequest.card.deliveryAddress.houseNumberOrName'] == "") {
+ $requestDelivery['paymentRequest.card.deliveryAddress.houseNumberOrName'] = "NA";
+ }
$request = array_merge($request, $requestDelivery); $request = array_merge($request, $requestDelivery);
} }
......
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