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've moved the forum!

Please use for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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

Payment Module Error ($fields undefined)

Go to End

3 Posts   4121 Views


Community Member, 2 Posts

1 May 2013 at 9:50pm

Edited: 01/05/2013 9:51pm

Hello all :)

I've recently inherited a website that we were told was complete, however it still has a few kinks that I'm trying to figure out (I'd never touched SilverStripe before this) but there's one that's completely stumped me with the payment gateway. After adding items to the cart and pressing "Place order and make payment", I get the following error:

Direct link

I've tried following through the information provided in the Trace section, as well as various Google options, but not being familiar with SilverStripe I don't know if I'm following serious leads or dead ends, and so I'm hoping someone here could point me in the right direction :(

Many thanks for your help in advance!


Community Member, 44 Posts

1 May 2013 at 10:30pm

As far as I can tell from that screenshot, the $fields variable is not declared so PHP cannot append an array item to it.
Somewhere earlier in that method you should ensure there is a line like

$fields = array();


Community Member, 2 Posts

1 May 2013 at 10:31pm


Thanks for this. I did try this earlier, but then it caused the entire site not to load (was giving Server 500 errors). As soon as I removed the declaration the site came back.