17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 5304 Views |
-
How I got PayPal and Ecommerce module to work

9 October 2008 at 2:23am
I had a hell of a time getting paypal and ecommerce to work, and it seems all the documentation is spread out so I figured I would post what worked for me. Seem others had the same issues.
I was not able to get paypal to work with the supplied PayPalPayment.php which is located in the ecommerce/code directory (so it would be http://www.mysite.com/ecommerce/code/PayPalPayment.php).
However there is an updated version of the file and can be obtained here:
http://open.silverstripe.com/ticket/1760Upload that over your existing http://www.mysite.com/ecommerce/code/PayPalPayment.php
The next step is to configure your http://www.mysite.com/ecommerce/_config.php to add the paypal information you need.
This is what I added
Payment::set_supported_methods(array(
'PayPalPayment' => 'Credit Card (Paypal)'
));// Set the email of the admin who looks after receiving the order emails.
Order::set_email('ross@3point7designs.com');//Real account for paypal
PayPalPayment::setPayPalRealAccount('info@3point7designs.com');//Test account for paypal
PayPalPayment::setPayPalTestAccount('info@3point7designs.com');//Who to send test payment from
PayPalPayment::setPayPalUseTestAccount('info@3point7designs.com');Then you must edit the /ecommerce/code/CheckoutPage.php
and change this:
class CheckoutPage extends Page{
static $db = array(
"PurchaseComplete" => "HTMLText",
"ChequeMessage" => "HTMLText"
);...
to this
class CheckoutPage extends Page{
static $db = array(
"PurchaseComplete" => "HTMLText",
"PayPalInstructions" => "HTMLText", //add paypal instructions
"ChequeMessage" => "HTMLText"
);
Hope this helps those who had/have similar problems. After doing these changes and going to http://www.mysite.com/checkout/?flush=1 paypal showed up
-
Re: How I got PayPal and Ecommerce module to work

10 October 2008 at 5:03am
Sounds like something that should be put into the documentation wiki. It will surely get lost here.
-
Re: How I got PayPal and Ecommerce module to work

16 October 2008 at 3:05am Last edited: 16 October 2008 3:27am
Thank you so much for posting this. I've been struggling with the PayPal issue for a client. I've implemented everything you've outlined. PayPal shows up in my cart, but when I get to http://www.mysite.net/demo/checkout/ I have the following choices: Credit Card (Paypal) AND preferred payment method (select one) VISA, MASTERCARD, AMEX, PayPal.
If I select PayPal in either case as the payment option, when I click place order and make payment I simply get a blank screen the following url: http://www.mysite.net/demo/checkout/?executeForm=OrderForm
Do you have any thoughts/advice on this?
-
Re: How I got PayPal and Ecommerce module to work

17 October 2008 at 4:15am
Hmm, I don't have that problem but I usually select paypal AND a credit card I wish to pay with... maybe try that and see how it works?
-
Re: How I got PayPal and Ecommerce module to work

31 October 2008 at 7:10am Last edited: 31 October 2008 7:54am
You need to create a template the template file:
/ecommerce/templates/includes/paypalPaymentPage.ss
It should be a regular template page, with $PayPalInstructions and $Content in the content area.
I made mine just say "Redirecting to PayPal", and then used JavaScript to submit the PayPal form.
-
Re: How I got PayPal and Ecommerce module to work

4 November 2008 at 10:21am
Thanks so much for the very helpful guide. I have PayPal up and running with Ecommerce. I did run into a problem coming back from a successful payment, though. in PayPalPament.php on lines #230 and #233, the code calls a view that does not exist: ConfirmPayPal. By changing line 230 to be OrderSuccessful instead and 233 to be OrderIncomplete, I get proper returns from payments.
-
Re: How I got PayPal and Ecommerce module to work

8 December 2008 at 4:38pm
Hey there, i am following this thread trying to set up paypal as well but now, after iv made those changes no pages are able to load and it is saying
"Fatal error: Access to undeclared static property: PayPalPayment_Handler::$URLSegment in /home/howardgr/public_html/lynnescolours.co.nz/ecommerce/_config.php on line 31"
If I remove "PayPalPayment_Handler::$URLSegment . '/$Action/$ID' => 'PayPalPayment_Handler'" from my ecommerce/_mysite.php file then the site loads but I when I process payment it errors and doesn't get as far as paypal.
Any help would be appreciated!!
| 5304 Views | ||
|
Page:
1
|
Go to Top |




