I've copied the dummy from satchmo to myproject.payment.modules.postepay
I've added myproject.payment to INSTALLED APPS
I've added the module to local_settings.py as:
'CUSTOM_PAYMENT_MODULES' : ['myproject.payment.modules.postepay'],
but I still doesn't see the module on the list of payment modules on settings.
What's wrong?
--
Alessandro Ronchi
Skype: aronchi
http://www.alessandroronchi.net
SOASI Soc.Coop. - www.soasi.com
Sviluppo Software e Sistemi Open Source
Sede: Via Poggiali 2/bis, 47100 Forlì (FC)
Tel.: +39 0543 798985 - Fax: +39 0543 579928
Rispetta l'ambiente: se non ti è necessario, non stampare questa mail
I solved my problem.
I am working to a custom bank payment module.
The only thing I need is to show some configuration values to the user
, like one does for a bank money order (I must show him my bank
details to let him do it's payment outside the site), and send him
that values by email.
is it possible to print the values of config_register_list in templates?
I need only to access to
config = config_get_group('PAYMENT_POSTEPAY')
inside my confirm.html custom template.
And can I customize the email of the order to send the user my
configuration values?
--
Alessandro Ronchi
Skype: aronchi
http://www.alessandroronchi.net
Rispetta l'ambiente: se non ti è necessario, non stampare questa mail
Yes, just store the value in the context before rendering the confirm.html
template.
Im my version, which is a very old one so 'm not sure if the code
is still the same, it would look like:
base_env = {
'PAYMENT_LIVE' : payment_live(payment_module),
'default_view_tax' : default_view_tax,
'ronchi-value' : some value out of config, <<<----- your
data
'order': orderToProcess,
'errors': errors,
'checkout_step2': lookup_url(payment_module,
'satchmo_checkout-step2')}
if extra_context:
base_env.update(extra_context)
context = RequestContext(request, base_env)
return render_to_response(template, context)
> And can I customize the email of the order to send the
user my configuration values?
Yes, simply extend the context of the mail rendering, see an example at
http://dpaste.com/83018/. There the shop name is put into context and used
in the rendering process.
Ginta
> Yes, just store the value in the context before rendering the confirm.html
> template.
I have managed to patch the credit_confirm_info for my needs, I thinks
it's a generic useful mod:
~~~~~~~~~~~~~~~~~~~~~~~~~~
controller = ConfirmController(request, payment_module)
if template:
controller.templates['CONFIRM'] = template
# Get group of configuration settings for payment_module
config_group = config_get_group(payment_module)
if config_group:
controller.extraContext['config'] = config_group
controller.confirm()
return controller.response
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So in your template you can print details of the payment configuration, like:
{{config.CCNUMBER}}
or
{{config.CARDOWNER}}
I've posted it here:
http://www.satchmoproject.com/trac/ticket/625
--
Alessandro Ronchi
Skype: aronchi
http://www.alessandroronchi.net
SOASI Soc.Coop. - www.soasi.com
Sviluppo Software e Sistemi Open Source
Sede: Via Poggiali 2/bis, 47100 Forlì (FC)
Tel.: +39 0543 798985 - Fax: +39 0543 579928
Rispetta l'ambiente: se non ti è necessario, non stampare questa mail