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 forum.silverstripe.org 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.

Archive /

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

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

eCommerce Orders


Go to End


13 Posts   4504 Views

Avatar
grilldan

Community Member, 135 Posts

23 September 2008 at 7:51pm

Try changing:

Payment::set_supported_methods(array(
'WorldpayPayment' => 'Credit card (Paypal)'
));

to

Payment::set_supported_methods(array(
'PayPalPayment' => 'Credit Card'
));

That should do the trick.

Avatar
Briohny

Community Member, 199 Posts

23 September 2008 at 8:49pm

Thanks grilldan. That solved half my problem. It now recognises Paypal but when you hit 'place order and make payment' the following error appears:

Fatal error: Call to a member function validate() on a non-object in C:\wamp\www\isa\sapphire\forms\CompositeField.php on line 213

Also if i add the following code into the _config.php file:

// 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');
}

I get the following error:

Fatal error: Call to undefined method PayPalPayment::set_account_email() in C:\wamp\www\isa\mysite\_config.php on line 48

Hope you can help. Thanks again.

Avatar
grilldan

Community Member, 135 Posts

24 September 2008 at 5:49am

Instead of using mysite/_config.php try using ecommerce/_config.php.

Avatar
Briohny

Community Member, 199 Posts

24 September 2008 at 8:24pm

Thanks grilldan. Tried that with no luck. Same error is appearing. Any other ideas?

Avatar
Briohny

Community Member, 199 Posts

24 September 2008 at 9:15pm

Ok, so it looks like the Paypal instructions page is out-of-date. For anyone else having this same issue, the answer can be found here:

http://www.silverstripe.com/extending-hacking-silverstripe-forum/flat/42312?start=16

Go to Top