Your account is limited to posting only in the Pre-Sales Questions forum.
Support forum access is limited to members with a purchase history.

If you are working on behalf of another member, please contact us with the name of the license holder and we will upgrade your account.
   
 
Ability to set payment GW via config.php (to ease multistage deployment)
Posted: 20 December 2010 07:54 AM   [ Ignore ]
Wallflower
Rank
Total Posts:  7
Joined  2010-07-19

It would be great if it were possible to set the payment gateway via config.php as well as via the extension settings.

My use case is this - I have a live CT site that I do ongoing development for - in addition to the live site I have a local install and a staging site.

I’d like to be able to have CT set to use my live payment gateway on the live site, but switch to dev simple for my local install and my providers test GW for the staging site. Right now I have to go in and change the GW setting every time I pull down a new copy of my production db, or push up the db to my staging site (which I do a couple of times a day).

I already set database connections/server paths etc using config.php vars (and as I understand it it’s relatively straightforward to set additional extension settings in config.php too) so being able to set my GW there would avoid potential pain such as failing to change from the live GW on my staging site.

Cheers…

Profile
 
 
Posted: 20 December 2010 09:14 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

You might be able to use a config.php variable in combination with PHP to manually set the selected gateway in the session

Use debug info to see the structure and content of the CT session array.

{exp:cartthrob:debug_info view_all="yes" 

http://cartthrob.com/docs/tags_detail/debug_info


OR you might be able to use set_config to launch a specific gateway based on conditions… or manually by visiting a page.

{exp:cartthrob:set_config}
{set_payment_gateway value
="authorize_net"}
{
/exp:cartthrob:set_config} 
 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile
 
 
Posted: 20 December 2010 03:00 PM   [ Ignore ]   [ # 2 ]
Wallflower
Rank
Total Posts:  7
Joined  2010-07-19

Thanks Chris, I’ll have a monkey about with {exp:cartthrob:debug_info}

Profile