Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » My config file code - Where am I going wrong?

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1475 Views
  • sjbmaine
    Avatar
    Community Member
    17 Posts

    My config file code - Where am I going wrong? Link to this post

    I am trying to setup my config file to work with PayPal in the eCommerce Module. (SS 2.2 and latest eCommerce version). The eCommerce documentation says, "To set up a PayPal payment, you need only the mail address of the account." (Does this mean I don't need the define payment code?) I inserted the code provided for setting the e-mail address, but when I upload this file to my server I receive the following message (this is a test install of SS installed at mysite.com/demo):

    Fatal error: Call to undefined method PayPalPayment::set_account_email() in /home/content/s/j/b/sjbmaine/html/demo/tutorial/_config.php on line 27

    This is the code from my config file. Can anyone point out where I am going wrong?

    <?php

    global $project;
    $project = 'tutorial';

    global $databaseConfig;
    $databaseConfig = array(
       "type" => "MySQLDatabase",
       "server" => "servername",
       "username" => "username",
       "password" => "password",
       "database" => "database",
    );
    SSViewer::set_theme("pixelgreen");
    Email::setAdminEmail('test@test.com');
    // Sites running on the following servers will be
    // run in development mode. See
    // http://doc.silverstripe.com/doku.php?id=devmode
    // for a description of what dev mode does.
    Director::set_dev_servers(array(
       '',
    ));

    // Check if the site is in 'live' mode, use the live credentials.
    // otherwise, use test credentials instead to be careful.
    if(Director::isLive()) {
       PayPalPayment::set_account_email('mymail@mydomain.com');
    } else {
       PayPalPayment::set_test_mode('mymailtest@mydomaintest.com');
    }   

    ?>

    Thank you!

  • Liam
    Avatar
    Community Member
    470 Posts

    Re: My config file code - Where am I going wrong? Link to this post

    I have no experience with the ecommerce module, haven't had to use it yet, but there is a good topic here about getting everything up and running. Maybe it can be of some help?

    http://www.silverstripe.com/extending-hacking-silverstripe-forum/flat/196242

  • sjbmaine
    Avatar
    Community Member
    17 Posts

    Re: My config file code - Where am I going wrong? Link to this post

    Thanks, for bringing this to my attention LeeUmm. I'll give it a whirl!

    1475 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.