Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions app/code/core/Mage/Payment/Model/Method/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,8 @@ public function getInfoInstance()
*/
public function validate()
{
/**
* to validate payment method is allowed for billing country or not
*/
$paymentInfo = $this->getInfoInstance();
// Validate that payment method is allowed for billing country
$paymentInfo = $this->getInfoInstance();
if ($paymentInfo instanceof Mage_Sales_Model_Order_Payment) {
$billingCountry = $paymentInfo->getOrder()->getBillingAddress()->getCountryId();
} else {
Expand All @@ -406,7 +404,7 @@ public function validate()
if (!$this->canUseForCountry($billingCountry)) {
Mage::throwException(Mage::helper('payment')->__('Selected payment type is not allowed for billing country.'));
}
return $this;
return $this;
}

/**
Expand Down