# -*- coding: utf-8 -*-
# to interact with it in a tidy way (look ma', no imports!)
def simple_view(self, request): """ This simple view does nothing but record the "payment" as being complete since we trust the delivery guy to collect money, and redirect to the success page. This is the most simple case. """ # Get the order object the_order = self.shop.get_order(request) # Let's mark this as being complete for the full sum in our database # Set it as payed (it needs to be payed to the delivery guy, we assume # he does his job properly) self.shop.confirm_payment(the_order, self.shop.get_order_total(the_order), "None", self.backend_name) return HttpResponseRedirect(self.shop.get_finished_url())
url(r'^$', self.simple_view, name='pay-on-delivery' ), )
|