Jump to:

2081 Posts in 1001 Topics by 452 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » how to setup paypal work with sanbox ?

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

Page: 1
Go to End
Author Topic: 620 Views
  • Kent
    Avatar
    Community Member
    5 Posts

    how to setup paypal work with sanbox ? Link to this post

    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

    620 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.