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.

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Pyapal and Ecommerce


Reply


2 Posts   1483 Views

Avatar
jhopong

Community Member, 1 Post

9 September 2009 at 3:10am

Hi, guys! I'm trying out Silverlight and trying to build a test ecommerce website. I'd like to know where I can get the codes for customizing the ecommerce module to use Paypal. I've been trying to go around the forums posts but I am getting some old posts that may no longer be applicable with the latest SS build.

(Please put in the link to downloadable codes 'coz I'm a lazy ass. lol )

Thanks, guys and happy coding!

Avatar
runnerman

Community Member, 24 Posts

14 September 2009 at 5:18am

Hi jhopong,

To enable the ecommerce module to use payment sites such as paypal in the latest version of ecommerce you need to install the payment module.

To get my paypal working I upgraded silverstripe to version 2.3.3 and installed ecommerce 0.6 beta 1 ([url]http://silverstripe.org/assets/Uploads/ecommerce-0.6-beta1.tar.gz[/url] and payment 0.1 ([url]http://silverstripe.org/assets/Uploads/payment-0.1-beta1.tar.gz[/url]).

Then, within your _config.php file, add the following lines:

//E-commerce settings

// Define which payment methods your site uses.
Payment::set_supported_methods(array(
'ChequePayment' => 'Cheque',
'PayPalPayment' => 'Credit/Debit Card'
));

// 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('youraddress@yourdomain.co.uk');
} else {
PayPalPayment::set_test_mode('yourtestaddress@yourdomain.co.uk');
}

Change 'youraddress@yourdomain.co.uk' and 'yourtestaddress@yourdomain.co.uk' to the email address associated with your paypal account that is set up for payments and/or testing.

I hope this helps!