Jump to:

113 Posts in 224 Topics by 53 members

Payments and Payment Gateway / APIs

SilverStripe Forums » Payments and Payment Gateway / APIs » Should PayPalPayment's complete() method be calling redirectToOrder()?

This is a forum for discussing SilverStripe can-do payments and their APIs / Gateways.

Moderators: martimiz, Sean, Normann, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1658 Views
  • HansR
    Avatar
    Community Member
    140 Posts

    Should PayPalPayment's complete() method be calling redirectToOrder()? Link to this post

    I've been testing out the latest eCommerce code, and I noticed the following in my log:
    216.113.191.33 - - [10/Sep/2010:11:24:33 +1200] "POST /paypal/complete HTTP/1.0" 302 -
    216.113.191.33 - - [10/Sep/2010:11:24:36 +1200] "POST /account/order/6 HTTP/1.0" 302 -
    216.113.191.33 - - [10/Sep/2010:11:24:39 +1200] "POST /Security/login?BackURL=%2Faccount%2Forder%2F6 HTTP/1.0" 200 6265

    While this doesn't prevent the payment from being recognized, I don't think that the PayPal IPN service should be redirected to the order URL.
    Looking at the complete() method, the last call is to $payment->redirectToOrder(), which on closer inspection is in the ECommercePayment class (which is a DataObjectDecorator).

    I was about to post a bug report, when I noticed that all of the payment handler classes do this. Am I missing something here? Or is this a bug? Incidentally, this makes all of the Payment modules dependent on being used with ECommercePayment, or with a DataObjectDecorator with a redirectToOrder() method.

  • HansR
    Avatar
    Community Member
    140 Posts

    Re: Should PayPalPayment's complete() method be calling redirectToOrder()? Link to this post

    After closer inspection, PayPalPayment doesn't support IPN, and the complete() method handles PDT.

    Hans

    1658 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.