Cancel shows as canceled in the site but leaves errors in the logs and doesn't cancel the subscription with ARB.

The culprit is referencing a variable that should be from an object($order_id to $order->order_id). Also the second paramter should accept a value(&$fee to $fee).

file: uc_recurring_hosted.module
function: function uc_recurring_hosted_authorizenet_arb_cancel

Fixes:
line 454: function uc_recurring_hosted_authorizenet_arb_cancel($order, $fee) {
line 481: if (!empty($order->order_id)) {
line 482: uc_order_comment_save($order->order_id, 0, t('Authorize.Net: Subscription @subscription_id cancellation failed.
@error - @text', array('@subscription_id' => $subscription_id, '@error' => $data['code'], '@text' => $data['text'])), 'admin');
line 487: uc_order_comment_save($order->order_id, 0, t('Authorize.Net: Subscription @subscription_id cancelled.', array('@subscription_id' => $subscription_id)), 'admin');

I tested this and I get no errors logged and ARB does cancel the subscription.

CommentFileSizeAuthor
#3 arb_cancel-1372432-3.patch1.75 KBvmi

Comments

ferdinand.bardamu’s picture

Hmmm.. is this related to this similar problem? Leaving a note here to remind myself to look at this later and confirm if this fix applies to older versions too.

ferdinand.bardamu’s picture

Worked for me on 6.x-2.0-beta1. Thanks, man.

Can this be made into a patch?

vmi’s picture

Component: Gateway Integration » Code
StatusFileSize
new1.75 KB

I haven't tested it for D7 but here is a patch.

shaundychko’s picture

Version: 7.x-2.x-dev » 6.x-2.0-beta1
Status: Needs review » Reviewed & tested by the community

Thanks for the patch! Reviewed and tested against 6.x-2.0-beta1.

shaundychko’s picture

Version: 6.x-2.0-beta1 » 7.x-2.x-dev
Status: Reviewed & tested by the community » Needs review

suppose this cue should stay open for D7

univate’s picture

Status: Needs review » Fixed

committed this fix.

Status: Fixed » Closed (fixed)

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