[mezzanine-users] External payment processing Cartridge

2016-05-23 Thread 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.


Re: [mezzanine-users] External payment processing Cartridge

2016-05-23 Thread Eduardo Rivas
I remember doing something similar. My general approach is to set the 
form's "action" attribute to the external site, so the actual POST 
request is handled by them. This request usually has just the amount and 
maybe a charge description and ID. Then the user is taken to their site, 
and inputs all the credit card data. The payment processor should let 
you define a "return" url, and the user should come back to your site 
via that. You have to create a view that will handle GET or POST params 
to complete the Order instance in Cartridge. After that you can redirect 
to the Order receipt or the Order history.


--
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.


Re: [mezzanine-users] Code changes for Product Import and Export as part of Product Admin panel using Product_db code.

2016-05-23 Thread Stephen McDonald
Contributions happen via Github, not the mailing list.

Could you put together a pull request on GitHub? That would be awesome,
thanks!

On Sat, May 14, 2016 at 3:38 AM, Sathish Anton 
wrote:

> Import and export admin panel added using product_db code.
>
> 1. cd  ..lib/python2.7/site-packages/cartridge/shop/templates/admin
> 2. mkdir import_export
> 3. copy the following attached files to above directory
>3.1. base.html
>3.2 change_list.html
>3.3 change_list_import_export.html
>3.4 export.html
>3.5 import.html
> 4.  replace ..lib/python2.7/site-packages/cartridge/shop/admin.py with the
> attached admin.py file.
>
> 5. replace ..lib/python2.7/site-packages/cartridge/shop/forms.py with the
> attached forms.py file.
>
>
> 6. python manage.py runserver
>
> 7. go to http://127.0.0.1:8000/admin/shop/product/
>
> 8. Find import and export as part of admin panel
>
> 9. Import require parent dir of images to be copied for the product.
> 10. So place product images in the above directory before performing an
> import.
>
> --
> 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.
>



-- 
Stephen McDonald
http://jupo.org

-- 
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.