News:

Looking for documentation? Take a look on our wiki

Main Menu

Payment plugin response message

Started by sandomatyas, December 04, 2014, 13:40:51 PM

Previous topic - Next topic

sandomatyas

I want to build an own payment plugin.
I catch the checkout process via the plgVmConfirmedOrder and redirect the user to the external payment site. After the payment process the customer comes back to the site, I catch them via plgVmOnPaymentResponseReceived function.
I handle the whole process, change the order status etc. Everything is well except one thing.
I want to send a message to the customer. I sert the $html variable in the plgVmOnPaymentResponseReceived(&$html) function, but I can't see it anywhere. I've checked the pluginresponse view. If I put a die(); into the pluginresponse/tmpl/default.php I can see the message what I set before. But if I remove the die(); the message not shows, I see only the "Shopping Cart is Empty. You have no items in your shopping cart. Click here to continue shopping."
If I put the die() into the views/cart/view.html.php it stops there so as far as I can see the cart view overrides the pluginresponse view.
So how can I display the $paymentResponseHtml message which is generated in my plugin's plgVmOnPaymentResponseReceived function?

alatak

hello
plgVmOnPaymentResponseReceived(&$html)
yes this is correct

Before redirecting to your payment processor, you have to tell him the reponse URL.
Do you have done that ?

sandomatyas

Yes I did.
If I come back, my url is this:
/component/virtuemart/pluginresponse/pluginresponsereceived?on=dc7f09&error_msg=&pm=1
The plgVmOnPaymentResponseReceived() runs well the order status gets the correct params, I assign the correct value to the $html variable and I can catch it in the pluginresponse view if I stop the process in the pluginresponse view. But if I don't and let the process running I get this message instead my message:

So the url is pluginresponse/pluginresponsereceived, but I seee the cart.

sandomatyas

hm, I think it is because the cmsmart one page checkout plugin. If I disable it, I can see my message. If I change to the one page checkout by www.rupostel.com there is well. So this is because of cmsmart