[eluser]PV-Patrick[/eluser]
Hi Michael,
I am trying a different route for dealing with credit card validation/processing. Before, I would authorize the card at the same time as validating the form and stored the authorization status in a session variable. So if the form didn't validate, it wouldn't try and authorize their card on each failed form validation attempt. Thus, I was using an AUTH_ONLY, then PREVIOUS_SALE - 2 function calls for the credit card.
I was trying to bypass this method and use 2 validations and not set session variables so I can then use an AUTH_CONVERT for the CC. I validate the form first as there are two payment methods, 1 for credit card and 1 for paypal, which has two different validation arrays.
I hope that helps, thanks guys!
EDIT: @ macigniter
I guess my way about it is a more nested approach.... Not sure if it matters? Might need to pull it out of each other and basically have it similar to your case.
Code:
if($this->form_validation->run('val1') == FALSE):
// -- Stop processing
else:
$bool = TRUE;
endif;
if($bool):
// -- run val2
endif;