The link "here" to paypal help on the page at user/%user/recurring/<recurring_fee_id>/cancel/paypal_wps is invalid.
I was able to fix the problem in a separate module using an alter statement and a replacement form generation function:
/**
* Implements hook_recurring_info_alter().
*/
function payment_enhancements_recurring_info_alter(&$info) {
$info['paypal_wps']['menu']['cancel']['page arguments'][0] = 'payment_enhancements_uc_recurring_hosted_paypal_cancel_form';
}
/**
* Display info on canceling the Paypal WPS subscription.
* taken from uc_recurring module
* file: uc_recurring/modules/uc_recurring_hsoted/uc_recurring_hosted.module
* function: uc_recurring_hosted_paypal_cancel_form
* needed to change link destination as paypal has updated their help center links and does not redirect old links correctly
*/
function payment_enhancements_uc_recurring_hosted_paypal_cancel_form($form_state, $rfid) {
$form['message'] = array(
'#markup' => t('You can cancel your subscription from your paypal account, see <a href="@link">here</a> for instructions.',
array('@link' => 'https://www.paypal.com/us/webapps/helpcenter/helphub/article/?articleID=FAQ2058')
));
return $form;
}
I will also create a patch and submit it shortly.
Comments
Comment #1
DrCord commentedComment #2
DrCord commentedHere is a patch.
Comment #3
jerry commentedLink has apparently changed at PayPal. Patch re-rolled for updated link and to make the message a little clearer.
Comment #4
DrCord commentedNice, thanks for doing a re-roll.