def credit(self, orig_txn): try: txn = facade.credit(orig_txn.comment1) except Exception, e: messages.error(self.request, _("Unable to credit transaction - %s") % e) return http.HttpResponseRedirect(reverse('paypal-payflow-detail', kwargs={'pk': orig_txn.id}))
def credit(self, orig_txn): try: txn = facade.credit(orig_txn.comment1) except Exception as e: messages.error(self.request, _("Unable to credit transaction - %s") % e) return redirect('payflow_dashboard:paypal-payflow-detail', pk=orig_txn.id) else: messages.success(self.request, _("Transaction %s credited") % orig_txn.pnref) return redirect('payflow_dashboard:paypal-payflow-detail', pk=txn.id)