pythonauthorize.netsatchmo

Does Satchmo's Authorize.net payment module support MasterCard partial authorizations?


I have a Django app that uses Satchmo in conjunction with Authorize.net. Authorize.net is now supporting partial authorization for MasterCard and Discover cards, as noted here and here. Does anyone know if these changes are supported by the Authorize.net payment module in Satchmo? I found a mailing list thread on the subject, but the answer wasn't clear from that.

(I've posted this same query to both the Satchmo users' list and Satchmo developers' list, and asked in the IRC channel, with no reply. The Satchmo project largely seems to be dead, so I'm hoping someone here can help.)


Solution

  • The short answer is no, Satchmo's Authorize.net module does not support partial authorization out of the box. The long answer, though, is that it may be easier than you think to create what you want:

    1. This documentation describes exactly what you need in order to post a partial payment to the Authorize.net system:

      • Send x_allow_partial_auth=true with an individual transaction.
      • When the first transaction is successfully approved for a partial amount of the total order, a split tender ID is generated and returned. You must pass this value back in the following transactions with x_split_tender_id=<value>. (If you include both a split tender ID and a transaction ID on the same request, an error results.)
    2. The Satchmo documentation describes how to create custom payment modules.

    If you look at the source code for the Authorize.net payment module in /payment/modules/authorizenet/processor.py, you can see most of the work is already done for you. You can either extend that Authorize.net class or just copy & paste the code into a new module at, say, /payment/modules/authorizenetpartial/ and make the adjustments as noted on the Authorize.net documentation. Just substitute that x_split_tender_id in place of your x_trans_id, and possibly a few other trial-and-error tweaks, and you should be good to go.