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

Paypal Integration NOT working...


Go to End
Reply

28 Posts   6662 Views

Avatar
alexbalanoff

15 July 2009 at 9:21am Community Member, 8 Posts

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

Avatar
Nicolaas

23 July 2009 at 12:45am Forum Moderator, 213 Posts

Hi

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

Cheers

Nicolaas

Avatar
motoservo

23 July 2009 at 11:56am Community Member, 24 Posts

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?

Avatar
datago

27 July 2009 at 3:45pm Community Member, 5 Posts

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

Avatar
Nicolaas

27 July 2009 at 6:15pm Forum Moderator, 213 Posts

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

Avatar
datago

29 July 2009 at 6:43am Community Member, 5 Posts

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!

Avatar
Nicolaas

29 July 2009 at 1:34pm Forum Moderator, 213 Posts

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

Avatar
Dynamic

29 July 2009 at 2:56pm Community Member, 16 Posts

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

Go to Top