• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: [SOLVED] How to get the parameters of a module ?
PostPosted: Wed Feb 22, 2012 1:20 pm 
Offline
Forum Members
Forum Members

Joined: Thu Jun 14, 2007 10:01 am
Posts: 26
Hi folks,

I'm trying to make a new payment gateway module.
I've based the module from the PaypalGateway one (by Ted and Calguy) but the behaviour is not exactly the same :
Paypal : create a form and post to paypal website
Citelis : create a form and post to a local php file

The local php have to get some parameters from the module (initially an include of a file).

I've set up these params in the admin section of the module and therefore i can access to them from CitelisGateway.module.php by a $this->GetPreference(...)

-> I can't pass the parameters as POST data (bank_id and password)

How can I do this the 'correct' cmsms way ?

Do i have to register a route to the post.php (action.post.php) to make this possible ?
Code:
 $this->RegisterRoute('/[Cc]itelis\/post\/(?P<returnid>[0-9]+)$/', array('action'=>'post'))


Any help or suggestion appreciated :)


Last edited by vinc on Fri Feb 24, 2012 8:17 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: How to get the parameters of a module ?
PostPosted: Fri Feb 24, 2012 8:17 pm 
Offline
Forum Members
Forum Members

Joined: Thu Jun 14, 2007 10:01 am
Posts: 26
Registering the route is fine :
As the page receiving the post data is an action of the module, you can access all the vars directly by $this->GetPreference(...)

Auto-Solved :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting