Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

thomasWajs/cartridge-external-payment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cartridge-external-payment

Integration of Cartridge/Mezzanine with payment providers that requires to redirect the buyer on a form on their platform.

Installation

Working in your project's virtualenv:

git clone https://github.com/thomasWajs/cartridge-external-payment.git
cd cartridge-external-payment
python setup.py install

Application

Add 'cartridge_external_payment' to your settings.INSTALLED_APPS, before 'cartridge.shop'

Order Form

Set the alternative OrderForm class for the checkout process (see cartridge documentation):

SHOP_CHECKOUT_FORM_CLASS = 'cartridge_external_payment.forms.ExternalPaymentOrderForm'

Order Form

Add an extra field to the Order, so we can follow which order has been payed succesfully

		(
            "cartridge.shop.models.Order.payment_done",
            "BooleanField",
            (u"Payment effectué",),
            {"default": False},
        ),

Urls

You must includes the cartridge_external_payment urls in your urls configuration file, before the cartridge inclusion :

urlpatterns = patterns("",
	("^shop/", include("cartridge_external_payment.urls")),
	("^shop/", include("cartridge.shop.urls")),
	[...]
)

Payment provider connector

You must define the connector that will allows to start the payment process and retrieve order datas when the buyer comes back. The connector should implements the providers.base.PaymentProvider interface.

SHOP_PAYMENT_PROVIDER = 'cartridge_external_payments.providers.be2bill.Be2BillProvider'

You can find an exemple implementation by looking at the providers directory.

About

A module for Mezzanine/Cartridge that allows payment on an external provider platform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages