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.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | arb_cancel-1372432-3.patch | 1.75 KB | vmi |
Comments
Comment #1
ferdinand.bardamu commentedHmmm.. 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.
Comment #2
ferdinand.bardamu commentedWorked for me on 6.x-2.0-beta1. Thanks, man.
Can this be made into a patch?
Comment #3
vmi commentedI haven't tested it for D7 but here is a patch.
Comment #4
shaundychkoThanks for the patch! Reviewed and tested against 6.x-2.0-beta1.
Comment #5
shaundychkosuppose this cue should stay open for D7
Comment #6
univate commentedcommitted this fix.