Created
November 4, 2010 12:36
-
-
Save LeeSaferite/662396 to your computer and use it in GitHub Desktop.
Mage_PayPal fix for versions prior to 1.4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/code/core/Mage/Paypal/Model/Standard.php b/app/code/core/Mage/Paypal/Model/Standard.php | |
index e77e3d8..e70efea 100644 | |
--- a/app/code/core/Mage/Paypal/Model/Standard.php | |
+++ b/app/code/core/Mage/Paypal/Model/Standard.php | |
@@ -368,8 +368,16 @@ class Mage_Paypal_Model_Standard extends Mage_Payment_Model_Method_Abstract | |
*/ | |
} else { | |
- | |
- if ($this->getIpnFormData('mc_gross')!=$order->getBaseGrandTotal()) { | |
+ $businessAccount = Mage::getStoreConfig('paypal/wps/business_account', $order->getStoreId()); | |
+ $receiver = ($this->getIpnFormData('business') ? $this->getIpnFormData('business') : $this->getIpnFormData('receiver_email')); | |
+ if ($receiver != $businessAccount) { | |
+ $order->addStatusToHistory( | |
+ $order->getStatus(),//continue setting current order status | |
+ Mage::helper('paypal')->__('Paypal IPN Invalid %s.', 'Invalid account') | |
+ ); | |
+ $order->save(); | |
+ } | |
+ else if ($this->getIpnFormData('mc_gross')!=$order->getBaseGrandTotal()) { | |
//when grand total does not equal, need to have some logic to take care | |
$order->addStatusToHistory( | |
$order->getStatus(),//continue setting current order status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment