0

I have a big problem with paypal on my shop. If i choose authorization on payment action, no problem, i can make an order, and paid on payla. I see my order on BO it's all great.

But i want to change for Sale method on payment action. If i choose this method, just after paid on paypal i am redirected on http://mywebsite.com/paypal/express/return/?token=EC-xxxxxxxxxxxx&PayerID=xxxx with the fallowing error :

Fatal error: Call to a member function isDummy() on a non-object in /srv/d_monexpresso/http/monexpresso/www/app/code/core/Mage/Sales/Model/Order/Invoice/Total/Subtotal.php on line 49.

If you could help me please.

2 Answers 2

1

As you can see in the code:

public function collect(Mage_Sales_Model_Order_Invoice $invoice)
{
    // ...

    $order = $invoice->getOrder();

    foreach ($invoice->getAllItems() as $item) {
        if ($item->getOrderItem()->isDummy()) {

the method tries to loop over all order items based on the invoice item. For some reason there is no order item attached to the invoice item.

If I understand you correctly you go to the checkout, pay with paypal, then go back to the payment step and try to change the payment method (after already paid). I have no clue why this should be possible (but I understand it is, although it shouldn't), but I have no clue, why this method should be called during checkout.

0

Thanks for the reply, in fact, what i'm doing is just activate "Sale" in payment action (configuration paypal), then i make an order, go to paypal, paid and then, paypal is redirect me in this blank page with this error.

I chek the file and you have right, the method loop over all items, but in this case they are no information about items.

If i choose the "Authorization" in payment action, i have no problem, i can make a complete order.

Thanks to help me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.