custom payment module

4 views
Skip to first unread message

nostradamnit

unread,
Oct 1, 2008, 5:19:50 AM10/1/08
to Satchmo users
Hi,

I'm trying to create a simple payment module that will allow payment
by check or bank transfer. I copied the code from dummy and made the
changes in the Custom Payment Module documentation. When I activate
the module, the test site stops working, giving a "ViewDoesNotExist:
Could not import satchmo.payment.check.views. Error was: No module
named check.views" error.

I think my problem is very similar to the problem posted here (http://
groups.google.com/group/satchmo-users/browse_thread/thread/
92a94aa8f977b76f/27e2cb0d34ed43b3?lnk=gst&q=Custom+payment
+module#27e2cb0d34ed43b3) , but the poster never replied back...

Thanks in advance for you help,
Sam

nostradamnit

unread,
Oct 1, 2008, 11:16:04 AM10/1/08
to Satchmo users
Ok, I've overcome the ViewDoesNotExist error by modifying my urls.py
like this:

config = config_get_group('PAYMENT_CHECK')

urlpatterns = patterns('satchmo',
(r'^success/$', 'payment.common.views.checkout.success',
{'SSL':config.SSL.value}, 'CHECK_satchmo_checkout-success'),
)

urlpatterns += patterns('delices',
(r'^$', 'payment.check.views.pay_ship_info',
{'SSL':config.SSL.value}, 'CHECK_satchmo_checkout-step2'),
(r'^confirm/$', 'payment.check.views.confirm_info',
{'SSL':config.SSL.value}, 'CHECK_satchmo_checkout-step3'),
)

Simply += ing the correct search pattern ('delices' instead of
'satchmo') to urlpatterns fixed it.

Hopefully this we be helpful to someone someday :)

Sam

Bruce Kroeze

unread,
Oct 1, 2008, 11:16:38 AM10/1/08
to satchm...@googlegroups.com
On Wed, Oct 1, 2008 at 2:19 AM, nostradamnit <sam.cr...@gmail.com> wrote:

Hi,

I'm trying to create a simple payment module that will allow payment
by check or bank transfer. I copied the code from dummy and made the
changes in the Custom Payment Module documentation. When I activate
the module, the test site stops working, giving a "ViewDoesNotExist:
Could not import satchmo.payment.check.views. Error was: No module
named check.views" error.

Two things:

1) Use your own namespace, don't try to stick it in satchmo.payment.  Instead make a separate app such as "satchmo_check."

2) Add it to INSTALLED_APPS in settings.py, in order to get the models/views picked up.

--
Bruce Kroeze
http://gosatchmo.com

Alessandro Ronchi

unread,
Oct 7, 2008, 10:15:38 AM10/7/08
to Satchmo users


On 1 Ott, 11:19, nostradamnit <sam.cranf...@gmail.com> wrote:
> Hi,
>
> I'm trying to create a simplepaymentmodule that will allowpayment
> by check or bank transfer.

Did you managed to get out a working bank transfer payment module?
Why don't you contribute it to the community?

I need it too, maybe we can work on it together.

nostradamnit

unread,
Oct 15, 2008, 9:42:31 AM10/15/08
to Satchmo users
Hi Alessandro,

I haven't completed them yet, but I'm planning on contributing them
when it's done. Right now I've run into a problem with the latest
trunk version of Satchmo (see new posts) :(

I'll keep you up to date...

Sam

On Oct 7, 4:15 pm, Alessandro Ronchi <alessandro.ron...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages