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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

new paypal payment code for ecommerce


Go to End


20 Posts   37492 Views

Avatar
Nicolaas

Forum Moderator, 224 Posts

11 March 2008 at 10:32am

I would appreciate a review of the attached code. it is just in its alpha state at the moment.

Cheers

Nicolaas

Avatar
JonathanParker

Community Member, 37 Posts

24 March 2008 at 7:55am

Some examples on implimentation would be good. I'm relativly new to SS so am I guessing right that I create a PayPal.ss as well as place your code in the mysite/code/ then do a db/build?flush=1

Regards.

Jonathan

Avatar
Nicolaas

Forum Moderator, 224 Posts

24 March 2008 at 7:59am

Hi Jonathan

The Paypal comes as part of the e-commerce module and it is an extension of the payment class. Did you figure that out?

Cheers

Nicolaas

Avatar
JonathanParker

Community Member, 37 Posts

24 March 2008 at 8:09am

I'm slowly getting there; I'm new (4 weeks) to SS. I have recently installed the ecommerce module (latest daily build). That build already has a PayPalPayments.php file, but the contents are different from the file that you attached to your post. Which shall I use?

Am I right in thinking that the payments options are those that I need to set within the config file.
// Define which payment methods your site uses.
Payment::set_supported_methods(array(
'DPSPayment' => 'Credit card (DPS)',
'ChequePayment' => 'Cheque'
));

I should Add 'PayPalPayments' => 'Credit card (PP)';

In your file you mention setting paypal parameters within the config file. I take it that these details i.e. paypal account etc should be set up also to get the PayPal method to work?

Regards.

Jonathan.

P.S. I'm on freenode if you hav etime to chat about this for a min.

Avatar
Nicolaas

Forum Moderator, 224 Posts

24 March 2008 at 8:19am

I have written you some comments on the IRC channel. Let me know if you got them - if you did not then I will email them to you.

Avatar
JonathanParker

Community Member, 37 Posts

24 March 2008 at 1:01pm

Hi Nicolass, Sorry I closed down the chat chanel before I read this post. I would appreciate it if you could e-mail me some notes on implimentation. I may be new to SS but I'm fine with php etc.

E-Mail: jonathan@dabnis.com

Regards

Jonathan

Avatar
WorldNZ

Community Member, 7 Posts

28 March 2008 at 10:05am

Edited: 28/03/2008 10:06am

Hi Nicolaas,
Is it possible to send me implementation notes you may have so I can see how this works and test it also

Email: anthonykennelly@gmail.com

Thanks in advance
Anthony

Avatar
WorldNZ

Community Member, 7 Posts

28 April 2008 at 4:20pm

Edited: 30/04/2008 1:35pm

Hi All

Attached is the paypal module developed by Nicolaas.

This version fixes the problem of the form submission not automatically redirecting to paypal.

Instructions (provided by Nicolaas) for implementing this module are included in the php file in the zip file located here. http://open.silverstripe.com/ticket/1760

We have done some testing and so far it works well.

This method is an external payment method where you are actually redirected to the paypal site and once payment has been processed you are linked back to your SS cart where SS updates the transaction as successful or unsuccessful.

Paypal charges for the onsite method of processing so this is why Nicolaas opted for the off-site payment method.

You can view paypal ticket here http://open.silverstripe.com/ticket/1760

Go to Top