Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 9
Payment Module - Quickbooks Merchant Services
 
evisboy
Member
 
Avatar
Total Posts:  65
Joined:  2008-09-24
Washington, DC
 

I am creating a payment module for integration with Quickbooks Merchant Services (QBMS). I can create the authorization and capture. However, my client has a particular problem that I want to know how to deal with properly.

They want to accept orders (auth request is sent to QBMS), capture a % of the amount, and then capture the REMAINING amount at a later date.

For example, the order total is $1000.00. Info is sent to QBMS and, if everything is good, the order goes through and is marked pending. An invoice is created within 30-days for that order for the amount of, let’s say, $500.00. That money is captured via QBMS and magento registers a remaining balance of $500.00. Now, let’s say that 5 months from now the product ships (this order was basically a pre-sale) and we want to capture the remaining amount. Since Magento does not store the CC security code and the authorization has expired, how would I capture the remaining funds? Perhaps merchant services (I am sure they are all similar) allow you to perform a sale (auth and capture) on an expired authorization? Does anybody know?

A similar way to think about this would be a backorder. How does Magento handle backorders purchases with credit card. A product is backordered and when it is back in stock how would I finalize the transaction? I have been looking at the Google Checkout Code but I am still quite confused as to the exact methods, etc. 

IN summary, my questions are:
1) Do merchant services (google, paypal, authorize.net, etc.) allow you to run a capture on an expired authorization?
2) How does Magento handle backorders or CC transactions in general after a long period of time?

I hope this is all clear.

 
Magento Community Magento Community
Magento Community
Magento Community
 
liamstask
Jr. Member
 
Total Posts:  16
Joined:  2008-09-04
 

I can’t help in terms of Magento specifically but I’ve gone through this issue with Paypal and it’s a pain - once the 30 days have expired, the authorization is no longer good and you need to re-authorize, which requires action by the customer/buyer.  There must be some other credit card processing services that don’t have this restriction, but Paypal at least is not one of them.  Perhaps QB is more lenient? 

BTW, I’m definitely interested in your QB payment module - please keep us posted!

 
Magento Community Magento Community
Magento Community
Magento Community
 
evisboy
Member
 
Avatar
Total Posts:  65
Joined:  2008-09-24
Washington, DC
 

Liamstask, I’ve completed the module for my uses and plan to clean it up a bit before releasing. You are correct in that authorizations expire after a certain amount of time. The only way to deal with this is by creating a new authorization / capture at the time of ship.

The way I dealt with this particular issue was to create an authorization at order creation for .01 cents. This basically allowed me to ensure that the credit card was ok as QBMS returns an error otherwise. Since the product ship date is so far away, I did not want to do a full authorization since it would be an annoyance for the customer. Order is created and set to pending. CC information is stored (CC # is encrypted and CC code is NOT stored due to legal reasons). When the item is ready to ship, the store owner creates one or more invoices. Each invoice triggers a SALE request (authorization + capture) with quickbooks. If there is a problem (not enough funds, etc.) then QBMS returns an error and the store owner can place the order on HOLD or CANCEL.

So, in summary,
1) Authorization is .01cents of TOTAL since ship date is so far away (by law in some states, like CA, you cannot charge for a product unless it is within 48-hours of ship. Exception is built-to-order / custom products.)
2) Store owner creates invoice which triggers a new authorization / capture with QBMS and money is transferred.
3) Assuming everything is ok, shipment is created and order is completed.

Since my client’s particular needs are unique, I plan to modify the code to be more standard --- order triggers an authorization for the full amount. Invoices capture on that initial authorization. Of course, I am willing to share other code as well.

Hope this helps.

 
Magento Community Magento Community
Magento Community
Magento Community
 
liamstask
Jr. Member
 
Total Posts:  16
Joined:  2008-09-04
 

That sounds like a reasonable workaround for those kinds of situations.  I suppose it would be nice to have a switch to either use that strategy or to just authorize the total amount as normal, based on whether you have stock of a particular product, etc.

Looking forward to your release!

 
Magento Community Magento Community
Magento Community
Magento Community
 
evisboy
Member
 
Avatar
Total Posts:  65
Joined:  2008-09-24
Washington, DC
 

I thought about that, but I have not figured out how to set this up in the case that you want to switch b/t both systems depending upon a product category. For example, Widgets are authorized and captured the standard way, but Twidgets are to be shipped far out in the future and you only want to authorize for x amount. I would need to set up a shopping cart rule that triggers this action based on condition (sku / category / etc.). My experience so far with the shopping cart has been less than stellar since shopping cart performs conditions on a per item basis. I suppose I need to learn more about Magento and a solution will come. In this short-term you can expect my standard code.

 
Magento Community Magento Community
Magento Community
Magento Community
 
liamstask
Jr. Member
 
Total Posts:  16
Joined:  2008-09-04
 

Great - will you post a link to your code from this thread, or is there another spot that would be best to keep an eye on?

 
Magento Community Magento Community
Magento Community
Magento Community
 
evisboy
Member
 
Avatar
Total Posts:  65
Joined:  2008-09-24
Washington, DC
 

The QBMS module is now done. I just need to add the code to auto create the new tables in the database. Regardless, I would be willing to release the code should anybody want to see it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
liamstask
Jr. Member
 
Total Posts:  16
Joined:  2008-09-04
 

Nice work!  I’d be interested in taking the code for a spin on a test magento install to see how it goes, and provide any relevant feedback, etc.  Are you considering hosting it in a google code (or similar) style repository?  Would be nice to have the wiki and issue tracking to gather notes and bugs.

 
Magento Community Magento Community
Magento Community
Magento Community
 
evisboy
Member
 
Avatar
Total Posts:  65
Joined:  2008-09-24
Washington, DC
 

I am going to standardize the code, add the code to create the tables automatically, and upload as a new module to magento. With luck, it will be done by next week.

Below is a *modified* copy of a response I sent to someone soliciting information on the module. The reason I am posting it is because others may need help creating something similar. Feel free to contact me for more info.

----------------begin email-------------------------

I am working on synchronization with Quickbooks Online for this same client. Interfacing with QB Online is different than interfacing with the QB client software. T-Hub seems like the only option for interfacing with QB client (and it’s not open-source or free), but I seem to be the only person developing anything for QB Online.

My plan, should it interest you, is to sync sales orders and clients with QB Online. Unfortunately, QB online is a bit limited as to what you can do, but that’s what my client uses. At the moment, I have completed the following for my client:

* created a new payment module to interface with QB Merchant Services directly;
* automatically create invoices after order creation (triggering a capture w/ QB Merchant Services)
* generate a CSV in proper format with day’s orders and send to fulfillment center for shipment
* upon successful sending of csv, automatically generate shipment and complete order
* created a wholesale site that does all of the above as well w/ tier pricing to control minimums

Wholesalers must register on the site and are put into pending status. I have code that automatically sends an email to the site owner when someone registers as a potential wholesaler. The only manual piece is that the owner, upon receiving the email, must go into the admin and change the solicitor from pending wholesale to wholesale. At that point a notification is sent to the solicitor notifying them of their new status as a wholesaler. I control access to the wholesale site with PHP code that redirects the user to the wholesale login and registration page if they are either: a) not logged in or b) not part of the wholesale group. This is done to ensure that visitors without the proper rights do not see the wholesale prices / information. All of these pages are blocked in robots.txt.

Of course, credit memos must be done by hand.

As you can see, with a site getting many orders per day, the order to shipment process is nicely streamlined and automated. The next piece, as I mentioned, is to sync with Quickbooks Online.

----------------End Email---------------------------------

 
Magento Community Magento Community
Magento Community
Magento Community
 
AdamM
Jr. Member
 
Total Posts:  9
Joined:  2008-04-18
 

Thanks for releasing this module!  It might make the difference to whether I can use Magento for the retail site I’m working on.

One (perhaps silly) question though: does your QBMS module talk to QBMS through QB Online, or could it be used (along with a separate order syncing system) to process transactions for a client that uses the QBMS and desktop QuickBooks?

 
Magento Community Magento Community
Magento Community
Magento Community
 
evisboy
Member
 
Avatar
Total Posts:  65
Joined:  2008-09-24
Washington, DC
 
AdamM - 07 November 2008 07:55 PM

One (perhaps silly) question though: does your QBMS module talk to QBMS through QB Online, or could it be used (along with a separate order syncing system) to process transactions for a client that uses the QBMS and desktop QuickBooks?

The module interfaces with QBMS directly. QB Online is a completely separate entity (and that code is in progress). My QBMS module is a stand-alone payment module and you can use your own syncing system for desktop.

 
Magento Community Magento Community
Magento Community
Magento Community
 
greensweater
Jr. Member
 
Total Posts:  1
Joined:  2008-11-10
 

Can we get this payment module? Are you adding the code to the community extensions?

 
Magento Community Magento Community
Magento Community
Magento Community
 
evisboy
Member
 
Avatar
Total Posts:  65
Joined:  2008-09-24
Washington, DC
 

I am standardizing the code in my free time and will release to the community. The first release is the QBMS payment module. After that I will submit the QB online module (needs to be developed and tested first).

 
Magento Community Magento Community
Magento Community
Magento Community
 
liamstask
Jr. Member
 
Total Posts:  16
Joined:  2008-09-04
 

Any updates? smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
evisboy
Member
 
Avatar
Total Posts:  65
Joined:  2008-09-24
Washington, DC
 

I am going to comment the code now and later this afternoon I will upload to Magento.

 
Magento Community Magento Community
Magento Community
Magento Community
 
swissters
Member
 
Total Posts:  31
Joined:  2008-04-23
 
evisboy - 18 November 2008 10:43 AM

I am going to comment the code now and later this afternoon I will upload to Magento.

Oh boy! I have been waiting for this for a long time! Thank you!!!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 9