| 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 |
| 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 |
| 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; |
| 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 |
|
|
| 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); |
| 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; |