Hello,
awesome, I eventually ended with something *very* similar.
I was planning to expose my solution after the shop I am working on is
finished (I am very late on this project).
I made a lot of other changes and will have some suggestion to improve
Cartridge.
Regarding, the external payment stuff, we basically made the *same
thing* : using signal in my_app/models.py, retrieve order through ipn
stuff (I used order_uuid alone since I don't really now if it's a good
idea to let session keys travel through requests) and close the order.
to close the order, I did not mimic order.complete() code, but I call
the original code through a fake request. It's something like :
fake_request = HttpRequest()
fake_request.session = session
fake_request.cart = cart
order.complete(fake_request)
session.save()
I tried to implement some kind of IPN order status handling to complete
order only when status == "Completed" and not "Pending", and to trap
error to (for now, any other IPN status than completed or pending leads
to cancel the order).
E-mails are sent on order complete or cancel.
Besides, I use signals on order status transitions to have mail sent
automatically.
Finally, I wrote a little app to handle shipping services but I will
expose this later, since it's a whole subject and would require some
more code to be really usefull (basically, I would need another checkout
step to handle shipping service choice).
This is called ponyexpress and it allows to define shipping services
through admin. Each shipping service is associated to destination zones
(countries, for now) which are bound to price ranges depending on
weight.
Adding a weight field to ProductVariation then allow to calculate
shipping cost automatically for the chosen service, depending on
customer country.
While no order is made, the customer country is guessed from IP so an
estimated shipping cost can be provided in the shopping cart.
I find this pretty cool :)
I will publish this code and discuss it as soon as I have finish the
shop I am working on.
hope that will help too !
Luc