in my implementation of hook_user I have credit card processing code in the validate $op. In case the credit card processing fails, how do I throw an error so that the registration won't continue? (user doesn't get created)
this is the code that I have so far...
$pass = uc_payment_process('credit', $order->order_id, $order->order_total, $data, TRUE, NULL, FALSE);
if($pass===true){
uc_order_update_status($order->order_id,'completed');
}
else{
drupal_set_message('The payment was not accepted.','error');
uc_order_update_status($order->order_id,'canceled');
}
I entered bogus card numbers and the order is being set as canceled but I'm not getting any error messages and the user is still being created.
