In my installation the current devel version, and I think the prior dev version, did not populate the name field when saving to cardonfile. This is due to a mismatch between the data structures in the $attributes variable.
Specifically, the patch I'm attaching corrects it for me. I'm not sure if this is somehow a problem with my installation, or if it is universal. On my system $attributes['creditCard']['firstName'] and $attributes['creditCard']['lastName'] are not populated, but $attributes['customer']['firstName'] and $attributes['customer']['lastName'] are. So the patch changes to use those indexes.
Comment | File | Size | Author |
---|---|---|---|
#2 | Issues.png | 46.17 KB | Kiendeleo |
commerce_braintree-cardonfile-name-fix.patch | 829 bytes | swelljoe | |
Comments
Comment #2
Kiendeleo CreditAttribution: Kiendeleo commentedI have tested this patch, the name is now stored on card on file page. I have noticed however that the cards generated by Braintree do not have an edit or delete button. I loaded the Authorize.net module and the cards saved by it are editable. Is this a similar issue or a new one? See issues.png for an example.
Comment #3
swelljoe CreditAttribution: swelljoe as a volunteer commentedI don't see any code for editing the data (but I'm still not really familiar with this code or how it all fits together), and would also need that to be functional for me to launch to store with this payment method.
I planned to look into it sometime soon, but since this is all so new to me, I'm not real sure how/where to start. Finding that the module seems to be somewhat minimally maintained has me thinking I might ought to go down another path for our payment processing.
Comment #4
swelljoe CreditAttribution: swelljoe as a volunteer commentedI've spent more time with this issue, and found that it's not specific to my installation...it occurs on any installation of commerce_braintree using the dropin payment method, and I believe this patch should be applied to the core distribution.
Kiendeleo: I have also submitted a patch to add delete card support (one of the missing operations you're talking about), in https://www.drupal.org/node/2633796 as well as the charge callback in https://www.drupal.org/node/2643126 (which allows cardonfile to bill the stored card). I'm hoping for review and committing on those from one of the maintainers, soon.
Comment #5
Sergey Nikiforov CreditAttribution: Sergey Nikiforov commentedConfirming the patch. The name field is now populated here too. Thank you!
Comment #6
Kiendeleo CreditAttribution: Kiendeleo commentedConfirmed that this patch works as discribed
Comment #8
mglamanCorrect, name is in customer attribute. Committed!