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.

Archive

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

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

can't get paypal working


Reply

621 Views

Avatar
Briohny

19 September 2008 at 3:07am Community Member, 199 Posts

I've followed all instructions in http://doc.silverstripe.com/doku.php?id=modules:ecommerce however when i add the code:

// Define which payment methods your site uses.
Payment::set_supported_methods(array(
   'PaypalPayment' => 'Credit card (Paypal)'
));

My checkout page doesn't appear. Instead it returns a HTTP 500 error. If i change it to 'WorldpayPayment' it works fine.

This line of code also returns an error:

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

Any ideas?
Thanks