/[drupal]/contributions/modules/uc_setcom/uc_setcom.module
ViewVC logotype

Diff of /contributions/modules/uc_setcom/uc_setcom.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2, Wed Oct 7 10:47:08 2009 UTC revision 1.3, Wed Oct 7 14:13:32 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: uc_setcom.module,v 1.1.4.2 2009/10/07 08:14:04 maxheadroom Exp $  // $Id: uc_setcom.module,v 1.2 2009/10/07 10:47:08 maxheadroom Exp $
3    
4  /**  /**
5  * @file  * @file
# Line 479  function uc_setcom_complete($cart_id = 0 Line 479  function uc_setcom_complete($cart_id = 0
479        $somestring .= 'Error Description: '. $error_desc .'<br>';        $somestring .= 'Error Description: '. $error_desc .'<br>';
480        $somestring .= 'Error Solution: '. $error_solution .'<br>';        $somestring .= 'Error Solution: '. $error_solution .'<br>';
481        drupal_set_message($somestring, 'error');        drupal_set_message($somestring, 'error');
482        watchdog('Setcom', $somestring, WATCHDOG_WARNING);        watchdog('Setcom', $somestring, array(), WATCHDOG_WARNING);
483        $output = '<br /><a href="'. $s_front .'">Click to return to the front page.</a>';        $output = '<br /><a href="'. $s_front .'">Click to return to the front page.</a>';
484      }      }
485      else { //end transaction is unsuccessful      else { //end transaction is unsuccessful
# Line 541  function uc_setcom_complete($cart_id = 0 Line 541  function uc_setcom_complete($cart_id = 0
541        }        }
542        if ($somestring) {        if ($somestring) {
543          drupal_set_message($somestring, 'status');          drupal_set_message($somestring, 'status');
544          watchdog('Setcom', $somestring, WATCHDOG_NOTICE);          watchdog('Setcom', $somestring, array(), WATCHDOG_NOTICE);
545        }        }
546      } //end tnx successful      } //end tnx successful
547      return $output;      return $output;
# Line 552  function uc_setcom_complete($cart_id = 0 Line 552  function uc_setcom_complete($cart_id = 0
552        drupal_set_message(t('<b>The store owner has been notified and will look into the problem.', 'error'));        drupal_set_message(t('<b>The store owner has been notified and will look into the problem.', 'error'));
553        uc_setcom_send_error('No Curl received', 'No Curl data was send from Setcom.');        uc_setcom_send_error('No Curl received', 'No Curl data was send from Setcom.');
554      }      }
555      watchdog('Setcom', $somestring, WATCHDOG_NOTICE);      watchdog('Setcom', $somestring,  array(), WATCHDOG_NOTICE);
556    }    }
557  }  }
558    
# Line 591  function uc_setcom_check_trans($somearra Line 591  function uc_setcom_check_trans($somearra
591        uc_setcom_send_error(t('Payment method not allowed', 'Customer tried to buy with '. $somearray['pmt_type'] .', a payment method that is not allowed. Order no.:'. $order_check->order_id .' Order user ID:'. $order_check->uid));        uc_setcom_send_error(t('Payment method not allowed', 'Customer tried to buy with '. $somearray['pmt_type'] .', a payment method that is not allowed. Order no.:'. $order_check->order_id .' Order user ID:'. $order_check->uid));
592      }      }
593      drupal_set_message($somestring, 'error');      drupal_set_message($somestring, 'error');
594      watchdog('Setcom', $somestring, WATCHDOG_NOTICE);      watchdog('Setcom', $somestring, array(),  WATCHDOG_NOTICE);
595      $output ='<a href="'. url() .'">Click to return to the front page.</a>';      $output ='<a href="'. url() .'">Click to return to the front page.</a>';
596      $somestring = '';      $somestring = '';
597      ca_pull_trigger('setcom_payment_denied', $order_check, $user->uid == 0 ? $account : $user);      ca_pull_trigger('setcom_payment_denied', $order_check, $user->uid == 0 ? $account : $user);
# Line 605  function uc_setcom_check_trans($somearra Line 605  function uc_setcom_check_trans($somearra
605        $somestring .= t('<br>The store owner has been notified and will look into the problem.');        $somestring .= t('<br>The store owner has been notified and will look into the problem.');
606        uc_setcom_send_error('Transaction method error', 'Transaction method could not be determined. Contact Setcom regarding this problem. The order was not processed (stay Pending). Order no.:'. $order_check->order_id .' Order user ID:'. $order_check->uid);        uc_setcom_send_error('Transaction method error', 'Transaction method could not be determined. Contact Setcom regarding this problem. The order was not processed (stay Pending). Order no.:'. $order_check->order_id .' Order user ID:'. $order_check->uid);
607      }      }
608      watchdog('Setcom', $somestring, WATCHDOG_NOTICE);      watchdog('Setcom', $somestring, array(),  WATCHDOG_NOTICE);
609      $output ='<a href="'. url() .'">Click to return to the front page.</a>';      $output ='<a href="'. url() .'">Click to return to the front page.</a>';
610      uc_order_comment_save($order_check->order_id, 0, $somestring);      uc_order_comment_save($order_check->order_id, 0, $somestring);
611      break;      break;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.2