Skip to content

Commit

Permalink
Merge pull request #34 from daanstokhof/Address_comparing_checkout
Browse files Browse the repository at this point in the history
Checks getSameAsBilling result when comparing addresses
  • Loading branch information
Wouter Jonker authored Oct 31, 2019
2 parents d0b54c2 + f9e048e commit cf60901
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/code/community/Pay/Payment/Model/Paymentmethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,10 @@ protected static function addressEqual(Mage_Sales_Model_Quote $quote)
$billingAddress = $quote->getBillingAddress();
$shippingAddress = $quote->getShippingAddress();

if($shippingAddress->getSameAsBilling()) {
return true;
}

if (strtolower($billingAddress->getStreet1()) !== strtolower($shippingAddress->getStreet1())) {
return false;
}
Expand Down

0 comments on commit cf60901

Please sign in to comment.