After installing commerce_cardonfile, the option is displayed to the user in checkout to save their card even if "Enable Card on File functionality with this payment method using Authorize.Net CIM" hasn't been checked in the commerce_authnet settings page.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | cardonfile-payment-method-check-1693588-9.patch | 1.28 KB | balintbrews |
| #7 | cardonfile-payment-method-check-1693588-7.patch | 597 bytes | hitfactory |
| #3 | 1693588-003-remove-save-option-if-not-enabled.patch | 7.18 KB | joshmiller |
Comments
Comment #1
andyg5000Module should check to see if any payment gateways have card on file enabled before presenting option to save card for customer.
Comment #2
berdirThe problem is that this information isn't standardized. So we either define how that setting should be called by default, or this module could actually alter all settings forms, check if it supports card on file and display the settings.
Comment #3
joshmillerFirst stab at this feature.
Things we may want to add...
- An update function that "enables" the module (assuming this would only be disabled if first installed or explicitly turned off).
- Figure out how want to notify people that they must turn it on.
Josh
Comment #4
berdirI think this shouldn't be a global variable_get() option but a payment specific one. Should be possible to extend the standard form I guess and place that setting there if the module supports cardonfile. Then check it there·
I'd also say that it should be enabled by default, because then it works if you enable the module, otherwise you need to edit all payment instances and check the setting.
Last, there should be a "." at the end of the comment :)
Looks like an unrelated fix, I think there's already an issue for this.
Comment #5
berdirComment #6
dwkitchen commentedMoving forward to 2.x branch. I have identified that it is still there.
Comment #7
hitfactory commentedHere's a patch which simply checks $payment_method['settings'] instead of $payment_method.
Comment #8
dwkitchen commentedHad it on my radar to fix, simple in the end. Thanks for the patch
Comment #9
balintbrewsIt seems this patch breaks the detection of Card on File-capable payment gateways. Checking the
settingskey inside the payment method array means that the defined callbacks are not detected. Moving them under thesettingskey inhook_commerce_payment_method_info()doesn't help either:commerce_payment_method_instance_load()injects the settings specific to the context of the payment method instance under the same key, but it initiates an empty array, so all the specified callbacks for Card on File would be gone.My suggestion is not to modify
_commerce_cardonfile_capable_payment_method_check()for this purpose, since it's only meant to check if a payment method is CoF-capable. Let's change the payment form altering instead, where we can check the settings of the payment gateway instance.Comment #10
joshmillerPatch applied, checkbox showed back up for my card on file form :D
Comment #11
dwkitchen commentedI have committed the patch to fix the regression but want to look at those tick boxes again.