I have a site running with Drupal 7.12 and Ubercart 3.0. I am creating a custom payment module which is used to pay by mobile phone. The workflow is:
- User enters his mobile phone number in the checkout page
- When he clicks on "verify phone number" he gets an SMS with a PIN which he has to enter in another input field.
The PIN field is a required field, but only if this specific payment option is chosen.
I know that i can add additional information by returning an instructions array in my callback method, like this:
function uc_my_payment_method($op, &$order) {
switch ($op) {
case 'cart-details':
$build['instructions'] = array(
'#markup' => t('Your mobile phone') . ': ' .
/* some markup for the new input fields */
'<br />'
);
return $build;
}
}
But i am stuck at the form elements. Can you help me? Do you need additional information?