Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Payments and Payment Gateway / APIs /

This is a forum for discussing SilverStripe can-do payments and their APIs / Gateways.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Call to a member function setCurrency() on a non-object

Go to End

2 Posts   3575 Views


Community Member, 153 Posts

8 August 2010 at 2:25pm


I have just being trying out the standalone payment module with payment-test.

I have enabled the Donation options in and PayableAdmin.php and I can see this listed on the Payments page of the website.

Clicking the [Make a donation] button brings up the correct form to submit a donation. However completing the form, selecting the currency from the dropdown and submitting renders this error:
Fatal error: Call to a member function setCurrency() on a non-object in /home/site/public_html/greatbig/sapphire/forms/MoneyField.php on line 104

Have I configured something incorrectly?

I have the following versions installed:
SilverStripe v2.4.1
Payments v0.3
Payment-Test v0.1



Scott Farmer

Community Member, 49 Posts

7 March 2011 at 2:36pm

A bit of late reply, but hopes this helps others.

I had a similar problem. The solution for me was to enable the Donations extension in the _Config.php file.



Object::add_extension('ProductObject', 'Payable');
Object::add_extension('Donation', 'Payable');
//Object::add_extension('Ebook', 'Payable');
//Object::add_extension('MovieTicket', 'Payable');
//Object::add_extension('Member', 'ProductBuyer');


Then run /dev/build/?flush=1