liqiusheng / silverstripe-ecommerce

Automatically exported from code.google.com/p/silverstripe-ecommerce
0 stars 0 forks source link

[Strict Notice] Non-static method Controller::redirect() should not be called statically, assuming $this from incompatible context #604

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
e-commerce version: 3.1 28/10/2013

SilverStripe version: 3.1 from github

From
http://www.sendasoft.com/es-es/checkout/checkoutstep/orderconfirmationandpayment
/

I click on 'Place order and make payment' button, then ....

[Strict Notice] Non-static method Controller::redirect() should not be called 
statically, assuming $this from incompatible context

Line 107 in 
/var/www/vhosts/sendasoft.com/httpdocs/payment_paypal/code/PayPalExpressCheckout
Payment.php

See screenshot.

Regards,
Jose A.

Original issue reported on code.google.com by supp...@sendasoft.com on 29 Oct 2013 at 3:00

Attachments:

GoogleCodeExporter commented 8 years ago
[Strict Notice] Non-static method Controller::redirect() should not be called 
statically, assuming $this from incompatible context
POST /es-es/checkout/order-confirmation/PaymentForm

Line 107 in 
/var/www/vhosts/sendasoft.com/httpdocs/payment_paypal/code/PayPalExpressCheckout
Payment.php
Source

98      //sanity checks for credentials
99      if(!self::$API_UserName || !self::$API_Password || !self::$API_Signature){
100             user_error('You are attempting to make a payment without the necessary 
credentials set', E_USER_ERROR);
101         }
102         $data = $this->Order()->BillingAddress()->toMap();
103         $paymenturl = 
$this->getTokenURL($this->Amount->Amount,$this->Amount->Currency,$data);
104         $this->Status = "Pending";
105         $this->write();
106         if($paymenturl){
107             Controller::redirect($paymenturl); //redirect to payment gateway
108             /*
109             $page = new Page();
110 
111             $page->Title = 'Redirection to PayPal...';
112             $page->Logo = '<img src="' . self::$logo . '" alt="Payments powered by 
PayPal"/>';
113             $page->Form = $this->PayPalForm();

Trace

    PayPalExpressCheckoutPayment->processPayment(Array,OrderForm_Payment)
    EcommercePayment.php:113
    EcommercePayment::process_payment_form_and_return_next_step(Order,OrderForm_Payment,Array)
    OrderForm_Payment.php:58
    OrderForm_Payment->dopayment(Array,OrderForm_Payment,SS_HTTPRequest)
    Form.php:367
    Form->httpSubmission(SS_HTTPRequest)
    RequestHandler.php:288
    RequestHandler->handleAction(SS_HTTPRequest,httpSubmission)
    RequestHandler.php:200
    RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
    RequestHandler.php:222
    RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
    Controller.php:153
    Controller->handleRequest(SS_HTTPRequest,DataModel)
    ContentController.php:220
    ContentController->handleRequest(SS_HTTPRequest,DataModel)
    ContentController.php:203
    ContentController->handleRequest(SS_HTTPRequest,DataModel)
    ModelAsController.php:75
    ModelAsController->handleRequest(SS_HTTPRequest,DataModel)
    Director.php:360
    Director::handleRequest(SS_HTTPRequest,Session,DataModel)
    Director.php:152
    Director::direct(/es-es/checkout/order-confirmation/PaymentForm,DataModel)
    main.php:189

Original comment by supp...@sendasoft.com on 29 Oct 2013 at 6:47

GoogleCodeExporter commented 8 years ago
FIXED>...  Will test in the next few days!

Original comment by nfranc...@gmail.com on 29 Oct 2013 at 11:42