Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2014
    Location
    United States
    Posts
    3
    Plugin Contributions
    0

    Default Switching between multiple merchant accounts

    We have one store set up with zen cart that uses our main authorize.net account. We are now going to a franchise model and would like to process payments using our franchisee's merchant accounts based on a customer input (allow them to select "their" store before checkout). Is it possible to programatically set which merchant account (they may not all be authorize.net accounts, either) w/ all relevant credentials in zen cart? We have development resources, just want to make sure this is something that's possible and perhaps some pointers on where in zencart we would do this.

    Thanks!

  2. #2
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Switching between multiple merchant accounts

    You want to restrict/filter access to various payment methods during checkout?

    Add to the top of the payment processing files you want to restrict a filter that says something like this:

    if (customer ID = ' (The ID number you want to filter) ') {
    //allow payment method
    return true;
    } else {
    // do not allow payment method
    return false;
    }
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  3. #3
    Join Date
    Mar 2014
    Location
    United States
    Posts
    3
    Plugin Contributions
    0

    Default Re: Switching between multiple merchant accounts

    Thanks for the response. That is helpful, but I also want to be able to switch merchant accounts between the same payment method. So if two stores have different authorize.net accounts, I want to be able to switch which credentials are being used based on user action. Is this possible?

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default Re: Switching between multiple merchant accounts

    Quote Originally Posted by ueberbill View Post
    Thanks for the response. That is helpful, but I also want to be able to switch merchant accounts between the same payment method. So if two stores have different authorize.net accounts, I want to be able to switch which credentials are being used based on user action. Is this possible?
    The built-in payment modules (authorize.net, linkpoint_api, paypal) assume that the credentials are stored in the database and, thus, available via PHP define variables containing that database information. To have the credentials provided on a customer-by-customer (or order-by-order) basis is possible, but custom coding (and core-file overrides) would be required.

  5. #5
    Join Date
    Mar 2014
    Location
    United States
    Posts
    3
    Plugin Contributions
    0

    Default Re: Switching between multiple merchant accounts

    Thanks again. Forgive my limited PHP skills. I see where in the authorize.net module the login for the account is stored in MODULE_PAYMENT_AUTHORIZENET_LOGIN (presumably the define variable mentioned above) but I cannot find where it is set (and so override the code to select the login as necessary).

  6. #6
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Switching between multiple merchant accounts

    Quote Originally Posted by ueberbill View Post
    Thanks again. Forgive my limited PHP skills. I see where in the authorize.net module the login for the account is stored in MODULE_PAYMENT_AUTHORIZENET_LOGIN (presumably the define variable mentioned above) but I cannot find where it is set (and so override the code to select the login as necessary).
    More than likely in the database. Accessible through mysqladmin.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default Re: Switching between multiple merchant accounts

    Quote Originally Posted by mc12345678 View Post
    More than likely in the database. Accessible through mysqladmin.
    The value is stored in the database, in the configuration table. Changes to the payment module's processing will be required to effect the change desired.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Switching between multiple merchant accounts

    Quote Originally Posted by ueberbill View Post
    Thanks again. Forgive my limited PHP skills. I see where in the authorize.net module the login for the account is stored in MODULE_PAYMENT_AUTHORIZENET_LOGIN (presumably the define variable mentioned above) but I cannot find where it is set (and so override the code to select the login as necessary).
    Simple: You don't bother with changing where it's defined.
    Instead, you find every occurrence where that constant is used, and replace that constant with PHP code that determines the desired value to use instead.
    You may have to do similarly with a few other constants as well, since transaction-key and md5hash, etc are all intended to work in conjunction with one another per-account.
    You said you have development resources, so I'm assuming they'll understand what I've written here.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Multi Merchant Accounts
    By thecanuck in forum Addon Payment Modules
    Replies: 3
    Last Post: 25 Aug 2010, 05:47 PM
  2. Merchant Accounts
    By rfresh in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 8 Jan 2009, 10:30 PM
  3. switching PayPal accounts
    By wynnesome in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 24 Aug 2007, 03:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR