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

How i got the latest eCommerce trunk to work with paypal


Reply


39 Posts   6495 Views

Avatar
CHD

Community Member, 218 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?

Avatar
marc79

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!

Avatar
CHD

Community Member, 218 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)

zahara

hair

.co

.uk

(all one word)

Avatar
marc79

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!

Avatar
GRiiDWeb

Community Member, 60 Posts

11 July 2011 at 4:12am

Hi,
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

Avatar
marc79

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.

Marc

Avatar
MarijnKampf

Community Member, 164 Posts

12 January 2012 at 6:00am

@Jedateach

I had to change line 348 in http://code.google.com/p/silverstripe-ecommerce/source/browse/modules/payment_paypal/trunk/code/PayPalExpressCheckoutPayment.php from

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


to

$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: https://api-3t.paypal.com/nvp
Redirect url: https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=TOKENGOESHERE&useraction=commit
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.