VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: slammy on July 10, 2014, 16:20:11 PM

Title: change order status to refunded leads to http500-vm 2.6.6 [solved]
Post by: slammy on July 10, 2014, 16:20:11 PM
Hi Community,

we are actually on jml 2.5.22 and vm 2.6.6. Today we had to refund an order (with PayPal Payment) because the article is not available yet. For this reason we refunded from PayPal the transaction. Normally, PayPal triggers the changement of the vm order status, but it didn´t. trying to set the orderstatus in the overview leads to the Initial backend-screen, trying to set the orderstatus in the order-details-view leads to http 500.
It seems that this error concerns only PayPal-payments.

did someone of you do paypal-refunds from vm-orders last days and faced the same issue?

regards jens

Title: Re: change order status to refunded leads to http500-vm 2.6.6
Post by: alatak on July 12, 2014, 16:45:08 PM
Hello
Thank you for reporting. I will test it also.
Title: Re: change order status to refunded leads to http500-vm 2.6.6
Post by: slammy on July 22, 2014, 08:29:26 AM
did someone of you refund orders from PayPal last days? we did it today and again it leads to http 500 error when setting it manually to refunded. interessting is, that the PayPal-transactionlog (displayed within the order-details-view in BE), show refunded. So it seems the trigger stores in the transaction-log but cannot set the orderstatus, whyever ...
Title: Re: change order status to refunded leads to http500-vm 2.6.6
Post by: slammy on September 01, 2014, 09:04:17 AM
hi all,

I still have the below described problem. Is there anything I can do, for example, exchange some files or do you recommend me to call paypal itself?
regards jens
Title: Re: change order status to refunded leads to http500-vm 2.6.6
Post by: GJC Web Design on September 01, 2014, 10:24:48 AM
isn't this this?  http://forum.virtuemart.net/index.php?topic=125351

so solved in 2.6.8b
Title: Re: change order status to refunded leads to http500-vm 2.6.6
Post by: slammy on September 02, 2014, 16:06:41 PM
HI GJC,

thank u for your hint! It looks a bit similiar to my problem and ok, I have overseen vm-debugging: besides some strict-error-messages I have a fatal error too:

Fatal error: Call to undefined method PaypalHelperPayPalStd::RefundTransaction() in /homepages/25/d253685392/htdocs/plugins/vmpayment/paypal/paypal.php on line 1103

Taking a look into this file, there is no method named RefundTRansaction. I will take a deeper look into it and come back here or maybe someone of you knwos what to do?
regards jens
Title: Re: change order status to refunded leads to http500-vm 2.6.6
Post by: slammy on September 02, 2014, 17:00:03 PM
Ok, after I take a deeper look into

plugins/vmpayment/paypal/paypal.php (line 1103) I found this code (like mentioned in http://forum.virtuemart.net/index.php?topic=125351)

if ($paypalInterface->RefundTransaction($payment)) {
if ($this->_currentMethod->payment_type == '_xclick-subscriptions') {
$paypalInterface->debugLog(vmText::_('VMPAYMENT_PAYPAL_SUBSCRIPTION_CANCELLED'), 'plgVmOnUpdateOrderPayment Refund', 'message', true);
} else {
//Mark the order as refunded
// $order->order_status = $method->status_refunded;
$paypalInterface->debugLog(vmText::_('VMPAYMENT_PAYPAL_API_TRANSACTION_REFUNDED'), 'plgVmOnUpdateOrderPayment Refund', 'message', true);
}
$this->_storePaypalInternalData( $paypalInterface->getResponse(false), $order->virtuemart_order_id, $payment->virtuemart_paymentmethod_id);
}


The fatal says: Fatal error: Call to undefined method PaypalHelperPayPalStd::RefundTransaction() in /homepages/25/d253685392/htdocs/plugins/vmpayment/paypal/paypal.php on line 1103

I took a look in paypal.php and didn´t found RefundTransaction() as a method in this file. While looking into the required files from helpers-folder I found the method RefundTransaction in every file now following: paypalapi.php, paypalstd.php and paypalexp.php .

So the method is not undefined, or? What else I noticed is that I can´t find the vm-text for 'VMPAYMENT_PAYPAL_SUBSCRIPTION_CANCELLED' and 'VMPAYMENT_PAYPAL_API_TRANSACTION_REFUNDED' in de-DE.com_virtuemart.ini. Could this be the reason for it or should I update tp vm 2.6.8b as mentioned in the other thread? sry for all my questions and missing knowledge ...

UPDATE: I did re-read the mentioned thread again and noticed it´s absolut similiar. I will move to vm 2.6.8b on a test-environment next weekend and report if the problem still exists.
Title: Re: change order status to refunded leads to http500-vm 2.6.6
Post by: slammy on September 06, 2014, 18:46:18 PM
OK, I´ve just tested it. Problem gone with vm 2.6.8c ... good work
regards jens