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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

swelljoe created an issue. See original summary.

Kiendeleo’s picture

Status: Active » Reviewed & tested by the community
FileSize
46.17 KB

I 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.

swelljoe’s picture

I 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.

swelljoe’s picture

Issue tags: +commerce-sprint

I'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.

Sergey Nikiforov’s picture

Confirming the patch. The name field is now populated here too. Thank you!

Kiendeleo’s picture

Confirmed that this patch works as discribed

  • mglaman committed 9615adc on 7.x-2.x authored by swelljoe
    Issue #2605380 by swelljoe, Kiendeleo, Sergey Nikiforov: Card On File...
mglaman’s picture

Status: Reviewed & tested by the community » Fixed

Correct, name is in customer attribute. Committed!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.