[TYPO3-shop] handleScript: cancel order, order id

Richard Hirner richard at hirner.at
Sun Nov 25 20:01:01 CET 2007


Hello,

I made a handleScript for PayPal Express Checkout, but there are some
errors. Maybe you can help me. You can find the script at

http://richard.hirner.at/typo3/payment_paypal_express.phps

1) I didn't manage to cancel the current order. I could call the
basket with products_cmd=cancel and the appropriate case block was
executed, but I don't know how to cancel the order, i.e. prevent
the order from being finalized. No matter what I put into the
cancel block, tt_products always completed the order in the DB and sent a
confirmation. How can I cancel this? I only want an error message like
"The payment couldn't be processed." I tried

$bFinalize = false;
$content = "<strong>lol</strong>";
return;

too but it didn't work.


2) The invoice id which is set for PayPal is always one number too low.
I think this is because getBlankUid() creates a new order but this order
is not used for finalizing. In the database, I have one empty order
after my script being called, and then another order is created and
filled with data. How can I tell tt_products to use my blank order?


If you have any other suggestions or comments to my code, you're
welcome. It's the first time I played around with Typo3 internals.

-- 
Best regards,
Richard


More information about the TYPO3-project-tt-products mailing list