Capture on shipment works, but admin save overwrites OrderAuthorization.complete

Create issue
Issue #1197 new
fairview created an issue

I'm working on a payment module for Braintree's Transparent Redirect API, which supports delayed capture. I've found that when you add the Shipped status to the order in the admin, the signal fires and the processor marks the authorization complete, but then the admin overwrites that change when saving the authorization as it was on the screen.

Does this happen with Authorize.Net, too? Do you have any suggestions for preserving the right status?

Thanks, John

Comments (5)

  1. Chris Moffitt repo owner

    Let's try posting this to the mailing list to see if we can get some feedback. It does sound like an issue, I'm just not sure what the solution is.

  2. fairview reporter

    Adam: no, unfortunately. I never got a response on the mailing list, so I guess people are either living with it or just capturing immediately. If you do that, there's no problem. If you want the Braintree code, you can get it from my fork:

    It's all contained in this changeset:

    The client I wrote it for is still not in production; if you're willing to try it, I'd appreciate any feedback.

  3. marconius

    I did not come across your message on the mailing lists, but I posted on the satchmo_user list and, after many months, got no replies. This lead me to believe that the majority of people are using the payment modules with the CAPTURE setting set to True like John says, or without auth/capture capabilities at all. I am therefore proposing that payment.listeners.capture_on_ship_listener be removed completely from the project with pull request #62.

    Here is why:

    • The idea behind the listener is not very intuitive. Why would you ship first and then capture? Usually my clients want the inverse order.
    • I can't think of a good reason why the OrderStatus model in shop should be communicating directly to the Processor classes in payment. Edit: ok, I get that they are not communicating directly, but still ... what does shipping have to do with capturing authorizations?
    • I personally don't like using listeners unless it is absolutely necessary and as a last resort. Is it just me that thinks this way? Am I not "getting" signals? Edit: OK, I wasn't getting signals: they are good, but still ... I doubt that update_status should be shooting off signals that cause payments to be saved in the middle of the order that they are dependent on being saved.
  4. Log in to comment