112 Posts in 33 Topics by 52 members
Payments and Payment Gateway / APIs
SilverStripe Forums » Payments and Payment Gateway / APIs » Call to a member function setCurrency() on a non-object
This is a forum for discussing SilverStripe can-do payments and their APIs / Gateways.
Moderators: martimiz, Howard, Sean, Normann, Ryan M., biapar, Willr, Ingo, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1764 Views |
-
Call to a member function setCurrency() on a non-object

8 August 2010 at 2:25pm
Hello,
I have just being trying out the standalone payment module with payment-test.
I have enabled the Donation options in PayablesDemoPage.ss 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 104Have I configured something incorrectly?
I have the following versions installed:
SilverStripe v2.4.1
Payments v0.3
Payment-Test v0.1Cheers,
Gary
-
Re: Call to a member function setCurrency() on a non-object

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.
e.g.
<?php
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
Cheers
| 1764 Views | ||
|
Page:
1
|
Go to Top |

