This summarizes the backport to Drupal 7 for the Commerce Square Connect module.
Implementing the SDK
Since Drupal 7 does not have built in Composer/autoloading support we must pick a solution. While there is Composer Manager, I think that'd cause too much overhead for implementation (great for personal/client projects, not contrib.) XAutoload is possible, and allows pushing a composer.json into the Libraries definition; however, it has pretty bad performance.
Here are my two thoughts:
- Review registry_autoload and see if we can say "check for the SDK at sites/all/libraries/connect-php-sdk and register the lib as PSR-4
- Use the bundled autoload.php added to the SDK (
require('connect-php-sdk/autoload.php');), which we can point two via Libraries module.
I prefer the last option, as easiest.
Implementing the payment form
I have implemented Braintree's hosted fields in D7, which is the same as we have in Square. Review the JS and module code here: http://cgit.drupalcode.org/commerce_braintree/tree/modules/commerce_brai...
Customer API and Card on File
Review ease of implementing card on file via Customer API. Worth deferring as not in 8.x yet (because 8.x has no opt-in/out approach.)
Roadmap to the stable 7.x-1.0 release
- #2886221: Capturing transactions
- #2886222: Voiding transactions
- #2886223: Card on file support
- #2886224: OAuth token renewal
Original summary
Is there any intention for this to be available for Drupal 7? I have a client using Drupal Commerce on 7.x who has limited funds for a redesign, and is considering moving to Square entirely. It would be awesome if this could be used to retain them as a Drupal store. Their main goal is to keep inventory in sync over two locations, with web sales.
Comments
Comment #2
mglamanI can see. I know our original scope is Drupal Commerce 2.
Comment #3
rszrama commentedAgreed, I hope we can backport it once working, but I wouldn't expect that to happen (if developed by our team) until after DrupalCon Baltimore.
Comment #4
mglamanThis is now on the table! I'll be working to document porting plans here.
Comment #6
mglamanComment #7
mglamanComment #8
mglamanAnd assigned to czigor, as I know it'll be on his plate Monday :)
slavojzizek, we don't have initial plans for inventory sync. Just because it's still a v1 API which isn't over OAuth yet. But initial support could be patched in if you provide help writing it.
Comment #9
czigor commentedAdding roadmap.
Comment #10
mglamanThe backport is nearly done. We just need to make sure it's up to Drupal 7 coding standards. For instance there is PHP 5.4 short array syntax being used, which breaks PHP 5.3
Comment #11
bojanz commentedIt's safe to close this, since an initial functional port exists (and the short array syntax thing has been fixed)
Comment #13
jon pollard commentedHi There, sorry if this is the wrong place to post, but I'm trying to find a Drupal Commerce system to track online and offline stock levels. The customer has stock in the shop but also selling on the web.
Square looks like this might be a possibility, but I can't see from the docs whether this is functional in the Drupal 7 version or not. It would be really great if it was functioning. It would also be a reason to upgrade to D8 if inventory control was in the D8 version.