I wanted to check with you about what plans you might have had for integrating with uc_echecknet (http://drupal.org/project/uc_echecknet)? I cloned the uc_echecknet module and combined that with code from your authnet_uc module to get Ubercart working with saved CIM bank accounts (http://drupal.org/node/1766012) and with non-saved bank accounts (using AIM). In order to get this to work, I needed to patch the authnet_ui module to only return account types of 'bankAccount'.

I'm thinking that the uc_echecknet patch I have needs to be posted in that module's issue queue, but I would love to get your thoughts first.

Thanks!

Comments

pfrilling’s picture

StatusFileSize
new1.52 KB

The attached authnet_ui patch needs to be applied after the patch in #7 here: http://drupal.org/node/1766012#comment-6939400

This patch will allow us to filter the type of account that is returned. This is useful for authnet_uc to only display saved credit cards. This is also useful for integrating with uc_echecknet as we didn't want credit card accounts showing when a user wants to pay with echeck.

m.stenta’s picture

I doubt that we would integrate with uc_echecknet, unless absolutely necessary. A better approach would be for our core Authorize.net module to add support for processing echeck.net payments, and then add add code to the authnet_uc module to make that possible in Ubercart. I'm not very familiar with the way echeck.net payments work, however, so it would require some research. Any light you can shed on the matter would be greatly appreciated!

m.stenta’s picture

Our comments crossed... I posted before seeing your comment in #1.

I like this patch... makes sense. I still haven't had time to review the other patch you posted (http://drupal.org/node/1766012#comment-6939400), but I hope to soon. It seems like they will go hand-in-hand.

pfrilling’s picture

Processing an echeck payment using AIM is almost the same for both credit cards and echecks. The major difference is in the array we pass to the authnet_aim_transaction() function.

The _authnet_uc_aim_transaction() function has the $sale object with the following options.

$sale = array(
  'method' => 'CC', 
  'amount' => $uc_price,
  'card_num' => $order->payment_details['cc_number'],
  'exp_date' => $order->payment_details['cc_exp_month'] .'/'. $order->payment_details['cc_exp_year'],
  'card_code' => $order->payment_details['cc_cvv'],
  //... the rest of the options
);

To get an ECHECK to process we remove the options above and use the following options instead:

$sale = array(
  'method' => 'ECHECK',
  'bank_aba_code' => $order->payment_details['echeck_bank_aba_code'],
  'bank_acct_num' => $order->payment_details['echeck_bank_acct_num'],
  'bank_acct_type' => strtoupper($order->payment_details['echeck_bank_acct_type']),
  'bank_name' => $order->payment_details['echeck_bank_name'],
  'bank_acct_name' => $order->payment_details['echeck_bank_acct_name'],
  'echeck_type' => 'WEB',
  //... the rest of the options
);

As for CIM payments, both credit cards and bank accounts work the same.


My clients needs right now are for ECHECK and CIM to be integrated into their website. So, I went ahead and cloned the uc_echecknet module and made it work with the authnet module using both AIM and CIM based upon this patch (http://drupal.org/node/1766012#comment-6939400). I guess my question is: does it make more sense to roll the cloned module I have completed in with the authnet api OR keep the uc_echecknet module separate but dependent upon the authnet api module?

Let me know your thoughts.

m.stenta’s picture

I applied this patch (FYI it still applies cleanly against the new patches I just added: http://drupal.org/node/1766012#comment-6990170 and http://drupal.org/node/1900244#comment-6990172).

Questions/comments:

  • I notice you're changing the access control on the authnet/ajax/payment-type menu item. This probably makes sense, but would you mind describing your thoughts on this?
  • I like the idea of passing an argument into authnet_ui_payment_profile_options() to define what kind of payment methods should be returned, but do you think it makes sense to also provide an option for "all"? Maybe that should be the default, and using 'creditCard' or 'bankAccount' would allow you to filter.
  • Also, be sure to include a @param in the comments above that function describing the new argument.
  • Regarding uc_echecknet, based on your work, would it be possible to integrate echecknet functionality directly into the authnet_uc submodule?

Thanks again @pfrilling for all your work on this!

m.stenta’s picture

Just a heads up: the Ubercart integration module (authnet_uc) has been split out into a separate contrib: http://drupal.org/project/uc_authnet.

That shouldn't affect the patch in #1, but it will affect the other things you're doing probably.

m.stenta’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Issue summary: View changes

Moving this to 7.x-1.x queue because Drupal 6 is EOL tomorrow: https://www.drupal.org/drupal-6-eol