Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This patch alters the admin payment terminal form on the order payment tab to enable payment transactions from the customers card on file data.
This has been tested with commerce_authnet-7.x-1.x
Comment | File | Size | Author |
---|---|---|---|
#12 | Normal_Error.gif | 120.35 KB | thejacer87 |
#12 | Strange_Error.gif | 131.19 KB | thejacer87 |
#6 | interdiff.txt | 696 bytes | Tim Bozeman |
#6 | commerce_cardonfile-add_cardonfile_options_to_admin_payment_terminal-6.patch | 3.76 KB | Tim Bozeman |
commerce_cardonfile-add_cardonfile_options_to_admin_payment_terminal.patch | 3.71 KB | andyg5000 |
Comments
Comment #1
DigitalFrontiersMediaAdding this patch to commerce_cardonfile-7.x-2.x-dev and commerce_authnet-7.x-1.1 results in:
Notice: Undefined index: payment_method in commerce_cardonfile_form_commerce_payment_order_transaction_add_form_alter() (line 754 of .../sites/all/modules/commerce_cardonfile/commerce_cardonfile.module).
Currently no cards on file--not sure if that is partly of cause.
Testing sanity check with something like:
Will report back with modified patch if exact nature isolated.
Comment #2
richm CreditAttribution: richm commentedI tried this patch and got the same error, even though there already was a card on file.
Has anyone had any success in resolving this?
Comment #3
DigitalFrontiersMediaIt's been a while, but yeah, I think I got this working. I'm pretty busy but will try to remember to look for it around the end of next week and post back here. Remind me if I haven't reported back by this time next week and nobody else has piped up.
Comment #4
richm CreditAttribution: richm commentedHi DigitalFrontiersMedia,
Unfortunately, no one else has responded. If you could locate and post your solution, it would be much appreciated.
Thanks in advance!
Comment #5
DigitalFrontiersMediaHi richm & Tim,
My apologies for very late response. Yes, I did get this working. The answer was pretty much as I outlined in #1 above.
If you applyandyg5000's patch, then simply go to line 754 of /sites/all/modules/commerce_cardonfile/commerce_cardonfile.module and change it from
$payment_method = $form_state['payment_method'];
to
$payment_method = isset($form_state['payment_method']) ? $form_state['payment_method']:null;
If you need me to re-roll a patch instead, let me know.
Cheers,
Stephen
Comment #6
Tim Bozeman CreditAttribution: Tim Bozeman commented@DigitalFrontiersMedia Thank you!
Rerolled with DigitalFrontiersMedia's changes. If there's a card on file it shows up on the payment terminal.
Comment #7
WillsCreative CreditAttribution: WillsCreative commentedIs there a way to make it so when you use a new credit card (one not on file) it stores it for future use?
Comment #8
scottAtRoot802 CreditAttribution: scottAtRoot802 commented#6 patch works great. This is exactly what I needed.
Comment #9
merauluka CreditAttribution: merauluka commentedAwesome! Love this feature.
#6 patch applied against latest dev (7.x-2.0-beta5+3-dev) successfully.
Thanks all.
Comment #10
DigitalFrontiersMediaCan we call this RTBC?
Comment #11
mglamanComment #12
thejacer87 CreditAttribution: thejacer87 at Acro Commerce commentedhey guys, the patch in #6 applied cleanly. And it looks like it should work. except I get an error when I submit it. I am using the Commerce Stripe Payment Gateway and I have it working with card on file for regular checkouts.
The one error is what I would expect when not entering the Card number. But the "missing required param: number" I have no idea where it's coming from. I searched my entire project for the string "missing required param" and came up empty.
edit: definitely a commerce_stripe issue. Thanks for patch guys. It definitely work for me. +1 for RTBC
Comment #13
torgosPizzaWhat more needs to happen to get this committed?
Comment #14
mglaman: NULL
Fixed for commit.
Comment #16
mglamanThanks everyone!