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.

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, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

how to setup paypal work with sanbox ?


Go to End


1469 Views

Avatar
taicait

Community Member, 5 Posts

8 June 2011 at 7:15am

Hi all,

I've used ecommerce-0.8.1rc1 and payment module
in ecommerce/_config.php

*******************
// Extend the Member with e-commerce related fields.
DataObject::add_extension('Member', 'EcommerceRole');
// Extend Payment with e-commerce relationship.
DataObject::add_extension('Payment', 'EcommercePayment');
//create controller for shopping cart
Director::addRules(50, array(
ShoppingCart::$URLSegment . '/$Action/$ID/$OtherID' => 'ShoppingCart'
));

// copy the lines below to your mysite/_config.php file and set as required.
// __________________________________START ECOMMERCE MODULE CONFIG __________________________________
//The configuration below is not required, but allows you to customise your ecommerce application - check for the defalt value first.
// * * * DEFINITELY MUST SET
//Order::set_email("your name <sales@myshop.com>);
//Order::set_subject("thank you for your order at www.myshop.com");
//Order::set_modifiers(array("MyModifierOne", "MyModifierTwo");

// * * * HIGHLY RECOMMENDED SETTINGS NON-ECOMMERCE
Geoip::$default_country_code = "NZ";
i18n::set_locale('en_NZ');
setlocale (LC_TIME, 'en_NZ@dollar', 'en_NZ.UTF-8', 'en_NZ', 'nz', 'nz');

Payment::set_supported_methods(array(
'ChequePayment' => 'Cheque Or Pay On Site',
'PayPalPayment' => 'PayPal (Credit Card)'
));

PayPalPayment::set_test_mode('selleraccountEmail');
********************************

When I submit checkout form, it redirect to paypal sandbox and display "Some required information is missing or incomplete. Please correct your entries and try again."

Anybody can help me ?
Thank you