Den måndag 23 maj 2016 kl. 21:55:01 UTC+2 skrev Reino Wallin:
>
> I am in the process of creating a payment app for Cartridge. It is an 
> external payment gateway for the scandinavian provider DIBS. In the 
> checkout process the customer is supposed to be redirected to a web page at 
> DIBS and fill in credit card data, or even select other payment methods 
> that DIBS offers.
>
> I figure creating a payment processor, a function that is called on submit 
> of the payment checkout step (def process(request, order_form, order)) 
> seems to be wrong way to go. I wonder what is the right way to go.
>
> Since I don't want the credit card stuff in Cartridges checkout process, I 
> suppose I have to override the OrderForm with something like this:
>
> class DibsPaymentOrderForm(OrderForm):
>
>     def __init__(self, *args, **kwargs):
>         super(DibsPaymentOrderForm, self).__init__(*args, **kwargs)
>         del self.fields['card_expiry_year']
>
> for field in ('card_name', 'card_type', 'card_number', 
> 'card_expiry_month', 'card_ccv'):
>     del DibsPaymentOrderForm.base_fields[field]
>
> All hints are welcome. Should I write a check_out_steps(request) function 
> in my view.py? Should SHOP_PAYMENT_STEP_ENABLED be set to False och True? 
> How is the actual redirecting to the webpage at DIBS done in Cartridge?
>
> I have seen some external payment solutions at github, but they seem 
> rather outdated and fairly complex.
>
> Python 3.5.1
> Django 1.9.6
> Mezzanine-4.1.0
> Cartride 0.11.0
>

-- 
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 mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to