signalpoint / commerce

The Drupal Commerce module for DrupalGap.
8 stars 10 forks source link

drupalgap authnet #8

Open chrisschaub opened 10 years ago

chrisschaub commented 10 years ago

We've been working on a drupalgap authorize.net payment gateway that uses commerce, commerce_cardonfile and commerce_authnet along with the relavent drupalgap mods. Looking at commerce_drupalgap_stripe as a model, we've created commerce_drupalgap_authnet for authorize.net AIM and CIM. I've implemented the card fields as a form alter of the commerce checkout form. That was better for our client's workflow, a single page for virtual services/goods. I've noticed the later versions of commerce for drupalgap are starting to have a panes approach, the checkout broken into steps. This does present some issues related to card storage. I'd like to contribute back our authorize.net stuff. I was also thinking about making our approach a separate module that collapses the panes into a single page, a commerce_onepage_checkout module? Just trying to reconcile the single page, form alter, approach with the direction of the commerce mod for Drupalgap. Any feedback or comments are very welcome.

signalpoint commented 10 years ago

@chrisschaub nicely done, I'm anxious to see this work.

I'd recommend implementing hook_menu() in your authorize.net module for DrupalGap, and make a page with a path of:

checkout/payment/%

This would then work with DrupalGap/Commerce core. This would be similar to the hook_menu() implementation in Commerce DrupalGap Stripe:

https://github.com/signalpoint/commerce_drupalgap_stripe/blob/7.x-1.x/commerce_drupalgap_stripe.js

I'd then use custom form alteration's in your clients custom module(s) to accommodate their UI needs. That way your module will work with DrupalGap/Commerce core, and you can keep your client's customizations aside.

For all of this, I will defer to @scotthooker for his thoughts on the topic(s).

scotthooker commented 10 years ago

I couldn't comment on the use of card on file as I never implemented that in the stripe module. The stripe module was a very quick demo we put together for DrupalCon Austin. The logic is sound but the implementation is perhaps a little rushed.

Will happily review the code for authorise.net but as @signalpoint says if your only using the one payment gateway for the app then a menu path of checkout/payment/% is a good way to go.