Servired Redirection afterpayment

  • Posts: 441
  • Thank you received: 24
11 years 5 months ago #125440

i want to know how to force servired plugin to display a custom page after payment is confirmed or not
i have a page wich is for example payment-done and other for payment-wrong and i want the plugin to redirect to this pages after payment is done or not

Last edit: 11 years 5 months ago by condorazul.

Please Log in or Create an account to join the conversation.

  • Posts: 26201
  • Thank you received: 4032
  • MODERATOR
11 years 5 months ago #125489

Hi,

In all payment methods you have options like "return url / cancel url".
These options are for the redirection of the user after a payment. You can specify the url where the customer will be finally redirect.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 441
  • Thank you received: 24
11 years 5 months ago #125637

You mean in the platform or in the plugin, in the platform there is no option at all i think is plugin generated

Please Log in or Create an account to join the conversation.

  • Posts: 26201
  • Thank you received: 4032
  • MODERATOR
11 years 5 months ago #125662

Hi,

I clearly don't understand your message.
Can you just configure the "return url" in the HikaShop plugin like I said in my previous post ?

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 441
  • Thank you received: 24
11 years 5 months ago #125666

and where is the return url or cancel url option? in the plugin backend there is no option for that

Please Log in or Create an account to join the conversation.

  • Posts: 83347
  • Thank you received: 13482
  • MODERATOR
11 years 5 months ago #125718

Ah yes. It was missing from that plugin.

Add the line:
'return_url' => array('RETURN_URL', 'input'),
after the line:
'debug' => array('DEBUG', 'boolean','0'),

in the file plugins/hikashoppayment/servired/servired.php and that will add that option so that you can set the redirect URL.

Please Log in or Create an account to join the conversation.

  • Posts: 441
  • Thank you received: 24
11 years 5 months ago #125729

ok but that return url is for action successfully complete or in the case it failed. And in both cases how can i set to different urls for ok or not ok

Please Log in or Create an account to join the conversation.

  • Posts: 83347
  • Thank you received: 13482
  • MODERATOR
11 years 5 months ago #125774

That return URL parameter is only for success. For failure, if you want another page that the checkout, you can add that line at the same place:
'cancel_url' => array('CANCEL_URL', 'input'),

Please Log in or Create an account to join the conversation.

  • Posts: 441
  • Thank you received: 24
11 years 5 months ago #125809

Ok thank you Nicolas, that porblem is now fixed but i have another one.
Once the order payment is incorrect y have set the incorrect state as created, for the client to be able to try to pay it again, but it doesnt behave this way it automatically set the order as cancelled and the client is not allowed to pay it after the trasaction failed.

Please Log in or Create an account to join the conversation.

  • Posts: 26201
  • Thank you received: 4032
  • MODERATOR
11 years 5 months ago #125890

Hi,

You can configure the order status where the order can be paid.
So I guess you can make it work even if the order status is "cancelled".

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 441
  • Thank you received: 24
11 years 5 months ago #125892

I tried in the plugin and in the order resume but neither can i change status in order nor being the status incorret set to created works it always cancel the order

Please Log in or Create an account to join the conversation.

  • Posts: 83347
  • Thank you received: 13482
  • MODERATOR
11 years 5 months ago #126032

What jerome is suggesting is to change the line:
<?php if(!empty($row->show_payment_button) && bccomp($row->order_full_price,0,5)>0){ ?>

to:
<?php if(in_array($row->order_status,array('created','cancelled')) && bccomp($row->order_full_price,0,5)>0){ ?>

in the file "lisitng" of the view "order" of the frontend so that the users can pay for cancelled ordered.

Please Log in or Create an account to join the conversation.

  • Posts: 441
  • Thank you received: 24
11 years 4 months ago #126409

Ok i´m going to explain it again because i think we are talking about different things.
1.- One costumer makes an order
2.- the costumer choose servired payment
3.- it takes the costumer to the payment gateway
4.- Something happens and could not finish the payment or the payment i wrong.
5.- the gateway returns to the page and inmediatelly cancelled the order. but it the pluging i have set incorrect stay as created, not as cancelled.

6.- As administrator in backend change order status to created so the costumer can pay it again through his orders area.
7.- When he click on pay to go to the payment gateway it does not do anything and cancel the order again.

My objetive is:
1.- when an order is not paid for whatever reason it stays as created so they can be able to pay.
2.- If a set a cancelled order to created they must be able to pay also.
3.- In the new mail that is sent to the costumer if you click on the link, pay the order, if they choose servired it does not work too.

I attach plugin configuration.
I have not made any modifications to the plugin




Hope its clear now

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26201
  • Thank you received: 4032
  • MODERATOR
11 years 4 months ago #126478

Hi,

It's clearer yes but there is still a mistake for point "5". So I will not read this point.

The servired plugin hasn't be developed by the HikaShop team, but by Webemus who gave us his plugin so we include it in the HikaShop package (keeping his copyright, for sure).
Servired does not allow to pay several time the same order number and the plugin send to the servired plugin the order_id. So when servired receive a request for the same order (which has been cancelled before) it does not show anything and cancel directly the order (because it has already processed it before).

Problem is that, we need to pass the order_id to servired so it will send us back for the validation. Maybe we can use some kind of trick but for the moment, it's not possible and it's more a servired "feature".

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.092 seconds
Powered by Kunena Forum