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.

Payments and Payment Gateway / APIs /

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

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

Payment Module Error ($fields undefined)


Reply


3 Posts   981 Views

Avatar
lennonrich

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:


[url="http://i.imgur.com/k5FHfRc.png"]Direct link[/url]

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!

Avatar
svandragt

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();

Avatar
lennonrich

Community Member, 2 Posts

1 May 2013 at 10:31pm

Heya,

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.