Jump to:

2076 Posts in 857 Topics by 449 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » Paypal Integration NOT working...

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 2 3 4
Go to End
Author Topic: 6152 Views
  • alexbalanoff
    Avatar
    Community Member
    8 Posts

    Paypal Integration NOT working... Link to this post

    So testing out the Ecommerce 0.6 and Payment module, at first glance they seem all good! The AJAX seems to be working, etc. There is a problem when you proceed to checkout it doesnt seem to be able to pass some variables across, I get the following error:

    //////////////////////////////
    [Warning] Invalid argument supplied for foreach()
    POST /checkout/OrderForm

    Line 158 in /home/www/web567/web/payment/code/PayPalPayment.php
    Source

    149       // 2) Main Settings
    150       
    151       $url = self::$test_mode ? self::$test_url : self::$url;
    152       $inputs['cmd'] = '_cart';
    153       $inputs['upload'] = '1';
    154       
    155       // 3) Items Informations
    156       
    157       $cpt = 0;
    158       foreach($items as $item) {
    159          $inputs['item_name_' . ++$cpt] = $item->TableTitle();
    160          // item_number is unnecessary
    161          $inputs['amount_' . $cpt] = $item->UnitPrice();
    162          $inputs['quantity_' . $cpt] = $item->Quantity;
    163       }
    164
    //////////////////////////////

    However, the recommended SS CMS is 2.3 I'm running 2.3.1 ... I highly doubt that's it though.
    Does anyone have any ideas?

    Also another problem is with Firefox 3.5 (for MAC) when I add an item to the CART seems to go back to the home page??? On Safari and other browsers works fine ... Any ideas ??
    Thanks

  • Nicolaas
    Avatar
    Forum Moderator
    213 Posts

    Re: Paypal Integration NOT working... Link to this post

    Hi

    I have updated the paypal payment class, can you check if you still get the same problem please?

    Cheers

    Nicolaas

  • motoservo
    Avatar
    Community Member
    24 Posts

    Re: Paypal Integration NOT working... Link to this post

    I was trying to get Payment module working on its own with the Paypal class last week but I wasn't quite there. Still had some more tweaking to do, I think.

    Nicolaas, would you expect the update you just did to make Payment work without Ecommerce?

  • datago
    Avatar
    Community Member
    5 Posts

    Re: Paypal Integration NOT working... Link to this post

    Here's what I get using ecommerce 0.6 & Silverstripe 2.3.4

    [User Error] Uncaught Exception: Object->__call(): the method 'order' does not exist on 'PayPalPayment'
    POST /checkout/OrderForm

    Line 515 in /var/www/web25/web/sapphire/core/Object.php
    Source

    506             case isset($config['function']) :
    507                return $config['function']($this, $arguments);
    508             
    509             default :
    510                throw new Exception (
    511                   "Object->__call(): extra method $method is invalid on $this->class:" . var_export($config, true)
    512                );
    513          }
    514       } else {
    515          throw new Exception("Object->__call(): the method '$method' does not exist on '$this->class'");
    516       }
    517    }
    518    
    519    // -----------------------------------------------------------------------------------------------------------------
    520    
    521    /**

    Trace

    * Object->__call(Order,Array)
    * PayPalPayment->Order()
    Line 145 of PayPalPayment.php
    * PayPalPayment->PayPalForm()
    Line 131 of PayPalPayment.php
    * PayPalPayment->processPayment(Array,OrderForm)
    Line 190 of OrderForm.php
    * OrderForm->processOrder(Array,OrderForm,HTTPRequest)
    Line 245 of Form.php
    * Form->httpSubmission(HTTPRequest)
    Line 129 of RequestHandler.php
    * RequestHandler->handleRequest(HTTPRequest)
    Line 143 of RequestHandler.php
    * RequestHandler->handleRequest(HTTPRequest)
    Line 122 of Controller.php
    * Controller->handleRequest(HTTPRequest)
    Line 29 of ModelAsController.php
    * ModelAsController->handleRequest(HTTPRequest)
    Line 277 of Director.php
    * Director::handleRequest(HTTPRequest,Session)
    Line 121 of Director.php
    * Director::direct(/checkout/OrderForm)
    Line 118 of main.php

  • Nicolaas
    Avatar
    Forum Moderator
    213 Posts

    Re: Paypal Integration NOT working... Link to this post

    HI Guys

    I dont know about the PP payment class working outside ecommerce. Judging from the order listed, it probably does not. I can have a look at this sometime, but it might be a while. Did you get this order when using PP outside of ecommerce?

    Cheers

    Nicolaas

  • datago
    Avatar
    Community Member
    5 Posts

    Re: Paypal Integration NOT working... Link to this post

    I was trying to get it to work within the ecommerce module.
    So far I haven't tried to go any further than that.
    Sorry I should have clarified that in my original post.

    Thanks!

  • Nicolaas
    Avatar
    Forum Moderator
    213 Posts

    Re: Paypal Integration NOT working... Link to this post

    ok - do you still have a problem.... Can you make a copy of the error output again please?

  • Dynamic
    Avatar
    Community Member
    16 Posts

    Re: Paypal Integration NOT working... Link to this post

    Not trying to hijack the thread, but I'm having the same problem. Using SS 2.3.2, Ecommerce 0.6, Payment (can't find version #, downloaded from SVN trunk tonight).

    ---

    [User Error] Uncaught Exception: Object->__call(): the method 'order' does not exist on 'PayPalPayment'
    POST /checkout/OrderForm

    Line 515 in /home/jasonirish/themixxdesigncentre.com/sapphire/core/Object.php

    Source

    506             case isset($config['function']) :
    507                return $config['function']($this, $arguments);
    508             
    509             default :
    510                throw new Exception (
    511                   "Object->__call(): extra method $method is invalid on $this->class:" . var_export($config, true)
    512                );
    513          }
    514       } else {
    515          throw new Exception("Object->__call(): the method '$method' does not exist on '$this->class'");
    516       }
    517    }
    518    
    519    // -----------------------------------------------------------------------------------------------------------------
    520    
    521    /**
    Trace

    Object->__call(Order,Array)
    PayPalPayment->Order()
    Line 145 of PayPalPayment.php
    PayPalPayment->PayPalForm()
    Line 131 of PayPalPayment.php
    PayPalPayment->processPayment(Array,OrderForm)
    Line 190 of OrderForm.php
    OrderForm->processOrder(Array,OrderForm,HTTPRequest)
    Line 245 of Form.php
    Form->httpSubmission(HTTPRequest)
    Line 129 of RequestHandler.php
    RequestHandler->handleRequest(HTTPRequest)
    Line 143 of RequestHandler.php
    RequestHandler->handleRequest(HTTPRequest)
    Line 122 of Controller.php
    Controller->handleRequest(HTTPRequest)
    Line 29 of ModelAsController.php
    ModelAsController->handleRequest(HTTPRequest)
    Line 277 of Director.php
    Director::handleRequest(HTTPRequest,Session)
    Line 121 of Director.php
    Director::direct(/checkout/OrderForm)
    Line 118 of main.php

    6152 Views
Page: 1 2 3 4
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.