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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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 i got the latest eCommerce trunk to work with paypal

Go to End

39 Posts   8526 Views


Community Member, 219 Posts

5 July 2011 at 5:22am

yeah i spotted your site earlier today when reading the thread ;)
You've implemented it really well, it looks good!

how is your email confirmations?
mine kept sending emails to the customer saying "payment failure" but the site said it was fine.
if you refreshed the page it emailed again saying payment success, have you come across this?


Community Member, 65 Posts

5 July 2011 at 5:30am

Thanks. It worked well in the end.

To be honest I've didn't spend long testing the email notifications. I've not heard anything back from the client on this yet. Maybe I'll do some more testing before the client finds it first!


Community Member, 219 Posts

5 July 2011 at 5:34am

good idea ;-)
here was the one i built in case you were interested, this is pretty old now...and the client has still never actually added any content! (what a waste)





(all one word)


Community Member, 65 Posts

5 July 2011 at 7:21am

Nice one. I've got a couple like that. Must have a full CMS and then never updated. Ho-hum!


Community Member, 60 Posts

11 July 2011 at 4:12am

Im looking to add amend the code in the EcommerceRole.php to get the default GB country.
Is this additional code or is it to overwrite something else? I can't quite seem to see where it should go.

Many thanks


Community Member, 65 Posts

11 July 2011 at 9:19am

Yes. The changes I posted replaced existing code. It was around line 75 in my version.



Community Member, 176 Posts

12 January 2012 at 6:00am


I had to change line 348 in from

$response = $paystation->request('','POST',http_build_query($postfields));

$response = $paystation->request('','POST',http_build_query($postfields, null, "&"));
for it to work on my test site.

I received the error

PayPal Debug:
Mode: live
API url:
Redirect url:
Username: PaypalAPIUsername
Password: PaypalAPIPassword
Signature: PaypalSignature
Response Array
    [TIMESTAMP] => 2012-01-11T16:58:47Z
    [CORRELATIONID] => 5d610f6c4a96e
    [ACK] => Failure
    [VERSION] => 0.000000
    [BUILD] => 2271164
    [L_ERRORCODE0] => 10002
    [L_SHORTMESSAGE0] => Authentication/Authorization Failed
    [L_LONGMESSAGE0] => You do not have permissions to make this API call
    [L_SEVERITYCODE0] => Error

this was caused by sending encoded & instead of & in between the POST request elements.

Go to Top