Closed (duplicate)
Project:
Commerce Card on File
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 May 2013 at 12:45 UTC
Updated:
7 Jun 2013 at 10:31 UTC
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
Comment #1
adshill commentedYes 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?
Comment #2
recrit commentedThe rule action to charge a card does not work for a few reasons:
Comment #3
dwkitchen commentedAs #2000402: More entity conversion cleanup has now been fixed I'll mark this one as a duplicate of #2000420: Checkout "Set as your default card" does not set default for NEW cards