Hi,

I am updating the SagePay payment gateway to support recurring payments and card on file charging.

I have updated to 2.x of Card on File and 2.x of Recurring payments.

When the rule commerce_cardonfile_order_charge_card is triggered, the function commerce_cardonfile_order_charge_card is called but this expects the card data supplied to be in an array (as per 1.x) and it's now an entity.

This causes things to fall down when checking for the card to charge (line 1248 of commerce_cardonfile.module)

if (commerce_cardonfile_order_can_charge_card($order, $possible_card) &&
        (!$instance_is_forced || !isset($possible_card['instance_id']) || $possible_card['instance_id'] == $forced_instance_id)) {
        $card_data = $possible_card;
        break;
      }

I've tried changing to code here to $possible_card->instance_id but then rules is not happy with the type of return data, so I think there's more than one change required.

Thanks!

Rich

Comments

adshill’s picture

Yes we're also experiencing this issue. Are there any pointers on how best to approach this issue as it appears to be a show-stopper right now. We could most likely get our developer involved if we have some guidelines to make it contributable! (is that even a word!?) Or maybe we're missing something?

recrit’s picture

The rule action to charge a card does not work for a few reasons:

dwkitchen’s picture

Status: Active » Closed (duplicate)