Guest User

Untitled

a guest
Jan 20th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. public function disablePayments($observer) {
  2. $quote = $observer->getEvent()->getQuote();
  3. $paymentInstance = $observer->getEvent()->getMethodInstance();
  4.  
  5. if ($quote) {
  6. $country = $quote->getShippingAddress()->getCountry();
  7.  
  8. if ($country == 'India') {
  9. if (!$methodInstance instanceof PayTm_Method_Instance) {
  10. $observer->getEvent()->getResult()->isAvailable = false;
  11. }
  12. }
  13. }
  14. }
Add Comment
Please, Sign In to add comment