Guest User

Untitled

a guest
Jun 20th, 2018
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. diff --git a/app/code/core/Mage/Paypal/Model/Standard.php b/app/code/core/Mage/Paypal/Model/Standard.php
  2. index e77e3d8..e70efea 100644
  3. --- a/app/code/core/Mage/Paypal/Model/Standard.php
  4. +++ b/app/code/core/Mage/Paypal/Model/Standard.php
  5. @@ -368,8 +368,16 @@ class Mage_Paypal_Model_Standard extends Mage_Payment_Model_Method_Abstract
  6. */
  7.  
  8. } else {
  9. -
  10. - if ($this->getIpnFormData('mc_gross')!=$order->getBaseGrandTotal()) {
  11. + $businessAccount = Mage::getStoreConfig('paypal/wps/business_account', $order->getStoreId());
  12. + $receiver = ($this->getIpnFormData('business') ? $this->getIpnFormData('business') : $this->getIpnFormData('receiver_email'));
  13. + if ($receiver != $businessAccount) {
  14. + $order->addStatusToHistory(
  15. + $order->getStatus(),//continue setting current order status
  16. + Mage::helper('paypal')->__('Paypal IPN Invalid %s.', 'Invalid account')
  17. + );
  18. + $order->save();
  19. + }
  20. + else if ($this->getIpnFormData('mc_gross')!=$order->getBaseGrandTotal()) {
  21. //when grand total does not equal, need to have some logic to take care
  22. $order->addStatusToHistory(
  23. $order->getStatus(),//continue setting current order status
Add Comment
Please, Sign In to add comment