Have you seen this: https://github.com/explodes/cartridge-payments ?

I've been using it recently as a reference. It uses a callback_uuid to 
uniquely identify orders before POSTing to paypal etc..

If you have the time, install it on a fresh cartridge and see how it works, 
some really handy stuff in there. Pay most attention to line 33 
of 
https://github.com/explodes/cartridge-payments/blob/master/payments/multipayments/forms/paypal.py

Good luck!

On Monday, 30 May 2016 21:49:41 UTC+1, Reino Wallin wrote:
>
> Thank you for helping out Eduardo.
>
> Since I enabled the confirmation step I modified the confirmation.html 
> template with the action attribute, and the page at DIBS loads properly.
>
> However I can't figure out how to access the Django order model instance 
> in my customized OrderForm. The order model instance is supposed to be 
> passed to the checkout in the final step.  
>
> I suppose the final step can be checked with:
>
> is_last_step = step == checkout.CHECKOUT_STEP_LAST
>
> I need the values of the 'total' and 'id' attributes in the order model 
> instance, to be added to the form that is posted to DIBS.
>
> In my customized OrderForm I tried 
>
> if is_last_step:
>     self.save(commit=False)
>     order = self.instance
>     self.fields['orderid'].initial = order.id
>
> Why doesn't it work? What is the best approach to access the order model 
> instance in the last step in the order form?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to