In uc_optional_checkout_review_form_submit(), the form is not called conform to the Drupal standards:

    $wps_form = uc_paypal_wps_form($form_state, $order);

Instead, use drupal_retrieve_form() and drupal_prepare_form so hook_form_alter can be triggered:

      $wps_form = drupal_retrieve_form('uc_paypal_wps_form', $form_state, $order);
      drupal_prepare_form('uc_paypal_wps_form', $wps_form, $form_state, $order);

Find patch attached.

Comments

toemaz’s picture

Status: Active » Needs review

Changing status.

bgm’s picture

Status: Needs review » Reviewed & tested by the community

This worked for me, in 7.x-1.x.

bgm’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 6.x-1.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.